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
|
## Live URLs
|
||||||
- **App:** http://servesync-demo.juankibin.space (domain)
|
- **App:** http://192.168.1.167:8092
|
||||||
- **Direct:** http://192.168.1.167:8092
|
- **API Docs:** http://192.168.1.167:8092/api/docs
|
||||||
- **API Docs:** http://192.168.1.167:8092/api/docs (if enabled)
|
|
||||||
- **Gitea:** http://192.168.1.159:3000/kibin/servesync-demo
|
- **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)
|
## Architecture
|
||||||
- `/api/players/` — Player profiles, ELO ratings, membership tiers
|
- Backend: FastAPI + PostgreSQL + Redis + WebSocket
|
||||||
- `/api/courts/` — Court management, booking, availability
|
- Frontend: Vue 3 + Vite + Tailwind CSS + Pinia
|
||||||
- `/api/matches/` — Full matchmaking system (open + skill-based)
|
- Nginx: reverse proxy (baked Dockerfile, no bind mounts)
|
||||||
- `/api/tournaments/` — Double elimination tournament engine
|
- Deploy: Gitea push → Coolify CI/CD auto-deploy
|
||||||
- `/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`
|
|
||||||
|
|
||||||
### Frontend (Vue 3 + Tailwind)
|
## Features Built
|
||||||
- `/` 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)
|
|
||||||
|
|
||||||
### Seed Data
|
### Feature 1: Player Management `/players`
|
||||||
- 12 demo players (Bronze→Elite, 850-1850 ELO)
|
- Add new player (name, contact, skill level: Beginner/Intermediate/Advanced/Elite)
|
||||||
- 4 courts (2x Sport Court, 2x Cushioned Tournament Grade)
|
- Edit player profile + skill
|
||||||
- 3 active matches (Open, Skill-Based, Tournament)
|
- View player list with stats (matches played, W/L, current ELO)
|
||||||
- 2 lobby matches
|
- Delete player
|
||||||
- 1 in-progress tournament with full bracket
|
- Table sorted by ELO descending
|
||||||
|
|
||||||
## Matchmaking Implementation
|
### Feature 2: Court Reservation `/courts`
|
||||||
- **Stage 1 Open:** Free join, no restrictions
|
- View all 4 courts with status (Available/In Use/Reserved/Maintenance)
|
||||||
- **Stage 2 Skill-Based:** ELO ±200 constraint enforced
|
- Manual status override (4 quick buttons per court)
|
||||||
- **Stage 3 Tournament:** Double elimination, winners/losers brackets, Grand Final
|
- Reserve a court: group name, start/end time, notes
|
||||||
- Auto-assigns available court when match starts
|
- Delete reservation
|
||||||
- ELO updates calculated via standard K=32 formula
|
- 2-column grid layout
|
||||||
|
|
||||||
## Re-seeding
|
### Feature 3: Match Event Builder `/events/new` (3-step wizard)
|
||||||
If data gets stale or needs refresh:
|
**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
|
```bash
|
||||||
curl -X POST http://192.168.1.167:8092/api/admin/seed
|
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