How larabatista04/bolao-2026 works
Bolão is a football-prediction application: users authenticate, browse synchronized World Cup games, submit score predictions, and view personal or league rankings. The frontend routes authenticated users to dashboard, games, leagues, and ranking pages; its API client communicates with the Express backend. Backend controllers handle domain operations and persist through Prisma, while a football-data integration synchronizes match results and recalculates prediction points. The supplied excerpts and SOURCE INDEX support the internal calls shown; the frontend-to-backend HTTP connection is inferred and marked unverified.
Main entry points: App.tsx App routes · api.ts API client · index.ts Prisma client · app.ts Express API
Components 26
Web application
- App routes
frontend/src/App.tsx - Login and registration
frontend/src/pages/Login.tsx - Dashboard
frontend/src/pages/Dashboard.tsx - Games page
frontend/src/pages/Games.tsx - Leagues page
frontend/src/pages/Leagues.tsx - Ranking page
frontend/src/pages/Ranking.tsx - Auth state
frontend/src/stores/auth.store.ts - API client
frontend/src/services/api.ts
Backend API
- Express API
backend/src/app.ts - Auth routes
backend/src/routes/auth.routes.ts - Game routes
backend/src/routes/game.routes.ts - Prediction routes
backend/src/routes/prediction.routes.ts - Ranking routes
backend/src/routes/ranking.routes.ts - League routes
backend/src/routes/league.routes.ts - JWT middleware
backend/src/middlewares/auth.middleware.ts - Prisma client
backend/src/prisma/index.ts - Application database
backend/prisma/schema.prisma
Prediction features
- Authentication
backend/src/controllers/auth.controller.ts - Game operations
backend/src/controllers/game.controller.ts - Predictions
backend/src/controllers/prediction.controller.ts - Global ranking
backend/src/controllers/ranking.controller.ts - Leagues and ranking
backend/src/controllers/league.controller.ts
Football synchronization
- Sync job
backend/src/jobs/sync.job.ts - Match sync and scoring
backend/src/services/football.service.ts
Other components
- Player
- Football-data.org
Connections 42
- Player → App routes: uses
frontend/src/App.tsx - App routes → Login and registration: routes to
frontend/src/App.tsx - App routes → Dashboard: routes to
frontend/src/App.tsx - App routes → Games page: routes to
frontend/src/App.tsx - App routes → Leagues page: routes to
frontend/src/App.tsx - App routes → Ranking page: routes to
frontend/src/App.tsx - App routes → Auth state: checks auth
frontend/src/App.tsx - Login and registration → API client: calls
frontend/src/pages/Login.tsx - Login and registration → Auth state: updates
frontend/src/pages/Login.tsx - Dashboard → API client: calls
frontend/src/pages/Dashboard.tsx - Games page → API client: calls
frontend/src/pages/Games.tsx - Games page → Auth state: reads
frontend/src/pages/Games.tsx - Leagues page → API client: calls
frontend/src/pages/Leagues.tsx - Leagues page → Auth state: reads
frontend/src/pages/Leagues.tsx - Ranking page → API client: calls
frontend/src/pages/Ranking.tsx - Auth state → API client: checks session
frontend/src/stores/auth.store.ts - API client → Express API: HTTP requests
- Express API → Auth routes: mounts
backend/src/app.ts - Express API → Game routes: mounts
backend/src/app.ts - Express API → Prediction routes: mounts
backend/src/app.ts - Express API → Ranking routes: mounts
backend/src/app.ts - Express API → League routes: mounts
backend/src/app.ts - Auth routes → Authentication: dispatches
backend/src/routes/auth.routes.ts - Game routes → Game operations: dispatches
backend/src/routes/game.routes.ts - Prediction routes → Predictions: dispatches
backend/src/routes/prediction.routes.ts - Ranking routes → Global ranking: dispatches
backend/src/routes/ranking.routes.ts - League routes → Leagues and ranking: dispatches
backend/src/routes/league.routes.ts - Auth routes → JWT middleware: applies
backend/src/routes/auth.routes.ts - Game routes → JWT middleware: applies
backend/src/routes/game.routes.ts - Prediction routes → JWT middleware: applies
backend/src/routes/prediction.routes.ts - Ranking routes → JWT middleware: applies
backend/src/routes/ranking.routes.ts - League routes → JWT middleware: applies
backend/src/routes/league.routes.ts - Authentication → Prisma client: queries
backend/src/controllers/auth.controller.ts - Game operations → Prisma client: queries
backend/src/controllers/game.controller.ts - Game operations → Match sync and scoring: invokes sync
backend/src/controllers/game.controller.ts - Predictions → Prisma client: queries
backend/src/controllers/prediction.controller.ts - Global ranking → Prisma client: queries
backend/src/controllers/ranking.controller.ts - Leagues and ranking → Prisma client: queries
backend/src/controllers/league.controller.ts - Prisma client → Application database: accesses
backend/src/prisma/index.ts - Sync job → Match sync and scoring: runs sync
backend/src/jobs/sync.job.ts - Match sync and scoring → Football-data.org: fetches matches
backend/src/services/football.service.ts - Match sync and scoring → Prisma client: updates games and scores
backend/src/services/football.service.ts