Skip to content
mertskaplanPublic

About

Fun party game based on narration and guessing

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

150 Commits

Folders and files

Repository files navigation

Yaygara

Static Badge GitHub License Docker GitHub release GitHub latest commit Website shields.io Docker Docker Docker Image Size Docker Pulls

Maintainability CodeFactor

Yaygara - Fun party game based on narration and guessing

Yaygara is a vibrant, mobile-first, and offline-ready party game based on narration and guessing. It brings people together for fast-paced fun, blending the best elements of classic games like Taboo and Charades.

It can be used directly through a browser or as an APK file on Android devices.

Live: yaygara.mertskaplan.com

Download Android APKGet it on GitHubKomi StoreObtainium

πŸ“± Screenshots

✨ Key Features

  • Unlimited Decks with Master Prompt: Create custom word decks instantly using a specialized AI prompt.
  • Mobile-First Design: Optimized for a seamless experience on smartphones and tablets.
  • PWA Support: Installable as a native-like app on your home screen.
  • Audio Feedback: Immersive sound effects for correct answers, passes, and timer alerts.
  • Customizable Game Rules: Set the number of teams, turn duration, and word count per game.
  • Team Customization: Choose your own team names and vibrant colors.
  • Multi-language Support: Play in English or Turkish.
  • Offline Capable: Works perfectly without an internet connection once loaded.
  • Ready-to-Play Decks: Comes with numerous built-in word decks across various categories.
  • Auto-Pause: The game automatically pauses if you switch tabs or leave the app.

πŸ›  Tech Stack

  • Frontend: React + TypeScript + Vite
  • Styling: Tailwind CSS + Shadcn UI
  • State Management: Zustand (with Persistence & Immer)
  • Animations: Framer Motion
  • Icons: Lucide React
  • Runtime: Bun

πŸš€ Getting Started

πŸ‹ Run with Docker (Recomended)

You can run Yaygara directly from Docker Hub with a single command:

docker run -d -p 8727:80 mertskaplan/yaygara

Using Docker Compose

Create a docker-compose.yml file with the following content:

version: '3.8'
services:
  yaygara:
    image: mertskaplan/yaygara:latest
    container_name: yaygara
    ports:
      - "8727:80"
    restart: unless-stopped

Then run:

docker-compose up -d

πŸ’» Local Development

  1. Clone the repository:

    git clone https://github.com/mertskaplan/yaygara.git
    cd yaygara
  2. Install dependencies:

    bun install
  3. Start the development server:

    bun run dev

πŸ“Š Telemetry

Yaygara includes an optional telemetry system to help improve game balance and deck quality.

  • Disabled by Default: Telemetry is completely inactive unless explicitly enabled.
  • Automatic: When enabled, game data is sent automatically at the end of every completed game, without asking the players. The About dialog tells players that this server collects telemetry.
  • Anonymous Data: Only game-related data (such as played deck, game duration, number of passes, and team scores) is collected. Team names or any other personal data are never sent, and the data is not linked to personal data.

To use telemetry, you must also set up the Yaygara Telemetry software.

Docker Configuration

Add these environment variables to your docker-compose.yml file:

    environment:
      - TELEMETRY_ENABLED=true
      - TELEMETRY_URL=https://lab.mertskaplan.com/yaygara-telemetry/api

Local Development

Run the project with the environment variables:

VITE_TELEMETRY_ENABLED=true VITE_TELEMETRY_URL=https://lab.mertskaplan.com/yaygara-telemetry/api bun run dev

You can visit lab.mertskaplan.com/yaygara-telemetry/ (or test mode) to see the telemetry data for the main Yaygara repository. The API address will not accept data from your server. Therefore, you need to set up your own telemetry service and configure the address accordingly.

πŸ“ˆ Custom Header Script & Analytics

You can inject any script (e.g. an analytics/visitor counter snippet) into the <head> of every page with the HEADER_JS environment variable. It is empty by default.

    environment:
      - 'HEADER_JS=<script defer src="https://example.com/script.js" data-website-id="your-id"></script>'

Analytics Events

If Umami, Google Analytics (gtag) or Yandex Metrica is loaded through HEADER_JS, Yaygara sends the following events to every tool found on the page. Nothing is sent if none is loaded. For Yandex Metrica, also set YM_COUNTER_ID to your counter number (events are sent as goals with reachGoal).

Event When Properties
game_start A game starts language, deck_id, deck_difficulty, custom_deck, team_count, word_count, turn_duration
game_complete A game ends after round 3 same as game_start + winner_team (1-based team position, or tie), duration_min
game_abandon A game is quit mid-way same as game_start + round
pwa_install The app is installed –

AI-generated custom decks are reported with deck_id as custom. Team names are never sent.

    environment:
      - YM_COUNTER_ID=12345678

πŸ“‚ Project Structure

  • src/components/: Reusable UI components and modals.
  • src/pages/: Main application screens (Home, Setup, Game, Score).
  • src/stores/: Game state management using Zustand.
  • src/lib/: Utilities for sound, deck fetching, and helper functions.
  • src/hooks/: Custom React hooks for translations and logic.
  • public/decks/: JSON files containing the word decks.
  • prompts/: Specialized prompts for AI deck generation.

🌲 File Tree

β”œβ”€β”€ πŸ“ prompts
β”œβ”€β”€ πŸ“ public
β”‚   β”œβ”€β”€ πŸ“ decks
β”‚   β”œβ”€β”€ πŸ“ icons
β”‚   β”œβ”€β”€ πŸ“ locales
β”œβ”€β”€ πŸ“ src
β”‚   β”œβ”€β”€ πŸ“ assets
β”‚   β”œβ”€β”€ πŸ“ components
β”‚   β”‚   β”œβ”€β”€ πŸ“ ui
β”‚   β”œβ”€β”€ πŸ“ hooks
β”‚   β”œβ”€β”€ πŸ“ lib
β”‚   β”œβ”€β”€ πŸ“ pages
β”‚   β”œβ”€β”€ πŸ“ stores
β”‚   β”œβ”€β”€ πŸ“ types

πŸƒ Adding New Decks

To add a new word deck to the game:

  1. Create a JSON file in public/decks/ following this structure:

    {
      "id": "my-cool-deck.en",
      "name": "My Cool Deck",
      "language": "en",
      "difficulty": "medium",
      "words": [
        { "term": "Example", "hint": "A short clue", "difficulty": 1 }
      ]
    }
  2. Add the filename (e.g., "my-cool-deck.en.json") to the array in public/decks-manifest.json.

πŸ“„ License

Yaygara is free software, and its source code is licensed under the GNU General Public License v3.0 (GPLv3), while its game content and assets are licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).

Built with ❀️ by Mert S. Kaplan.

β˜• Support

Free software projects like Yaygara have infrastructure and sustainability costs. To ensure similar projects can be developed ad-free and available to everyone, you can provide support via Kreosus.

About

Fun party game based on narration and guessing

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages