Cookoff is CodeChef-VIT's flagship competitive programming event that brings together programmers for an intense competitive coding experience. This repository contains the Admin Portal for Cookoff 11.0 β the central interface for managing participants, questions, testcases, rounds, leaderboards, timers, and contest communication.
The Cookoff 11.0 Admin Portal is deployed at:
Replace the URL above if the production deployment uses a different domain.
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS
- TanStack Query
- Axios
- Zod
- React Hook Form
- Firebase
- Radix UI
- Framer Motion
- Recharts
- Zustand
- Vitest
- Testing Library
- Google-based admin authentication.
- Protected admin routes through
AuthGuard. - Cookie-based authentication handled by the backend.
- Backend session validation for protected operations.
- Admin dashboard with contest analytics.
- Participant statistics and contest information.
- Notification sending interface.
- Visual analytics powered by Recharts.
- View and manage registered participants.
- Searchable user listings.
- Ban and unban participants.
- Promote participants to the next round.
- Bulk round promotion.
- Create, view, update, and delete questions.
- Manage question metadata.
- Configure questions for different contest rounds.
- Manage visual blocks and visual solutions for visual questions.
- Create testcases for questions.
- View public testcases.
- Update existing testcases.
- Delete testcases.
- Manage testcases on a per-question basis.
- View the current contest timer.
- Start rounds.
- Stop/reset round state.
- Set contest time.
- Add or update remaining time.
- Enable rounds from the admin portal.
- View participant rankings.
- Display scores and rank ordering.
- Monitor participant performance during the contest.
- Send notifications to participants through the admin portal.
- Communicate important contest updates directly to users.
- Node.js
- pnpm
- A running Cookoff 11.0 backend
git clone -b main https://github.com/CodeChefVIT/cookoff-admin-11.0.git
cd cookoff-admin-11.0pnpm installCreate a .env.local file:
cp example.env .env.localConfigure the backend API:
NEXT_PUBLIC_API_URL=http://localhost:8080The application also uses Firebase configuration variables:
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=pnpm devThe development server runs on port 3067 as configured in the project.
pnpm build
pnpm startcookoff-admin-11.0/
βββ src/
β βββ app/
β β βββ (protected)/
β β β βββ dashboard/
β β β βββ leaderboard/
β β β βββ question/
β β β βββ timer/
β β β βββ users/
β β βββ layout.tsx
β β βββ page.tsx
β β
β βββ api/
β β βββ adminDashboard.ts
β β βββ client.ts
β β βββ questions.ts
β β βββ testcases.ts
β β βββ timer.ts
β β βββ users.ts
β β
β βββ components/
β β βββ Analytics.tsx
β β βββ NotificationsSender.tsx
β β βββ auth/
β β βββ providers/
β β βββ ui/
β β βββ Table/
β β
β βββ hooks/
β βββ lib/
β βββ schemas/
β βββ stores/
β βββ styles/
β βββ test/
β βββ types/
β βββ utils/
β
βββ public/
βββ example.env
βββ next.config.js
βββ package.json
βββ pnpm-lock.yaml
βββ tsconfig.json
βββ vitest.config.ts
βββ README.md
βββ AGENTS.md
The admin portal communicates with the Cookoff 11.0 backend through the API client in src/api/client.ts.
Major endpoints include:
GET /admin/session
Google authentication is initiated through:
/api/v1/auth/google?portal=admin
GET /admin/users
POST /admin/users/:id/ban
POST /admin/users/:id/unban
POST /admin/users/:id/upgrade
POST /admin/users/upgrade-all
GET /admin/leaderboard
GET /question
POST /question
GET /question/:id
PUT /question/:id
DELETE /question/:id
POST /question/:questionId/blocks
DELETE /question/blocks/:blockId
POST /question/:questionId/solutions
DELETE /question/solutions/:solutionId
POST /testcase
GET /question/:id/testcases
GET /question/:id/testcases/public
PUT /testcase/:id
DELETE /testcase/:id
GET /getTime
POST /admin/setTime
POST /admin/updateTime
POST /admin/resetRound
POST /admin/startRound
POST /round/enable
The application is organized around protected admin routes:
/
βββ dashboard
βββ leaderboard
βββ users
βββ question
βββ timer
/β Admin login and authentication entry point./dashboardβ Contest analytics and notifications./leaderboardβ Participant rankings./usersβ Participant management./questionβ Question and testcase administration./timerβ Contest and round timing controls.
All protected routes are guarded through the application's authentication layer and depend on a valid backend session.
pnpm dev # Start development server
pnpm build # Create production build
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm pretty # Format files with Prettier
pnpm format:check # Check formatting
pnpm type-check # Run TypeScript checks
pnpm test # Run Vitest tests- Fork the repository.
- Create a feature branch:
git checkout -b feat/<scope>-<short-description>- Make your changes.
- Run the project's checks:
pnpm lint
pnpm type-check
pnpm format:check
pnpm test- Commit your changes using a descriptive commit message:
git commit -m "feat: add bulk user promotion"- Push your branch and open a Pull Request.
For UI changes, include relevant screenshots in the Pull Request.
- Backend:
cookoff-11.0-be - Participant Portal:
cookoff-portal-11.0
These services work together to provide the complete Cookoff 11.0 contest infrastructure.
Distributed under the MIT License. See LICENSE for more information.
Made with β€οΈ by CodeChef-VIT