Skip to content

Sachin-pandey13/CodeElysium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก CodeElysium

An immersive, full-stack competitive programming platform built for the next generation of developers.
Practice DSA problems, compete in 1v1 coding battles, explore curated learning paths,
and get AI-powered assistance โ€” all in one beautiful, gamified environment.

๐ŸŒ Live Demo โ†’ย ย  Featuresย ย  Tech Stackย ย  Setupย ย  Architecture


๐ŸŽฏ Overview

CodeElysium is a LeetCode-inspired competitive programming platform that goes beyond traditional online judges. It combines a sleek, dark-themed UI with 3D visual elements, an AI-powered tutor, real-time code execution, and gamified learning paths โ€” making DSA practice engaging and accessible.

What Sets It Apart

Feature Traditional OJs CodeElysium
3D Interactive Landing Page โŒ โœ…
AI Tutor with Context Awareness โŒ โœ…
1v1 Competitive Arena with Anti-Cheat โŒ โœ…
Career Skill Tree Visualization โŒ โœ…
Offline-First PWA with Mini-Games โŒ โœ…
YouTube-Integrated Learning Playlists โŒ โœ…
Time & Space Complexity Analysis โŒ โœ…

โœจ Features

๐Ÿงฉ Problem Workspace

  • Monaco Editor with syntax highlighting, auto-completion, and multi-language support (C++, Java, Python, C)
  • Resizable split panels โ€” problem description, code editor, and output side by side
  • Real-time code execution via Judge0 with detailed test case results
  • AI-powered code analysis โ€” get time/space complexity and optimization suggestions

โš”๏ธ Competitive Arena

  • 1v1 coding battles with timed problem solving
  • Fullscreen enforcement with anti-cheat detection (tab switching, copy-paste monitoring)
  • Live score tracking and result comparison
  • Game-like UI with immersive visual effects

๐Ÿ—บ๏ธ Career Skill Tree

  • Interactive skill tree visualization for DSA learning paths
  • Nodes represent topics (Arrays, Trees, Graphs, DP, etc.)
  • Progress tracking with visual completion indicators
  • Hover tooltips with topic descriptions and difficulty levels

๐Ÿ“š Explore & Learn

  • Curated YouTube playlists for each DSA category
  • Notes upload system โ€” share and access study materials (stored as MongoDB binary)
  • Category-based browsing with beautiful tile cards
  • Integrated video player with playlist navigation

๐Ÿค– AI Tutor

  • Context-aware chatbot powered by OpenAI GPT-4o-mini
  • Remembers the current problem and conversation history
  • Provides solutions, explanations, and complexity analysis
  • Supports multi-language code generation

๐Ÿ“Š Progress Dashboard

  • Visual progress tracking with charts and statistics
  • Problem-solving history and streaks
  • Category-wise completion metrics
  • Performance analytics

๐Ÿ“ด Offline Mode (PWA)

  • Service Worker for offline content caching
  • 9 educational mini-games โ€” math challenges, periodic table quiz, geography, word matching, riddles, and more
  • Offline lesson viewer with cached content
  • Auto-sync when connection is restored

๐ŸŽจ Visual Design

  • 3D landing page with React Three Fiber (Three.js)
  • Glassmorphism panels with backdrop blur effects
  • Smooth Framer Motion animations and page transitions
  • Fully responsive dark theme with curated color palette

๐Ÿ› ๏ธ Tech Stack

Frontend

Technology Purpose
Next.js 16 Full-stack React framework (App Router)
React 19 UI library with Server Components
TypeScript Type safety across the codebase
Tailwind CSS Utility-first styling
Framer Motion Animations and page transitions
Monaco Editor VS Code-grade code editing
React Three Fiber 3D scene rendering (Three.js)
Zustand Lightweight state management
React Rough Notation Animated text annotations

Backend & Services

Technology Purpose
Next.js API Routes Serverless backend (Vercel Functions)
MongoDB Atlas Primary database (notes, submissions, users)
Firebase Auth Google OAuth & email/password authentication
Judge0 (RapidAPI) Secure code execution sandbox
OpenAI API AI tutor, code analysis, complexity detection

