How saurav-karki1/npl-hub-nepal works
NPL Hub Nepal is a cricket-tournament information site with an admin console for maintaining match, news, player, team, and statistics data. Visitors browse schedules, standings, team/player profiles, news, and season statistics; the homepage assembles featured content from repositories. Admins authenticate, edit domain records in the console, and use admin API routes backed by a server-only Supabase client. The graph preserves these product areas, but many public routes and integrations are unsampled; their links are omitted where the available evidence does not establish calls.
Main entry points: matches.ts Match repository · client.ts Public Supabase client · page.tsx Homepage · admin Admin console
Components 25
Public experience
- Homepage
src/app/page.tsx - Schedules & matches
src/components/schedule - Points table
src/components/points-table - Team profiles
src/app/teams - Player profiles
src/app/players - News
src/app/news - Season statistics
src/components/stats/StatsHubClient.tsx - Homepage updates
src/components/home/LatestUpdatesSection.tsx - Featured match
src/components/home/UpcomingMatchSection.tsx - Standings preview
src/components/home/PointsTablePreview.tsx
Tournament data
- Team reference data
src/lib/data/teams-data.ts - Player reference data
src/lib/data/players-data.ts - Schedule reference data
src/lib/data/schedule-data.ts - Match repository
src/lib/repository/matches.ts - Team repository
src/lib/repository/teams.ts - News repository
src/lib/repository/news.ts - Statistics repository
src/lib/repository/stats.ts
Administration
- Admin console
src/app/admin - Admin authentication
src/lib/auth/admin-auth-context.tsx - Admin API routes
src/app/api/admin
Data infrastructure
- Public Supabase client
src/lib/supabase/client.ts - Service-role client
src/lib/supabase/server.ts - Supabase
Other components
- Visitor
- Administrator
Connections 23
- Visitor → Homepage: browses
- Homepage → Homepage updates: renders
src/app/page.tsx - Homepage → Featured match: renders
src/app/page.tsx - Homepage → Standings preview: renders
src/app/page.tsx - Homepage updates → News repository: loads news
src/components/home/LatestUpdatesSection.tsx - Featured match → Match repository: loads matches
src/components/home/UpcomingMatchSection.tsx - Standings preview → Match repository: loads standings
src/components/home/PointsTablePreview.tsx - Schedules & matches → Match repository: loads fixtures
src/components/schedule/FullFixturesSection.tsx - Points table → Match repository: loads table
- Match repository → Public Supabase client: queries
src/lib/repository/matches.ts - Match repository → Schedule reference data: falls back to
src/lib/repository/matches.ts - Team repository → Public Supabase client: queries
src/lib/repository/teams.ts - Team repository → Team reference data: uses fallback
src/lib/repository/teams.ts - Statistics repository → Public Supabase client: queries
src/lib/repository/stats.ts - Statistics repository → Team repository: uses
src/lib/repository/stats.ts - Player profiles → Player reference data: uses reference data
- Administrator → Admin console: manages content
- Admin console → Admin authentication: authenticates with
src/app/admin/matches/page.tsx - Admin authentication → Public Supabase client: manages session
src/lib/auth/admin-auth-context.tsx - Admin console → Admin API routes: requests admin data
- Admin API routes → Service-role client: creates client
src/app/api/admin/matches/route.ts - Public Supabase client → Supabase: queries
- Service-role client → Supabase: admin access