A modern online coding platform that allows users to write, compile, and execute code in multiple programming languages with real-time feedback.
- Multi-language Support: Write and execute code in Java, C++, JavaScript, and Python
- Real-time Code Execution: Powered by Judge0 API for fast and secure code compilation
- User Authentication: Custom-built login/signup system with secure session management
- Clean UI: Modern, responsive interface built with React
- Code Editor: Syntax highlighting and auto-completion for better coding experience
- Test Cases: Run your code against custom input/output test cases
- Results Dashboard: View execution time, memory usage, and output results
Frontend:
- React.js
- HTML5/CSS3
- JavaScript (ES6+)
- Responsive Design
Backend:
- Node.js/Express.js (or your backend tech)
- RESTful APIs
- JSON Web Tokens (JWT) for authentication
- bcrypt for password hashing
External APIs:
- Judge0 API for code compilation and execution
Database:
- MongoDB/PostgreSQL (specify your choice)
leetlab/
βββ frontend/ # React application
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ utils/
β β βββ App.js
β βββ public/
β βββ package.json
βββ backend/ # Server application
β βββ controllers/
β βββ models/
β βββ routes/
β βββ middleware/
β βββ server.js
βββ README.md
- Node.js (v14 or higher)
- npm or yarn
- Judge0 API key (get it from Judge0)
-
Clone the repository
git clone https://github.com/rohittrana/leetlab.git cd leetlab -
Setup Backend
cd backend npm installCreate a
.envfile in the backend folder:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key JUDGE0_API_KEY=your_judge0_api_key JUDGE0_HOST=judge0-ce.p.rapidapi.com
-
Setup Frontend
cd ../frontend npm install -
Start the Application
Start backend server:
cd backend npm startStart frontend (in new terminal):
cd frontend npm start -
Access the Application
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:5000
- Frontend:
- Sign Up/Login: Create an account or login with existing credentials
- Choose Language: Select from Java, C++, JavaScript, or Python
- Write Code: Use the built-in code editor with syntax highlighting
- Add Input: Provide custom input for your program (optional)
- Execute: Click run to compile and execute your code
- View Results: See output, execution time, and memory usage
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logout
POST /api/code/execute- Submit code for executionGET /api/code/result/:id- Get execution results
- C++ - Fast execution for competitive programming
- Java - Object-oriented programming with JVM
- Python - Simple syntax, perfect for algorithms
- JavaScript (Node.js) - Modern web development language
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Rohit Rana
- Email: [email protected]
- GitHub: @rohittrana
- LinkedIn: Rohit Rana
- Judge0 for providing the code execution API
- React community for the amazing frontend framework
- Open source contributors who make projects like this possible
β Star this repo if you found it helpful!# LeetLab π
A modern online coding platform that allows users to write, compile, and execute code in multiple programming languages with real-time feedback.
- Multi-language Support: Write and execute code in Java, C++, JavaScript, and Python
- Real-time Code Execution: Powered by Judge0 API for fast and secure code compilation
- User Authentication: Custom-built login/signup system with secure session management
- Clean UI: Modern, responsive interface built with React
- Code Editor: Syntax highlighting and auto-completion for better coding experience
- Test Cases: Run your code against custom input/output test cases
- Results Dashboard: View execution time, memory usage, and output results
Frontend:
- React.js
- HTML5/CSS3
- JavaScript (ES6+)
- Responsive Design
Backend:
- Node.js/Express.js (or your backend tech)
- RESTful APIs
- JSON Web Tokens (JWT) for authentication
- bcrypt for password hashing
External APIs:
- Judge0 API for code compilation and execution
Database:
- MongoDB/PostgreSQL (specify your choice)
leetlab/
βββ frontend/ # React application
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ utils/
β β βββ App.js
β βββ public/
β βββ package.json
βββ backend/ # Server application
β βββ controllers/
β βββ models/
β βββ routes/
β βββ middleware/
β βββ server.js
βββ README.md
- Node.js (v14 or higher)
- npm or yarn
- Judge0 API key (get it from Judge0)
-
Clone the repository
git clone https://github.com/rohittrana/leetlab.git cd leetlab -
Setup Backend
cd backend npm installCreate a
.envfile in the backend folder:PORT=5000 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key JUDGE0_API_KEY=your_judge0_api_key JUDGE0_HOST=judge0-ce.p.rapidapi.com
-
Setup Frontend
cd ../frontend npm install -
Start the Application
Start backend server:
cd backend npm startStart frontend (in new terminal):
cd frontend npm start -
Access the Application
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:5000
- Frontend:
- Sign Up/Login: Create an account or login with existing credentials
- Choose Language: Select from Java, C++, JavaScript, or Python
- Write Code: Use the built-in code editor with syntax highlighting
- Add Input: Provide custom input for your program (optional)
- Execute: Click run to compile and execute your code
- View Results: See output, execution time, and memory usage
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logout
POST /api/code/execute- Submit code for executionGET /api/code/result/:id- Get execution results
- C++ - Fast execution for competitive programming
- Java - Object-oriented programming with JVM
- Python - Simple syntax, perfect for algorithms
- JavaScript (Node.js) - Modern web development language
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Rohit Rana
- Email: [email protected]
- GitHub: @rohittrana
- LinkedIn: Rohit Rana
- Judge0 for providing the code execution API
- React community for the amazing frontend framework
- Open source contributors who make projects like this possible
β Star this repo if you found it helpful!