CodeQuest is a platform designed to simulate a competitive coding environment, similar to LeetCode. It provides a user-friendly interface where users can submit their code, track their progress, and interact with other users. The platform supports multiple programming languages and includes features like sorting questions based on difficulty, a leaderboard, and code submissions tracking.
- User Authentication: Users can create accounts and log in to submit their solutions.
- Question Sorting: Questions are sorted by difficulty level and by whether they are solved or not.
- Leaderboard: Displays the ranking of users based on the number of problems solved and their performance.
- Question Description: Each question includes a description and an integrated code editor.
- Code Editor & Compiler: Users can submit their code through an inbuilt code editor that supports multiple languages.
- Concurrent Submission Handling: Uses RedisQueue to manage multiple simultaneous code submissions.
- Container Isolation: Each user's code submission runs in isolated containers, ensuring security and isolation.
- Backend: Node.js (Express)
- Frontend: React.js
- Database: MongoDB
- Containerization: Docker
- Queue Management: RedisQueue
- Compiler: Docker containers for code execution
- Authentication: JWT (JSON Web Tokens)
- Deployment: AWS EC2 (for deployment) & Docker
To run this project locally, follow these steps:
- Node.js - JavaScript runtime
- Docker - For containerization
- Redis - For managing job queues
- MongoDB - For storing data
- Clone the repository:
git clone https://github.com/Devang2304/codequest.git cd codequest
- Install the dependencies for the backend and frontend:
npm install cd client && npm install
- Set up your environment variables:
- DATABASE_URI - Your MongoDB URI
- REDIS_URI - Your Redis URI
- JWT_SECRET - Secret key for JWT authentication
- Run the backend and frontend
Each user's code is run in an isolated Docker container for security and isolation. This ensures that malicious code won't affect other users. To set up the Docker environment:
- Ensure Docker is installed and running.
- Build and run the Docker containers
- Thanks to LeetCode for the inspiration.
- Docker for containerization.
- Redis for managing the queue system.