How billie355/worldcup_project works
World Cup Prediction Platform lets users create accounts, submit match and tournament picks, and track points on leaderboards; profiles, player picks, share cards, and admin management support that core loop. Server actions mediate prediction, account, and administration work against Supabase. The graph preserves these documented-by-source capabilities, but several page and action implementations were not sampled, so their internal links are omitted rather than inferred.
Main entry points: server.ts Supabase clients · ProfileClient.tsx Profile and settings · MatchPredictionsClient.tsx Match predictions · auth.ts Authentication actions
Components 22
User experience
- Public landing
src/app/page.tsx - Sign-in and registration
src/app/login/page.tsx - OAuth callback
src/app/auth/callback/route.ts - Dashboard
src/app/(main)/dashboard/page.tsx - Leaderboard views
src/components/leaderboard/LeaderboardClient.tsx - Profile and settings
src/components/profile/ProfileClient.tsx - Share-card generation
src/lib/actions/share.ts - Shared card page
src/app/share/[id]/page.tsx
Prediction gameplay
- Match predictions
src/components/predictions/MatchPredictionsClient.tsx - Player picks
src/components/predictions/PlayerPicksSection.tsx - Tournament predictions
src/components/predictions/TournamentPredictionsClient.tsx - Prediction actions
src/lib/actions/predictions.ts - Player-pick actions
src/lib/actions/player-predictions.ts - Leaderboard queries
src/lib/actions/leaderboard.ts
Accounts and operations
- Authentication actions
src/lib/actions/auth.ts - Admin console
src/app/admin/page.tsx - Admin management clients
src/components/admin/AdminMatchesClient.tsx - Admin actions
src/lib/actions/admin.ts - Notification actions
src/lib/actions/notifications.ts
Data services
- Supabase clients
src/lib/supabase/server.ts - Supabase data store
Other components
- Visitors and users
Connections 33
- Visitors and users → Public landing: visit
- Public landing → Leaderboard queries: loads preview data
src/app/page.tsx - Public landing → Visitors and users: presents features
src/app/page.tsx - Visitors and users → Sign-in and registration: register or sign in
- Sign-in and registration → Authentication actions: submits credentials
src/app/login/page.tsx - Authentication actions → Supabase clients: creates session client
src/lib/actions/auth.ts - OAuth callback → Supabase clients: exchanges auth code
src/app/auth/callback/route.ts - Visitors and users → Dashboard: open dashboard
- Dashboard → Supabase clients: loads user data
src/app/(main)/dashboard/page.tsx - Dashboard → Prediction actions: loads predictions
src/app/(main)/dashboard/page.tsx - Visitors and users → Match predictions: submit match picks
- Match predictions → Prediction actions: submits match pick
src/components/predictions/MatchPredictionsClient.tsx - Match predictions → Player-pick actions: loads player picks
src/components/predictions/MatchPredictionsClient.tsx - Match predictions → Player picks: renders picks
src/components/predictions/MatchPredictionsClient.tsx - Player picks → Player-pick actions: saves player picks
src/components/predictions/PlayerPicksSection.tsx - Visitors and users → Tournament predictions: submit tournament picks
- Tournament predictions → Prediction actions: loads and saves picks
src/components/predictions/TournamentPredictionsClient.tsx - Visitors and users → Leaderboard views: view rankings
- Leaderboard views → Leaderboard queries: loads rankings
src/components/leaderboard/LeaderboardClient.tsx - Visitors and users → Profile and settings: manage profile
- Profile and settings → Authentication actions: updates account
src/components/profile/ProfileClient.tsx - Profile and settings → Share-card generation: generates share card
src/components/profile/ProfileClient.tsx - Profile and settings → Notification actions: manages notifications
src/components/profile/ProfileClient.tsx - Visitors and users → Shared card page: open shared card
- Visitors and users → Admin console: manage tournament
- Admin console → Supabase clients: loads admin data
src/app/admin/page.tsx - Admin management clients → Admin actions: invokes management actions
src/components/admin/AdminMatchesClient.tsx - Admin actions → Supabase clients: checks roles and manages records
src/lib/actions/admin.ts - Prediction actions → Supabase clients: reads and writes picks
src/lib/actions/predictions.ts - Player-pick actions → Supabase clients: reads and writes picks
src/lib/actions/player-predictions.ts - Leaderboard queries → Supabase clients: queries rankings
src/lib/actions/leaderboard.ts - Authentication actions → Supabase clients: authenticates and updates profiles
src/lib/actions/auth.ts - Supabase clients → Supabase data store: accesses data store