2025-12-19 02:28:02 +07:00
2025-12-19 02:28:02 +07:00
2025-12-18 17:15:21 +07:00
2025-12-19 02:07:25 +07:00
2025-12-19 02:07:25 +07:00
2025-12-16 20:59:50 +07:00
2025-12-18 17:15:21 +07:00
2025-12-14 02:42:32 +07:00
2025-12-14 02:42:32 +07:00
2025-12-19 02:07:25 +07:00
2025-12-18 17:15:21 +07:00
2025-12-14 02:42:32 +07:00
2025-12-17 02:03:33 +07:00
2025-12-14 02:42:32 +07:00

Game Marathon

A web application for running gaming marathons with friends. Spin the wheel, complete challenges, earn points!

Features

  • Create private marathons and invite friends
  • Add games with download links
  • AI-generated challenges using GPT
  • Spin the wheel for random game + challenge
  • Points system with streak bonuses
  • Leaderboard and activity feed
  • Proof upload for completed challenges

Tech Stack

  • Frontend: React 18, TypeScript, Vite, Tailwind CSS, Zustand
  • Backend: FastAPI, SQLAlchemy, PostgreSQL
  • AI: OpenAI GPT-4o-mini
  • Infrastructure: Docker, Nginx

Quick Start

Prerequisites

  • Docker and Docker Compose
  • OpenAI API key

Setup

  1. Clone the repository:
cd WebApp
  1. Create .env file:
cp .env.example .env
  1. Edit .env and set your values:
DB_PASSWORD=your_secure_password
SECRET_KEY=your_jwt_secret_at_least_32_characters
OPENAI_API_KEY=sk-your-openai-key
  1. Start with Docker:
docker-compose up -d
  1. Open http://localhost in your browser

Development Mode

Backend:

cd backend
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -r requirements.txt
uvicorn app.main:app --reload

Frontend:

cd frontend
npm install
npm run dev

Project Structure

WebApp/
├── backend/           # FastAPI application
│   ├── app/
│   │   ├── api/       # API endpoints
│   │   ├── models/    # SQLAlchemy models
│   │   ├── schemas/   # Pydantic schemas
│   │   ├── services/  # Business logic
│   │   └── core/      # Config, security
│   └── uploads/       # Uploaded files
├── frontend/          # React application
│   └── src/
│       ├── api/       # API client
│       ├── components/# UI components
│       ├── pages/     # Page components
│       ├── store/     # Zustand store
│       └── types/     # TypeScript types
├── bot/               # Telegram bot (coming soon)
├── docker-compose.yml
└── nginx.conf

API Documentation

When backend is running, visit:

How to Play

  1. Create Marathon - Set title, description, and duration
  2. Invite Friends - Share the invite code
  3. Add Games - Everyone adds their favorite games
  4. Generate Challenges - AI creates challenges for each game
  5. Start Marathon - Begin the competition
  6. Spin & Play - Spin the wheel, get a challenge, complete it
  7. Upload Proof - Submit screenshot/video as evidence
  8. Earn Points - Build streaks for bonus points!

Point System

Difficulty Base Points
Easy 30-50
Medium 60-100
Hard 120-200

Streak Bonus:

  • 2 in a row: +10%
  • 3 in a row: +20%
  • 4 in a row: +30%
  • 5+ in a row: +40%

Drop Penalties:

  • 1st drop: Free (streak resets)
  • 2nd drop: -10 points
  • 3rd drop: -25 points
  • 4th+ drop: -50 points

License

MIT

Description
No description provided
Readme 3.5 MiB
Languages
TypeScript 52%
Python 42.8%
HTML 2.1%
CSS 1.6%
JavaScript 0.8%
Other 0.6%