# badmaster **Repository Path**: pibeibei/badmaster ## Basic Information - **Project Name**: badmaster - **Description**: play for fun - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-26 - **Last Updated**: 2026-05-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BM26 - Badminton Manager 2026 A badminton sports management simulation game. Manage a national team, compete in tournaments, develop players, and build your reputation as the greatest coach in badminton history. ## Features - **Coach Mode**: Lead a national team through their career (2012-2026+) - **12 Playable Nations**: Choose from China, Indonesia, Malaysia, Denmark, Japan, Korea, France, India, Thailand, Chinese Taipei, Hong Kong, and Canada - **Tournament Engine**: Real BWF-style tournaments with Super 1000/750/500/300 tiers - **Match Simulation**: Fast simulation for instant results, slow simulation for point-by-point control - **Player Development**: Track player growth, stamina, confidence, and injuries - **Career Progression**: Earn reputation, gold coins, and lead your team to glory ## Tech Stack - **Frontend**: Next.js 16, React 19, Tailwind CSS, Framer Motion, Zustand - **Backend**: FastAPI (Python), SQLAlchemy (async), Pydantic ## Quick Start ### Prerequisites - Node.js 20+ (for frontend) - Python 3.11+ (for backend) - npm or yarn ### 1. Start Backend ```bash cd backend # Create virtual environment python -m venv .venv # Install dependencies .venv/bin/pip install -e . # Start server .venv/bin/python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 ``` Backend runs at: http://localhost:8000 ### 2. Start Frontend ```bash cd frontend # Install dependencies npm install # Start development server npm run dev ``` Frontend runs at: http://localhost:3000 ### 3. Using Mock Data (Default) The frontend uses mock data by default for all API calls, so you can use the full UI without needing a running backend. To switch to real API: ```bash echo "NEXT_PUBLIC_USE_MOCK=false" > frontend/.env.local ``` ## Project Structure ``` badmaster/ ├── frontend/ # Next.js frontend application │ ├── app/ # App router pages │ ├── components/ # React components │ ├── hooks/ # Custom React hooks │ ├── lib/ # API clients, types, utils │ └── stores/ # Zustand state stores ├── backend/ # FastAPI backend application │ ├── app/ │ │ ├── api/ # API route handlers │ │ ├── core/ # Config, database, models │ │ ├── models/ # SQLAlchemy models │ │ └── services/ # Business logic services │ └── .venv/ # Python virtual environment ├── docs/ # Project documentation ├── frontendprd.md # Frontend PRD ├── backendprd.md # Backend PRD ├── gameprd.md # Game mechanics PRD └── gamesimuprd.md # Match simulation PRD ``` ## API Endpoints ### Health Check - `GET /health` - Check if backend is running ### Players - `GET /api/players/` - List all players - `GET /api/players/{id}` - Get player details - `GET /api/players/{id}/stats/{year}` - Get player yearly stats ### Tournaments - `GET /api/tournaments/` - List tournaments - `GET /api/tournaments/{id}` - Get tournament details ### Tournament Engine - `POST /api/tournament-engine/create` - Create a tournament - `POST /api/tournament-engine/{id}/register` - Register a player - `POST /api/tournament-engine/{id}/draw` - Perform tournament draw - `POST /api/tournament-engine/{id}/simulate-round` - Simulate a round - `POST /api/tournament-engine/{id}/simulate-all` - Simulate entire tournament - `GET /api/tournament-engine/{id}/results` - Get tournament results - `POST /api/tournament-engine/{id}/settle` - Settle tournament (points, gold, injuries) ### Matches - `POST /api/matches/simulate` - Fast match simulation - `POST /api/matches/slow/start` - Start slow simulation - `POST /api/matches/slow/{id}/point` - Next point in slow sim - `POST /api/matches/slow/{id}/tactical` - Set tactical instruction ## Development ### Git Workflow - `master` - Stable baseline (do not commit directly) - `agent/backend` - Backend development - `feature/frontend` - Frontend development ### Running Tests Backend: ```bash cd backend .venv/bin/pytest ``` Frontend: ```bash cd frontend npm run lint ``` ## License MIT