How mgomez1023/mens-league-mvp works
Men’s League MVP is a league-management application: visitors and league staff use a React web app to view games, teams, rosters, standings, rules, posts, and photos; authenticated managers and admins can maintain league data. The web client calls a FastAPI service, which routes public, authentication, and administrative requests and persists domain records. Standings calculation and image handling are distinct backend responsibilities. The source index and excerpts establish the main routing and selected calls; some page and API-to-router relationships are documented rather than directly excerpted.
Main entry points: App.tsx App routing · main.py FastAPI application · admin.py Admin routes · models.py League models
Components 25
Web application
- App routing
apps/web/src/App.tsx - API client
apps/web/src/api.ts
League operations
- League home
apps/web/src/pages/HomePage.tsx - Games management
apps/web/src/pages/GamesPage.tsx - Team management
apps/web/src/pages/TeamsPage.tsx - Player rosters
apps/web/src/pages/RosterPage.tsx - Standings view
apps/web/src/pages/StandingsPage.tsx - Content pages
apps/web/src/pages - CSV import
apps/web/src/components/CsvImportModal.tsx - CSV processing
apps/web/src/utils/csvImport.ts - Game details
apps/web/src/components/GameDetailsDialog.tsx - Public game card
apps/web/src/components/PublicGameCard.tsx - League formatting
apps/web/src/utils/league.ts
API service
- FastAPI application
apps/api/app/main.py - Authentication routes
apps/api/app/routers/auth.py - Public routes
apps/api/app/routers/public.py - Admin routes
apps/api/app/routers/admin.py - Access control
apps/api/app/deps.py - Token security
apps/api/app/security.py
League data
- Standings engine
apps/api/app/standings.py - Image storage
apps/api/app/storage.py - League models
apps/api/app/models.py - Database sessions
apps/api/app/db.py - Runtime settings
apps/api/app/config.py
Other components
- League user
Connections 33
- League user → App routing: uses
- App routing → League home: routes to
apps/web/src/App.tsx - App routing → Games management: routes to
apps/web/src/App.tsx - App routing → Team management: routes to
apps/web/src/App.tsx - App routing → Player rosters: routes to
apps/web/src/App.tsx - App routing → Standings view: routes to
apps/web/src/App.tsx - App routing → Content pages: routes to
apps/web/src/App.tsx - Games management → API client: requests data
apps/web/src/pages/GamesPage.tsx - CSV import → CSV processing: processes import
apps/web/src/components/CsvImportModal.tsx - Games management → CSV import: opens import
apps/web/src/pages/GamesPage.tsx - Games management → Game details: shows details
apps/web/src/pages/GamesPage.tsx - Game details → League formatting: formats game
apps/web/src/components/GameDetailsDialog.tsx - Public game card → League formatting: formats game
apps/web/src/components/PublicGameCard.tsx - API client → FastAPI application: HTTP requests
README.md - FastAPI application → Authentication routes: registers routes
apps/api/app/main.py - FastAPI application → Admin routes: registers routes
apps/api/app/main.py - FastAPI application → Public routes: registers routes
apps/api/app/main.py - FastAPI application → Standings engine: uses calculations
apps/api/app/main.py - FastAPI application → Image storage: serves uploads
apps/api/app/main.py - Authentication routes → Access control: validates access
apps/api/app/routers/auth.py - Admin routes → Access control: checks permissions
apps/api/app/routers/admin.py - Public routes → Standings engine: requests rankings
apps/api/app/routers/public.py - Admin routes → Standings engine: updates rankings
apps/api/app/routers/admin.py - Admin routes → Image storage: handles images
apps/api/app/routers/admin.py - Public routes → Image storage: resolves images
apps/api/app/routers/public.py - Standings engine → League models: reads league data
apps/api/app/standings.py - Authentication routes → League models: loads users
apps/api/app/routers/auth.py - Admin routes → League models: manages records
apps/api/app/routers/admin.py - Public routes → League models: reads records
apps/api/app/routers/public.py - League models → Database sessions: maps tables
apps/api/app/models.py - Database sessions → Runtime settings: gets settings
apps/api/app/db.py - Access control → Runtime settings: uses JWT settings
apps/api/app/deps.py - Authentication routes → Token security: issues tokens
apps/api/app/routers/auth.py