Static snapshot of the in-app /tech page
(admin-only inside the app) as of April 2026. Public marketing site is at
thefantasticleagues.com.
Fantastic Leagues · Tech / Under the hood · Last Updated
How the whole thing is built.
Six months, 62 development sessions, 730 passing tests. The Fantastic
Leagues is a fantasy baseball platform with live auction WebSockets, 8 AI
features, and 15 years of historical league data imported from Excel.
By the numbers
84,400+total lines of code
26feature modules
49database models
228API route handlers
730tests passing
470+git commits
62build sessions
8AI-powered features
Splits: 44,500 lines client-side (React + Vite),
39,900 server-side (Express + Prisma),
1,370 MCP server. Test coverage:
12,900+ lines of tests (473 server + 187 client + 50 MCP = 730 passing).
Database schema: 1,131 lines across 15 migrations.
Architecture
Browser (React + Vite) ──REST /api/*──▶ Express API (:4010)
──ws://auction─▶ WebSocket
──Session tokens─▶ Supabase Auth
API ──Prisma ORM──▶ PostgreSQL (Supabase)
API ──JWT verify──▶ Supabase Auth
API ──Player data──▶ MLB Stats API
API ──Shared cache──▶ MCP MLB Proxy (SQLite)
API ──AI analysis──▶ Google Gemini 2.5 Flash
API ──AI fallback──▶ Anthropic Claude Sonnet 4
API ──Invite emails──▶ Resend
MCP ──Cached requests──▶ MLB Stats API
WS ──Auction state──▶ API
Each module follows an identical pattern: actions/, components/, types/, schemas/, store/, index.ts barrel. Both client and server mirror the same 26-module split.
auth — login, signup, password reset, Google OAuth