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
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.
| 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 | โ | โ |
- 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
- 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
- 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
- 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
- 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
- Visual progress tracking with charts and statistics
- Problem-solving history and streaks
- Category-wise completion metrics
- Performance analytics
- 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
- 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
| 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 |
| 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 |
| Technology | Purpose |
|---|---|
| Vercel | Hosting & CDN with edge deployment |
| GitHub Actions | CI/CD pipeline (lint โ build โ deploy) |
| Service Workers | PWA offline support |
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
# Clone the repository
git clone https://github.com/Sachin-pandey13/CodeElysium.git
cd CodeElysium
# Install dependencies
npm installCreate 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.examplefor the full template with descriptions.
# Development server
npm run dev
# Production build
npm run build
npm startOpen http://localhost:3000 in your browser.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Push your code to GitHub
- Import the repository on Vercel
- Add environment variables in the Vercel dashboard
- Add your Vercel domain to Firebase Authorized Domains
- Ensure MongoDB Atlas has
0.0.0.0/0in Network Access whitelist
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
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 |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 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 buildbefore pushing
This project is open-source and available under the MIT License.
Built with โค๏ธ by Sachin Pandey And Team