How hellopalak/code_rash works
CODE_RASH is a browser-based contest platform with participant, evaluator, and admin routes. Participants sign in, use the dashboard to enter the active round, and submit round work; shared contest state governs round progression. Admins manage contest settings and user records, while evaluator functionality is present as a separate route. The excerpts show client-side Firebase access and a server endpoint for creating accounts. Several routes are represented from the source index, so their internal behavior is not inferred beyond those references.
Main entry points: firebase.ts Firebase client setup · dashboard/page.tsx Contest dashboard · ContestContext.tsx Round coordination · admin/page.tsx Contest admin
Components 18
Participant experience
- Sign in
src/app/login/page.tsx - Contest dashboard
src/app/dashboard/page.tsx - Evaluator route
src/app/evaluator/page.tsx
Contest runtime
- Round 1
src/app/round1/page.tsx - Round 2
src/app/round2/page.tsx - Round 3
src/app/round3/page.tsx - Round 4
src/app/round4/page.tsx - Round coordination
src/context/ContestContext.tsx - Question bank
src/lib/questions.ts - Anti-cheat guard
src/components/AntiCheatGuard.tsx
Administration
- Contest admin
src/app/admin/page.tsx - Create accounts API
src/app/api/admin/create-users/route.ts - Role allowlist
src/lib/allowlist.ts
Firebase platform
- Firebase client setup
src/lib/firebase.ts - Firebase Admin setup
src/lib/firebase-admin.ts - Firestore
- Firebase Auth
Other components
- Participant
Connections 32
- Participant → Sign in: signs in
src/app/login/page.tsx - Sign in → Role allowlist: checks role
src/app/login/page.tsx - Sign in → Firebase client setup: uses client
src/app/login/page.tsx - Contest dashboard → Round 1: links to
src/app/dashboard/page.tsx - Contest dashboard → Round 2: links to
src/app/dashboard/page.tsx - Contest dashboard → Round 3: links to
src/app/dashboard/page.tsx - Contest dashboard → Round 4: links to
src/app/dashboard/page.tsx - Contest dashboard → Round coordination: reads round state
src/app/dashboard/page.tsx - Contest dashboard → Anti-cheat guard: renders guard
src/app/dashboard/page.tsx - Round 1 → Question bank: loads defaults
src/app/round1/page.tsx - Round 3 → Question bank: loads defaults
src/app/round3/page.tsx - Round 1 → Anti-cheat guard: renders guard
src/app/round1/page.tsx - Round 3 → Anti-cheat guard: renders guard
src/app/round3/page.tsx - Round 1 → Firebase client setup: reads and saves
src/app/round1/page.tsx - Round 3 → Firebase client setup: reads and saves
src/app/round3/page.tsx - Round 2 → Firebase client setup: uses client
src/app/round2/page.tsx - Round 2 → Round coordination: uses context
src/app/round2/page.tsx - Round 4 → Firebase client setup: uses client
src/app/round4/page.tsx - Round 4 → Round coordination: uses context
src/app/round4/page.tsx - Round coordination → Firebase client setup: uses client
src/context/ContestContext.tsx - Anti-cheat guard → Firebase client setup: records warnings
src/components/AntiCheatGuard.tsx - Role allowlist → Firebase client setup: checks Firestore
src/lib/allowlist.ts - Contest admin → Role allowlist: checks admin role
src/app/admin/page.tsx - Contest admin → Question bank: seeds questions
src/app/admin/page.tsx - Contest admin → Firebase client setup: manages contest data
src/app/admin/page.tsx - Contest admin → Round coordination: resets contest
src/app/admin/page.tsx - Contest admin → Create accounts API: creates accounts
- Create accounts API → Firebase Admin setup: gets admin auth
src/app/api/admin/create-users/route.ts - Create accounts API → Firebase Auth: creates users
src/app/api/admin/create-users/route.ts - Contest dashboard → Firestore: reads and updates users
src/app/dashboard/page.tsx - Round coordination → Firestore: writes contest state
src/context/ContestContext.tsx - Firebase client setup → Firestore: initializes client
src/lib/firebase.ts