An interactive platform for learning Data Structures & Algorithms through structured content, quizzes, and secure coding practice.
🔗 Live: codelore.app
CodeLore brings together three learning modes in one place:
- Structured learning — topic-based DSA content rendered from Markdown
- Coding practice — problems with real-time execution against multiple test cases
- Quizzes — topic-wise assessments with score tracking and progress history
Frontend (Vercel · React + Vite)
↓
Backend API (Render · Node.js / Express)
↓
Sandbox Service (VM · Docker Execution Engine)
↓
Docker Containers (Isolated Code Execution)
The code execution engine runs on a separate virtual machine rather than on Vercel or Render, both of which do not support nested Docker execution. This keeps execution secure and platform-compatible without constraining the rest of the stack.
| Layer | Technologies |
|---|---|
| Frontend | React 19, Vite, React Router DOM, Axios, Tailwind CSS v4, Monaco Editor, React Markdown |
| Backend | Node.js, Express.js, MongoDB, JWT |
| Sandbox | Node.js, Docker, Child Processes |
- User registration and login with session restoration on refresh
- JWT-based session management via cookie-based credentials
- Protected routes enforced through
AuthContextandProtectedRoute
- Topic-based DSA curriculum with Markdown-rendered content
- In-app home and topic exploration interface
- Topic-wise quiz attempts and result pages
- Score evaluation and progress tracking
- Problem-based coding challenges with Monaco Editor
- Multi-test-case execution with submission feedback views
- Real-time results surfaced from the sandbox
- Docker-based isolated execution
- CPU, memory, and process limits
- Network-disabled containers with read-only filesystem
- Automatic container cleanup
Submitted code is forwarded from the backend to a sandboxed Docker container running under strict resource limits:
| Constraint | Value |
|---|---|
| CPU | 0.5 cores |
| Memory | 128 MB |
| Timeout | 2 seconds |
| Network | Disabled (--network=none) |
| Filesystem | Read-only |
| Process limit | Enforced via --pids-limit |
Results are returned to the backend and surfaced to the frontend.
CodeLore/
├── client/ # React frontend
│ ├── public/
│ └── src/
│ ├── assets/ # Images and videos
│ ├── components/ # Feature-level components
│ │ ├── auth/
│ │ ├── coding/
│ │ ├── home/
│ │ ├── landing/
│ │ ├── layout/
│ │ ├── profile/
│ │ ├── quiz/
│ │ ├── quizResult/
│ │ ├── results/
│ │ └── topic/
│ ├── lib/
│ │ └── api.jsx # Axios instance and API config
│ ├── pages/ # Page-level components
│ └── App.jsx
├── server/ # Main backend API
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── services/
│ └── utils/
├── sandbox-service/ # Docker execution service
│ ├── executors/
│ ├── utils/
│ └── server.js
├── content/ # Topic Markdown files
├── quiz/ # Quiz data
└── coding/ # Coding problems
git clone https://github.com/Bhargavraj-13/CodeLore.git
cd CodeLorecd server
npm installCreate a .env file:
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret
SANDBOX_API_URL=http://<sandbox-ip>
SANDBOX_SHARED_SECRET=your_secretnpm run devcd client
npm installCreate a .env file in the client directory:
VITE_API_URL=http://localhost:5000npm run devsudo apt update
sudo apt install docker.io nodejs npm -y
cd server/sandbox
docker build -t codelore-sandbox .
cd sandbox-service
npm install
npm start| Component | Platform |
|---|---|
| Frontend | Vercel |
| Backend | Render |
| Sandbox | Virtual Machine (Docker-enabled) |
Backend
MONGO_URI=
JWT_SECRET=
SANDBOX_API_URL=
SANDBOX_SHARED_SECRET=Frontend
VITE_API_URL=Sandbox service
PORT=8080
SANDBOX_SHARED_SECRET=- Language support limited to Python and C++
- No execution queue — submissions run sequentially
- No submission history stored
- Additional language support
- Execution queue system
- Submission history and analytics
- Leaderboard
| Area | Contributor |
|---|---|
| Frontend — React UI, routing, editor integration, quiz and coding interfaces | Supritha |
| Backend & Sandbox — API, database, auth, Docker execution engine | Bhargav |
This project is for academic and demonstration purposes.