How lopes256/copa2026 works
Copa2026 is a World Cup match-management application: users review group fixtures and standings, enter or reset scores, then follow qualification into the knockout rounds and bracket. The React App coordinates API loading and score updates, while the backend exposes team, match, and standings endpoints backed by a database. Knockout qualification and round advancement are computed in frontend domain logic. The README describes only a Vite template; feature scope is inferred from the sampled source and repository tree, so unsampled route behavior is not expanded.
Main entry points: App.tsx App Coordinator · server.ts Express Server · GroupStage.tsx Group Stage View · db.ts Database Client
Components 19
Frontend
- React Entry
src/main.tsx - App Coordinator
src/App.tsx - API Client
src/api/index.ts - Header
src/components/Header.tsx - Group Stage View
src/components/GroupStage.tsx - Match Card
src/components/MatchCard.tsx - Knockout View
src/components/KnockoutStage.tsx - Bracket View
src/components/Bracket.tsx
Tournament Logic
- Fixture Data
src/data/matches.ts - Team Data
src/data/teams.ts - Standings and Advancement
src/data/standings.ts - Tournament Types
src/types/index.ts
Backend API
- Express Server
backend/src/server.ts - Teams Endpoint
backend/src/routes/teams.ts - Matches Endpoint
backend/src/routes/matches.ts - Standings Endpoint
backend/src/routes/standings.ts
Persistence
- Database Client
backend/src/db.ts - Tournament Database
Other components
- Tournament Manager
Connections 22
- Tournament Manager → App Coordinator: uses
- React Entry → App Coordinator: renders
- App Coordinator → Header: renders
- App Coordinator → API Client: loads and updates
- API Client → Express Server: HTTP requests
- Express Server → Teams Endpoint: dispatches
- Express Server → Matches Endpoint: dispatches
- Express Server → Standings Endpoint: dispatches
- Teams Endpoint → Database Client: queries
- Matches Endpoint → Database Client: queries and updates
- Standings Endpoint → Database Client: queries
- Database Client → Tournament Database: reads and writes
- App Coordinator → Group Stage View: renders
- App Coordinator → Knockout View: renders
- App Coordinator → Bracket View: renders
- Group Stage View → Match Card: renders
- Group Stage View → Team Data: reads
- Knockout View → Team Data: reads
- App Coordinator → Standings and Advancement: calculates and advances
- App Coordinator → Group Stage View: passes matches and standings
- App Coordinator → Knockout View: passes knockout matches
- App Coordinator → Bracket View: passes computed bracket