AlgoLab is a web application inspired by LeetCode, designed to provide users with a variety of coding problems to solve using an integrated code editor. This platform aims to enhance learning through practice, offering a range of challenges across different programming languages and difficulty levels.
DISCLAIMER: The AWS EC2 instance hosting the Judge0 API for this project is now offline. To run this app, please set it up locally and either use already hosted Judge0 APIs, or self host it.
AlgoLab_Demo.mp4
- Problem Selection: Users can choose from a diverse set of coding problems categorized by difficulty and type.
- Inbuilt Code Editor: Integrated Monaco code editor allows users to write and test solutions directly within the platform.
- RESTful APIs: APIs handle problem submissions, integrating with the Judge0 API for real-time code execution and evaluation.
- User Authentication: Secure authentication and authorization implemented using NextAuth, ensuring user data privacy and session management.
- Responsive UI: Designed with a responsive user interface for optimal user experience across devices.
- Next.js: React framework for building server-side rendered applications.
- NextAuth: Authentication library for Next.js applications.
- Prisma: Database toolkit for working with PostgreSQL databases.
- Monaco Editor: Browser-based code editor used for syntax highlighting, code completion, and more.
- Judge0 API: API for executing and evaluating code submissions in various programming languages.
- Node.js (v14 or higher)
- npm or yarn
- Docker
-
Clone the repository:
git clone https://github.com/Abheelash-Mishra/AlgoLab.git
-
Install dependencies:
npm install # or yarn install
-
Set up environment variables:
- Create a
.env.local
file in the root directory. - Define environment variables like
NEXT_PUBLIC_GOOGLE_CLIENT_ID
,NEXT_PUBLIC_GOOGLE_CLIENT_SECRET
, and others required by NextAuth.
- Create a
-
Initialize the database:
npx prisma migrate dev
-
Head to the Judge0 github and download their latest release. Locate the configurations file and enter the values as needed. Ensure you have Docker installed and have the Docker Engine running. Using
docker-compose up
while inside the judge0 folder, start the container responsible for code executions. -
Start the development server:
npm run dev # or yarn dev
-
Access the application in your browser at
http://localhost:3000
.
Contributions to AlgoLab are welcome! Please fork the repository and submit pull requests to contribute new features, improvements, or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.