Infrastructure

Technology Purpose
Vercel Hosting & CDN with edge deployment
GitHub Actions CI/CD pipeline (lint โ†’ build โ†’ deploy)
Service Workers PWA offline support

๐Ÿ“ Project Structure

CodeElysium/
โ”œโ”€โ”€ app/                          # Next.js App Router pages
โ”‚   โ”œโ”€โ”€ api/                      # Serverless API routes
โ”‚   โ”‚   โ”œโ”€โ”€ analyze/              # Code analysis (OpenAI)
โ”‚   โ”‚   โ”œโ”€โ”€ chat/                 # AI tutor endpoint
โ”‚   โ”‚   โ”œโ”€โ”€ complexity/groq/      # Complexity analysis
โ”‚   โ”‚   โ”œโ”€โ”€ judge/                # Code execution (Judge0)
โ”‚   โ”‚   โ”œโ”€โ”€ notes/                # Notes CRUD
โ”‚   โ”‚   โ”œโ”€โ”€ pdf/[id]/             # PDF download
โ”‚   โ”‚   โ”œโ”€โ”€ problems/[id]/        # Problem lookup
โ”‚   โ”‚   โ””โ”€โ”€ upload/               # File upload (MongoDB binary)
โ”‚   โ”œโ”€โ”€ arena/                    # 1v1 competitive arena
โ”‚   โ”œโ”€โ”€ explore/                  # Course & playlist explorer
โ”‚   โ”œโ”€โ”€ login/ & signup/          # Authentication pages
โ”‚   โ”œโ”€โ”€ offline/                  # PWA offline hub + 9 mini-games
โ”‚   โ”œโ”€โ”€ problems/                 # Problem list & workspace
โ”‚   โ”‚   โ”œโ”€โ”€ [category]/           # Category-filtered view
โ”‚   โ”‚   โ””โ”€โ”€ [category]/[id]/      # Problem solver with editor
โ”‚   โ”œโ”€โ”€ profile/                  # User profile & stats
โ”‚   โ”œโ”€โ”€ progress/                 # Progress dashboard
โ”‚   โ”œโ”€โ”€ quiz/                     # Quiz arena (coming soon)
โ”‚   โ”œโ”€โ”€ setup/                    # Onboarding wizard
โ”‚   โ””โ”€โ”€ tree/                     # Career skill tree
โ”œโ”€โ”€ components/                   # Reusable UI components
โ”‚   โ”œโ”€โ”€ animations/               # Framer Motion wrappers
โ”‚   โ”œโ”€โ”€ arena/                    # Arena-specific components
โ”‚   โ”œโ”€โ”€ cards/                    # Card components
โ”‚   โ”œโ”€โ”€ charts/                   # Data visualization
โ”‚   โ”œโ”€โ”€ explore/                  # Explorer components
โ”‚   โ”œโ”€โ”€ fx/                       # Visual effects
โ”‚   โ”œโ”€โ”€ nav/                      # Navigation components
โ”‚   โ”œโ”€โ”€ panels/                   # Layout panels
โ”‚   โ”œโ”€โ”€ problem/                  # Problem workspace UI
โ”‚   โ”œโ”€โ”€ three/                    # 3D scene components
โ”‚   โ”œโ”€โ”€ transitions/              # Page transitions
โ”‚   โ”œโ”€โ”€ tree/                     # Skill tree components
โ”‚   โ””โ”€โ”€ ui/                       # Shared UI primitives
โ”œโ”€โ”€ data/                         # Static data (problems, career tree)
โ”œโ”€โ”€ lib/                          # Utility functions & configs
โ”‚   โ”œโ”€โ”€ firebase.ts               # Firebase initialization
โ”‚   โ”œโ”€โ”€ mongodb.ts                # MongoDB connection (lazy init)
โ”‚   โ”œโ”€โ”€ problem.ts                # Problem data utilities
โ”‚   โ””โ”€โ”€ storage.ts                # Offline storage & sync
โ”œโ”€โ”€ store/                        # Zustand state stores
โ”œโ”€โ”€ types/                        # TypeScript type definitions
โ”œโ”€โ”€ public/                       # Static assets & PWA files
โ”œโ”€โ”€ .github/workflows/            # CI/CD pipeline
โ”œโ”€โ”€ vercel.json                   # Vercel deployment config
โ””โ”€โ”€ next.config.js                # Next.js configuration

