docs: update PROGRESS.md with v2 complete build info
This commit is contained in:
168
PROGRESS.md
168
PROGRESS.md
@@ -1,53 +1,141 @@
|
||||
# ServeSync Demo — Build Complete ✅
|
||||
# ServeSync Demo — Court Manager Dashboard v2 🏓
|
||||
|
||||
**Completed by Forge on 2026-03-19**
|
||||
**Rebuilt by Nemo on 2026-03-19**
|
||||
|
||||
## Live URLs
|
||||
- **App:** http://servesync-demo.juankibin.space (domain)
|
||||
- **Direct:** http://192.168.1.167:8092
|
||||
- **API Docs:** http://192.168.1.167:8092/api/docs (if enabled)
|
||||
- **App:** http://192.168.1.167:8092
|
||||
- **API Docs:** http://192.168.1.167:8092/api/docs
|
||||
- **Gitea:** http://192.168.1.159:3000/kibin/servesync-demo
|
||||
|
||||
## What's Built
|
||||
## What Changed (v2 Rebuild)
|
||||
Complete rewrite from player-facing app to **single Court Manager dashboard**.
|
||||
|
||||
### Backend (FastAPI + PostgreSQL + Redis)
|
||||
- `/api/players/` — Player profiles, ELO ratings, membership tiers
|
||||
- `/api/courts/` — Court management, booking, availability
|
||||
- `/api/matches/` — Full matchmaking system (open + skill-based)
|
||||
- `/api/tournaments/` — Double elimination tournament engine
|
||||
- `/api/screen/` — TV display API with real-time data
|
||||
- `/api/admin/seed` — POST to re-seed demo data
|
||||
- WebSocket endpoints: `/ws/court/{id}`, `/ws/overview`, `/ws/matches`
|
||||
## Architecture
|
||||
- Backend: FastAPI + PostgreSQL + Redis + WebSocket
|
||||
- Frontend: Vue 3 + Vite + Tailwind CSS + Pinia
|
||||
- Nginx: reverse proxy (baked Dockerfile, no bind mounts)
|
||||
- Deploy: Gitea push → Coolify CI/CD auto-deploy
|
||||
|
||||
### Frontend (Vue 3 + Tailwind)
|
||||
- `/` Dashboard — Live court grid, leaderboard, tournament summary, quick actions
|
||||
- `/courts` — Court booking with time slot selection
|
||||
- `/matchmaking` — Stage 1 Open + Stage 2 Skill-Based lobby
|
||||
- `/tournament` — Full double elimination bracket viewer with score entry
|
||||
- `/players` — Player directory with tier/ELO display
|
||||
- `/screen/:courtId` — TV display mode (court 1-4 or overview)
|
||||
## Features Built
|
||||
|
||||
### Seed Data
|
||||
- 12 demo players (Bronze→Elite, 850-1850 ELO)
|
||||
- 4 courts (2x Sport Court, 2x Cushioned Tournament Grade)
|
||||
- 3 active matches (Open, Skill-Based, Tournament)
|
||||
- 2 lobby matches
|
||||
- 1 in-progress tournament with full bracket
|
||||
### Feature 1: Player Management `/players`
|
||||
- Add new player (name, contact, skill level: Beginner/Intermediate/Advanced/Elite)
|
||||
- Edit player profile + skill
|
||||
- View player list with stats (matches played, W/L, current ELO)
|
||||
- Delete player
|
||||
- Table sorted by ELO descending
|
||||
|
||||
## Matchmaking Implementation
|
||||
- **Stage 1 Open:** Free join, no restrictions
|
||||
- **Stage 2 Skill-Based:** ELO ±200 constraint enforced
|
||||
- **Stage 3 Tournament:** Double elimination, winners/losers brackets, Grand Final
|
||||
- Auto-assigns available court when match starts
|
||||
- ELO updates calculated via standard K=32 formula
|
||||
### Feature 2: Court Reservation `/courts`
|
||||
- View all 4 courts with status (Available/In Use/Reserved/Maintenance)
|
||||
- Manual status override (4 quick buttons per court)
|
||||
- Reserve a court: group name, start/end time, notes
|
||||
- Delete reservation
|
||||
- 2-column grid layout
|
||||
|
||||
## Re-seeding
|
||||
If data gets stale or needs refresh:
|
||||
### Feature 3: Match Event Builder `/events/new` (3-step wizard)
|
||||
**Step 1 — Event Setup:**
|
||||
- Event name
|
||||
- Format toggle: Singles / Doubles
|
||||
- Courts count input
|
||||
- Player selection from roster (multi-select)
|
||||
- Real-time stage calculation preview:
|
||||
- Teams count, suggested stages, elimination rounds
|
||||
- Auto-updates stage config suggestions
|
||||
|
||||
**Step 2 — Stage Configurator:**
|
||||
- Auto-generated stage cards based on calculation
|
||||
- Editable: name, match type, rounds, advance count
|
||||
- Add/remove stages
|
||||
- Match types: Open Match, Skill-Based, Round Robin, Tournament
|
||||
|
||||
**Step 3 — Done!**
|
||||
- Creates event → adds players → creates stages → generates brackets
|
||||
- Redirects to event control panel
|
||||
|
||||
### Feature 4: Live Court View `/` (Main Dashboard)
|
||||
- 2×2 court grid with real-time status
|
||||
- Each court: name, type, status badge, current match, score, elapsed time
|
||||
- Inline score entry from dashboard
|
||||
- Start queued matches from "Upcoming" panel
|
||||
- Active event banner with quick link
|
||||
- 5-second auto-refresh
|
||||
|
||||
### Event Control Panel `/events/:id`
|
||||
- Stage tabs (pending/active/completed)
|
||||
- Matches listed by round with status
|
||||
- Enter score → auto-advances bracket (places winner in next match)
|
||||
- Start match → auto-assigns available court
|
||||
- Manual court reassign
|
||||
- Player list sidebar
|
||||
- Bracket summary for tournament stages
|
||||
- Start/Complete event controls
|
||||
|
||||
### Screen View `/screen/:courtId`
|
||||
- Full-screen TV display (no nav bar)
|
||||
- Giant player names and score
|
||||
- Elapsed timer
|
||||
- Court status display
|
||||
- 3-second refresh
|
||||
- Bottom nav for court switching
|
||||
|
||||
## Backend API
|
||||
```
|
||||
GET /api/players/ List all players (sorted by ELO)
|
||||
POST /api/players/ Add player
|
||||
GET /api/players/:id Get player
|
||||
PUT /api/players/:id Update player
|
||||
DELETE /api/players/:id Delete player
|
||||
|
||||
GET /api/courts/ List all courts + reservations
|
||||
POST /api/courts/ Create court
|
||||
PATCH /api/courts/:id/status Update court status
|
||||
GET /api/courts/:id/reservations
|
||||
POST /api/courts/:id/reservations Create reservation
|
||||
DELETE /api/courts/reservations/:id
|
||||
|
||||
GET /api/events/ List all events
|
||||
POST /api/events/ Create event
|
||||
GET /api/events/calculate Stage calculation (GET with params)
|
||||
GET /api/events/:id Get full event detail (stages, matches, players)
|
||||
PUT /api/events/:id Update event
|
||||
POST /api/events/:id/players Add player to event
|
||||
DELETE /api/events/:id/players/:pid Remove player
|
||||
POST /api/events/:id/stages Add stage
|
||||
PUT /api/events/:id/stages/:sid Update stage
|
||||
POST /api/events/:id/stages/:sid/generate Generate matches
|
||||
POST /api/events/:id/start Start event (activates first stage)
|
||||
POST /api/events/:id/complete Mark event complete
|
||||
|
||||
GET /api/matches/:id Get match detail
|
||||
POST /api/matches/:id/start Start match (auto-assigns court)
|
||||
POST /api/matches/:id/score Enter score (auto-advances bracket, updates ELO)
|
||||
PATCH /api/matches/:id/court Assign/reassign court
|
||||
|
||||
GET /api/dashboard/ Live court view data
|
||||
GET /api/dashboard/screen/:id TV display data
|
||||
|
||||
POST /api/admin/seed Re-seed demo data
|
||||
|
||||
WS /ws/dashboard Dashboard WebSocket
|
||||
WS /ws/screen/:id Screen WebSocket
|
||||
```
|
||||
|
||||
## Seed Data
|
||||
- **8 Players:** Marco (Elite 1852), Ana (Advanced 1645), Carlos (Advanced 1583),
|
||||
Diana (Intermediate 1402), Lisa (Intermediate 1318), Tony (Intermediate 1281),
|
||||
Maria (Beginner 947), Jake (Beginner 883)
|
||||
- **4 Courts:** A, B (Sport Court Premium), C, D (Cushioned Tournament Grade)
|
||||
- **Court C & D:** In-use (live semifinal matches)
|
||||
- **Reservations:** Court A reserved today 2pm, Court B maintenance tomorrow
|
||||
- **Event 1:** "Spring Singles Open" — Completed, full bracket history
|
||||
- **Event 2:** "Summer Tournament" — Active, Round 2 semifinals in progress
|
||||
|
||||
## Coolify
|
||||
- App UUID: `ycw8wg8gk08gwcwc8wwwwww8`
|
||||
- CI/CD: Gitea push → auto-deploy
|
||||
- DB volume: `pgdata` (persistent)
|
||||
|
||||
## Re-seed
|
||||
```bash
|
||||
curl -X POST http://192.168.1.167:8092/api/admin/seed
|
||||
```
|
||||
|
||||
## Infrastructure
|
||||
- Coolify App UUID: ycw8wg8gk08gwcwc8wwwwww8
|
||||
- Gitea webhook CI/CD: Active (pushes trigger auto-deploy)
|
||||
- DB volume: `pgdata` (persistent across deployments)
|
||||
|
||||
Reference in New Issue
Block a user