The official participant portal for CookOff 11.0, the 11th edition of CodeChef-VIT's premier competitive programming contest. The platform provides participants with a seamless contest experience, from authentication and round progression to problem solving, code execution, submissions, and real-time result tracking.
The CookOff 11.0 participant portal is deployed and accessible at:
https://cookoff.codechefvit.com/
The portal is built using a modern and scalable web stack:
- Framework: Next.js 16
- Language: TypeScript
- UI: React 19
- Styling: Tailwind CSS
- State Management: Zustand
- Server State: TanStack Query
- Code Editor: Monaco Editor
- Drag & Drop: dnd-kit
- HTTP Client: Axios
- Validation: Zod
- Animations: Framer Motion
- URL State: nuqs
- Notifications: Sonner
- Testing: Vitest + Testing Library
- Google OAuth-based participant authentication.
- Secure session handling through the backend.
- Automatic redirection between authentication and protected contest routes.
- Participant session information.
- Current score and contest progress.
- Round availability and progression.
- Contest state retrieved directly from the backend.
CookOff 11.0 consists of multiple rounds with different problem-solving formats.
- Round 1: Visual/block-based programming questions.
- Round 2: Competitive programming problems with an integrated code editor.
- Round 3: Competitive programming problems with an integrated code editor.
- Round access is controlled through contest state and round gating.
Round 1 introduces a block-based problem-solving interface:
- Drag-and-drop programming blocks.
- Block chain construction.
- Dynamic visual question interaction.
- Submission of constructed solutions to the backend.
Rounds 2 and 3 provide an integrated coding environment powered by Monaco Editor.
- Syntax highlighting.
- Multiple programming languages.
- Code persistence while solving questions.
- Custom input execution.
- Public testcase execution.
- Compilation and execution feedback.
- Submit solutions directly from the contest portal.
- Backend-powered judging.
- Submission status tracking.
- Result polling for submitted solutions.
- Compiler and testcase feedback.
Participants can test their solutions before submitting:
- Execute code against custom input.
- Run against public testcases.
- View execution results directly inside the portal.
- Contest timing is synchronized with the backend.
- Countdown information is retrieved from the contest server.
- Contest state is reflected throughout the participant interface.
Important participant state is persisted locally, including:
- Code drafts.
- Selected languages.
- Custom input.
- Question-specific progress.
This allows participants to recover their work after refreshing the page.
The CookOff 11.0 portal is built using the Next.js App Router and follows a component-based architecture.
The application is broadly divided into:
- App Routes β Authentication, dashboard, rounds and question pages.
- API Layer β Centralized communication with the CookOff backend.
- Components β Reusable UI and contest-specific components.
- Hooks β Reusable client-side logic.
- Stores β Global client-side state using Zustand.
- Schemas β Runtime validation using Zod.
- Types β Shared TypeScript types.
- Utilities β Common helper functions.
src/
βββ app/
β βββ (auth)/
β β βββ login/
β βββ (protected)/
β β βββ dashboard/
β β βββ round/
β β βββ loading.tsx
β βββ layout.tsx
β βββ page.tsx
β βββ not-found.tsx
β
βββ api/
β βββ attempts.ts
β βββ blocks.ts
β βββ client.ts
β βββ questions.ts
β βββ session.ts
β βββ submissions.ts
β βββ testcases.ts
β βββ timer.ts
β βββ visual-submissions.ts
β βββ wire.ts
β
βββ components/
βββ constants/
βββ hooks/
βββ lib/
βββ schemas/
βββ stores/
βββ styles/
βββ test/
βββ types/
βββ utils/
The participant portal communicates with a separate backend service responsible for authentication, contest state, questions, submissions and judging.
The backend URL is configured through:
NEXT_PUBLIC_API_URL=The frontend communicates with APIs including:
GET /dashboard
POST /logout
GET /question/round
GET /question/:id
GET /question/:id/blocks
POST /submit
GET /result/:id
POST /runcode
POST /runcustom
GET /getTime
POST /submit/visual
The authentication flow begins through:
/auth/google
The backend handles Google OAuth and establishes the participant session before redirecting the user back to the portal.
Make sure you have the following installed:
- Node.js
- pnpm
- A running CookOff 11.0 backend
Clone the repository:
git clone https://github.com/CodeChefVIT/cookoff-portal-11.0.git
cd cookoff-portal-11.0Install dependencies:
pnpm installCreate a local environment file:
cp example.env .env.localSet the backend URL:
NEXT_PUBLIC_API_URL=http://localhost:8080pnpm devThe application will be available at:
http://localhost:3000
pnpm dev # Start development server
pnpm build # Create production build
pnpm start # Start production server
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Format the project
pnpm format:check # Check formatting
pnpm type-check # Run TypeScript checks
pnpm test # Run tests
pnpm test:watch # Run tests in watch mode- Backend: CookOff 11.0 Backend
- Admin Portal: CookOff 11.0 Admin Portal
Contributions are welcome and appreciated.
- Fork the repository.
- Create your feature branch:
git checkout -b feature/AmazingFeature- Commit your changes:
git commit -m "Add AmazingFeature"- Push the branch:
git push origin feature/AmazingFeature- Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
Made with β€οΈ by CodeChef-VIT