How aniketcore/sih-app works
SIH App supports student profile onboarding and team formation, with authenticated team creation, invitations, membership changes, and an administrative view of users and teams. The main flow is sign-in, profile sync, profile completion, then team operations through the client store and API routes into D1. The README documents rate limiting, freeze controls, and FCFS functionality; the source index also identifies admin, problem-statement, and FCFS modules. Some UI-to-API links are documented rather than visible in sampled call sites.
Main entry points: team-store.ts Client team store · db.ts Auth and DB helpers · page.tsx Profile page · auth.ts Auth and sync
Components 25
User experience
- Sign-in page
app/login/page.tsx - Profile page
app/page.tsx - Team dashboard route
app/team/page.tsx - Auth dashboard
components/auth-panel.tsx
Identity and profiles
- Profile dialogs
components/profile-modal.tsx - Profile editor
components/edit-profile-modal.tsx - Auth and sync
lib/auth.ts - Firebase client
lib/firebase.ts
Team lifecycle
- Team board
components/team-board.tsx - Client team store
lib/team-store.ts - Email normalization
lib/invite-state.ts
Administration and FCFS
- Admin console
app/admin/page.tsx - Problem statements
lib/problem-statements.ts - FCFS claim UI
components/fcfs-card.tsx
API and persistence
- Team API
app/api/teams/route.ts - Invitations API
app/api/invites/route.ts - Users API
app/api/users/route.ts - Auth and DB helpers
app/api/db.ts - Cloudflare D1
- Admin API
app/api/admin/route.ts - FCFS API
app/api/fcfs/route.ts
Other components
- Student
- Administrator
- Google identity lookup
- Firebase Auth
Connections 42
- Student → Sign-in page: opens
README.md - Sign-in page → Auth and sync: signs in
app/login/page.tsx - Auth and sync → Firebase client: uses client
lib/auth.ts - Firebase client → Firebase Auth: initializes
lib/firebase.ts - Auth and sync → Client team store: syncs user
lib/auth.ts - Client team store → Users API: syncs profile
README.md - Student → Profile page: opens
README.md - Profile page → Auth and sync: observes session
app/page.tsx - Profile page → Client team store: loads profile
app/page.tsx - Profile page → Profile dialogs: renders onboarding
app/page.tsx - Profile page → Profile editor: renders editor
app/page.tsx - Profile dialogs → Client team store: saves profile
components/profile-modal.tsx - Profile editor → Client team store: updates profile
components/edit-profile-modal.tsx - Student → Team dashboard route: opens
README.md - Team dashboard route → Auth dashboard: renders
app/team/page.tsx - Auth dashboard → Auth and sync: observes session
components/auth-panel.tsx - Auth dashboard → Client team store: loads status
components/auth-panel.tsx - Auth dashboard → Team board: renders
components/auth-panel.tsx - Team board → Client team store: manages teams
components/team-board.tsx - Client team store → Team API: requests team operations
README.md - Client team store → Invitations API: requests invite operations
README.md - Team API → Auth and DB helpers: uses helpers
app/api/teams/route.ts - Invitations API → Auth and DB helpers: uses helpers
app/api/invites/route.ts - Users API → Auth and DB helpers: uses helpers
app/api/users/route.ts - Invitations API → Email normalization: normalizes email
app/api/invites/route.ts - Team API → Email normalization: normalizes email
app/api/teams/route.ts - Client team store → Email normalization: normalizes email
lib/team-store.ts - Auth and DB helpers → Google identity lookup: verifies tokens
app/api/db.ts - Auth and DB helpers → Cloudflare D1: queries and migrates
README.md - Team API → Cloudflare D1: reads and writes teams
README.md - Invitations API → Cloudflare D1: reads and writes invites
app/api/invites/route.ts - Users API → Cloudflare D1: upserts users
README.md - Administrator → Admin console: uses
README.md - Admin console → Auth and sync: checks session
app/admin/page.tsx - Admin console → Client team store: loads team data
app/admin/page.tsx - Admin console → Problem statements: uses catalog
app/admin/page.tsx - Admin API → Auth and DB helpers: uses helpers
app/api/admin/route.ts - Admin console → Admin API: requests admin operations
- Profile page → FCFS claim UI: shows claim UI
app/page.tsx - FCFS claim UI → Problem statements: uses catalog
components/fcfs-card.tsx - FCFS claim UI → FCFS API: claims through
- FCFS API → Auth and DB helpers: uses helpers
app/api/fcfs/route.ts