A website/platform for hosting the OG - CCxEnigma: TESSERACT event — a unique programming challenge where participants reverse engineer the logic from input-output patterns.
You can use this platform for hosting your reverse coding event too.
In Reverse Coding, participants are presented with a black box interface:
- They provide inputs to the system and observe the corresponding outputs
- The actual problem statement is not given — participants must deduce the underlying logic
- Based on the patterns they discover, participants submit code that implements the reverse-engineered logic
This challenges participants to think critically, recognize patterns, and demonstrate their problem-solving skills without explicit instructions.
-
The platform capable of full Registration, display Leaderboard, and most important thing -> Running the Black Box.
-
The main thing is that participant should not get the code behind the black box in any case. So I used this architecture:
-
The live leaderboard architecture:
-
"Whole Function" Memoization: Utilizes Next.js 15's
use cacheto memoize the entire aggregation pipeline (Codeforces API + Supabase DB + Merge Logic), reducing database load to zero during high-traffic refreshes. -
Serverless-Safe Rate Limiting: Implements a custom 10s cacheLife profile to act as a statistical buffer against Vercel's concurrent instance scaling, ensuring zero risk of hitting Codeforces' strict API limits.
-
Design (by @MrQuantum1915): Figma
Framework: Next.js 14+ (App Router)
Styling: Tailwind CSS (Custom Cyberpunk/Neon Config)
3D Rendering: Three.js
Fonts: Orbitron, Share Tech Mono
Ensure you have Node.js 18+ installed.
- Clone the repository:
git clone https://github.com/MrQuantum1915/reverse-coding-2k26.git
cd reverse-coding-2k26- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Add this corresponding env variable to
.env.local
NEXT_PUBLIC_SUPABASE_URL="vvv"
NEXT_PUBLIC_SUPABASE_ANON_KEY="www"
CODEFORCES_API_KEY="xxx"
CODEFORCES_API_SECRET="yyy"
NEXT_PUBLIC_CONTEST_ID=zzz #codeforce contest id- Run the development server:
npm run dev
#or
pnpm dev- Open http://localhost:3000 to view the application.
app/
├── page.tsx # Home page
├── about/ # About page
├── login/ # Login page
├── sandbox/ # Black box interface for testing inputs/outputs
├── team/ # Team page
└── components/ # Reusable components
-
Fork the repository and create your branch:
git checkout -b feature/your-feature-name
-
Make your changes, then commit them:
git commit -m "Add feature: description of feature" -
Push to your forked repository:
git push origin feature/your-feature-name
-
Open a pull request to the main branch of the repository.
Before submitting, ensure your code adheres to our coding standards and passes all linting and testing checks.
Run Build command before submitting pull request
npm run build
#or
pnpm buildSee LICENSE for details.