Skip to content

MrQuantum1915/reverse-coding-2k26

Repository files navigation

Reverse Coding 2k26

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.

About the Event

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.

Somethings about the platform:

  • 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 cache to 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.

Tech Stack

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

Getting Started

Prerequisites

Ensure you have Node.js 18+ installed.

Installation

  1. Clone the repository:
git clone https://github.com/MrQuantum1915/reverse-coding-2k26.git
cd reverse-coding-2k26
  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. 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
  1. Run the development server:
npm run dev
#or
pnpm dev
  1. Open http://localhost:3000 to view the application.

Project Structure

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

Contribution Guidelines

  1. Fork the repository and create your branch:

    git checkout -b feature/your-feature-name
  2. Make your changes, then commit them:

    git commit -m "Add feature: description of feature"
  3. Push to your forked repository:

    git push origin feature/your-feature-name
  4. 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 build

License

See LICENSE for details.

About

CCxEnigma Tesseract - A Reverse Coding Challenge Hosting Platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors