1// DraftMates.md
2// ---------------------------
3
4# DraftMates
5
6Private-group fantasy cricket platform — live auctions with exclusive player ownership, season-long play, and an AI fantasy coach.
7
8**TYPE:** Web Application
9**STATUS:** Live
10**LIVE:** https://draftmates.vercel.app
11**DEV:** http://localhost:3000
12**WORKSPACE:** ~/GitHub/draftmates
13**GITHUB:** nikanjuri/draftmates (private)
14
15---
16
17## FEATURES
18
19- Live league-scoped auctions with budget rules, admin controls, and Redis-backed bid locking
20- Exclusive player ownership — each IPL player belongs to at most one squad per league
21- Season-long fantasy with fixtures, matchweeks, lineup submission, and published scoring rules
22- Skipper — a persona-driven AI coach with a deterministic Select XI recommendation engine
23- Offline-first ball-by-ball Scorer for local leagues (event-sourced fold engine, sync queue)
24- Live scoring via SportMonks integration with ETag-based dashboard refresh
25- Multi-league membership with per-league auction state and player pools
26- Replacements tab for mid-season injury swaps
27
28---
29
30## TECHNOLOGIES
31
32- Next.js 16 (App Router)
33- TypeScript
34- Supabase (Postgres, Auth)
35- Redis (auction locking)
36- SportMonks Cricket API
37- Python (data tooling)
38
39---
40
41## NOTES
42
43DraftMates targets friends and private leagues, not mass-market contests: you build a mini-league, run an auction so each player is owned by at most one squad, then compete across the IPL season with your own rules and banter.
44
45### The auction
46
47The auction room is league-scoped and live — budget and cap rules, commissioner tooling, and Redis-backed locking to keep concurrent bids honest. New leagues seed their own player pool, and a Replacements tab handles injury swaps once the season is underway.
48
49### Season play
50
51The fantasy dashboard covers the full loop: fixtures and matchweeks, lineup submission, squads, Select XI, stats, and the scoring system. Live match data syncs from SportMonks with ETag-based refresh so dashboard payloads stay cheap. My Team includes a full IPL-season per-player stats table beyond just XI-selected matches.
52
53### Scorer
54
55An offline-first ball-by-ball scoring console for local leagues — event-sourced fold engine, single-writer lease, and sync queue — ships alongside the fantasy product (`/scorer`, `/scoreboard`).
56
57### Skipper
58
59Skipper is a persona-driven fantasy cricket coach backed by a deterministic Select XI recommendation engine — it explains its picks from real match and ownership data rather than hallucinating advice.