Welcome to CodeSphere, an online coding platform designed to enhance your coding and problem-solving skills. This MERN (MongoDB, Express.js, React.js, Node.js) stack project provides a range of features, including user authentication, problem exploration, code submissions, an online IDE, and more.
- Secure Authentication: Users can register, login, and manage their profiles using JWT (JSON Web Token) for secure authentication, ensuring data integrity and preventing unauthorized access.
- Profile Management: Users can edit their profiles, including uploading profile pictures using Cloudinary for cloud storage and efficient image management.
- Explore all problems available on the platform at
/problems
. - View a curated list of coding problems categorized by difficulty levels (easy, medium, hard).
- Access the problem statement page for a specific problem at
/problemStatement/${problemId}
. - Read the problem description, constraints, and example test cases.
- Test the code with custom inputs and view the outputs immediately using input/output section.
- Upon submission, the code is evaluated against predefined test cases, and users receive instant feedback (Accepted, Wrong Answer, etc.).
- Comprehensive error messages and debugging information are provided to help users understand and fix issues in their code.
- View all previous submissions at
/submissions
. - Each submission includes details such as language, code, submission date, and verdict.
- Access the online Integrated Development Environment (IDE) at
/ide
. - Practice coding in a sandbox-like environment, an integrated code editor supports writing and running code with real-time feedback on custom inputs.
- Docker Integration: Code execution is managed within isolated Docker containers for security and resource management.
- Multi-Language Support: The platform supports code execution in C, C++, and Python, with dedicated Docker containers for each language.
- Docker-in-Docker Concept: The platform leverages the Docker-in-Docker (DinD) concept, allowing Docker containers to run inside main Docker container(backend application container). This ensures a secure, isolated, and scalable environment for executing user code.
CodeSphere supports the following programming languages:
- C
- C++
- Python
A mix of Chakra UI and simple CSS has been used for styling, ensuring a clean and responsive user interface.
-
Problem Set Page:
- Endpoint:
/problems
- Description: Displays all problems available on CodeSphere, including their difficulty levels.
- Endpoint:
-
Problem Statement Page:
- Endpoint:
/problemStatement/${problemId}
- Description: Provides the problem statement, description, constraints, and example test cases. Allows users to code, run, and submit solutions.
- Endpoint:
-
Submissions Page:
- Endpoint:
/submissions
- Description: Shows a list of all previous submissions, including details like language, code, submission date, and verdict.
- Endpoint:
-
Online IDE:
- Endpoint:
/ide
- Description: Accesses the online Integrated Development Environment (IDE) for practicing coding.
- Endpoint:
-
My Profile Page:
- Endpoint:
/myProfile
- Description: Allows users to view and update their profile details.
- Endpoint:
- Frontend Styling: Chakra UI, CSS
- Frontend: React.js
- Backend: Node.js, Express.js
- Database: MongoDB
- Authentication: JWT Tokens
- Cloud Services: Cloudinary
- Containerization: Docker
To run CodeSphere locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Div16s/ONLINE-JUDGE
-
Navigate to the project directory:
cd ONLINE-JUDGE
-
Install dependencies:
npm install
-
Set up a MongoDB database and update the connection string in the server configuration.
-
Start the server:
node server.js
-
Start the client:
npm start
Feel free to contribute to the project by submitting bug reports, feature requests, or pull requests. Let's build a vibrant coding community on CodeSphere!