๐Ÿš€ Getting Started

Prerequisites

  • Node.js โ‰ฅ 18.0
  • npm โ‰ฅ 9.0
  • MongoDB Atlas account (free tier)
  • Firebase project (console)

Installation

# Clone the repository
git clone https://github.com/Sachin-pandey13/CodeElysium.git
cd CodeElysium

# Install dependencies
npm install

Environment Setup

Create a .env.local file in the root directory:

# MongoDB Atlas
MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>.mongodb.net/?retryWrites=true&w=majority
MONGODB_DB=codeelysium

# Firebase (Client-side)
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
NEXT_PUBLIC_FIREBASE_MSG_ID=your_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

# Judge0 (Code Execution)
RAPIDAPI_KEY=your_rapidapi_key

# OpenAI (AI Features)
OPENAI_API_KEY=your_openai_key

๐Ÿ“ See .env.example for the full template with descriptions.

Run Locally

# Development server
npm run dev

# Production build
npm run build
npm start

Open http://localhost:3000 in your browser.


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Client (Browser)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ React   โ”‚  โ”‚ Monaco   โ”‚  โ”‚ Three โ”‚  โ”‚ Service Worker โ”‚  โ”‚
โ”‚  โ”‚ + Zustandโ”‚  โ”‚ Editor   โ”‚  โ”‚ .js   โ”‚  โ”‚ (PWA Offline)  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚       โ”‚            โ”‚            โ”‚               โ”‚            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                   Next.js App Router                         โ”‚
โ”‚              (SSR + Client Components)                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                  API Routes (Serverless)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚  โ”‚ /judge โ”‚  โ”‚ /chat  โ”‚  โ”‚/analyze โ”‚  โ”‚ /notes,/pdf  โ”‚     โ”‚
โ”‚  โ”‚ Judge0 โ”‚  โ”‚ OpenAI โ”‚  โ”‚ OpenAI  โ”‚  โ”‚  MongoDB     โ”‚     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                    External Services                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Judge0  โ”‚  โ”‚ OpenAI  โ”‚  โ”‚ Firebase โ”‚  โ”‚  MongoDB    โ”‚   โ”‚
โ”‚  โ”‚ RapidAPIโ”‚  โ”‚ GPT-4o  โ”‚  โ”‚ Auth     โ”‚  โ”‚  Atlas      โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿšข Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Import the repository on Vercel
  3. Add environment variables in the Vercel dashboard
  4. Add your Vercel domain to Firebase Authorized Domains
  5. Ensure MongoDB Atlas has 0.0.0.0/0 in Network Access whitelist

CI/CD Pipeline

The project includes a GitHub Actions workflow (.github/workflows/ci-cd.yml) that runs on every push:

Push to main โ†’ Quality Checks (lint) โ†’ Production Build โ†’ Deploy to Vercel

๐ŸŽฎ Offline Mini-Games

CodeElysium includes 9 educational games playable without internet:

Game Description
๐Ÿงฎ Math Challenge Mental math under time pressure
โšก Circuit Builder Logic circuit simulation
๐ŸŒ Geography Quiz World capitals and landmarks
๐Ÿ”ข Grid Puzzle Number grid logic puzzles
๐ŸŽฏ Guess Game Number guessing with hints
๐Ÿงช Periodic Table Element identification quiz
๐Ÿงฉ Riddles Programming-themed brain teasers
๐Ÿ“ Word Match Technical term matching
๐Ÿ’ฐ Budget Planner Financial literacy simulation

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style and TypeScript patterns
  • Place new components in the appropriate subdirectory under components/
  • Add new API routes in app/api/ using the Next.js Route Handler format
  • Use Zustand stores for shared client-side state
  • Test builds locally with npm run build before pushing

๐Ÿ“„ License

This project is open-source and available under the MIT License.


Built with โค๏ธ by Sachin Pandey And Team

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors