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