The CodeIDE Platform is a web-based integrated development environment (IDE) that enables developers to write, run, debug, and collaborate on code directly in the browser. It removes the need for local setups and allows seamless access from any device.
The backend system is designed to provide the following:
- Accessibility: Use from anywhere, anytime.
- Collaboration: Real-time teamwork and coding.
- Integration: GitHub, cloud, and DevOps integrations.
- Scalability: Support from individual users to enterprise projects.
- Security: JWT authentication, role-based access control, and secure storage.
- User registration and authentication
- Project and file management
- Template-based project bootstrapping
- Admin management system
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB
- Authentication: JWT
- Language: Typescript
The CodeIDE backend is structured around microservices that handle domain-specific responsibilities such as authentication, user management, projects, templates, and admin operations.
- Authentication Service
- Project Service
- Template Service
- Code Execution Service (Custom Redis Queue engine executing 10+ languages)
- Admin Service
Each service is isolated for scalability and follows RESTful design principles.
- Node.js (v16+ recommended)
- MongoDB (Local or MongoDB Atlas)
- npm or Yarn
- Clone the Repository
git clone https://github.com/sabbirhosen44/CodeIDE-Backend.git
cd CodeIDE-Backend- Install Dependencies
Using npm:
npm installOr using Yarn:
yarn- Configure Environment Variables
Create a .env file in the root directory and include:
PORT=
MONGO_URI=
JWT_SECRET=
JWT_EXPIRE=
CLIENT_URL=
ADMIN_EMAIL=
# Email configuration
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
# Code Execution Engine
CODE_EXEC_URL=- Run the Development Server
Using npm:
npm run devOr using Yarn:
yarn devThe backend server will run at http://localhost:5000
Handles all user authentication workflows.
Responsibilities:
- User signup, login
- Token generation and validation
- Email verification
Technologies:
- JWT
- Bcrypt
- Nodemailer
Controls project lifecycle and access management.
Responsibilities:
- Project CRUD operations
- Project metadata
Provides bootstrapping options via code templates.
Responsibilities:
- Fetch template metadata
- Retrieve template files
- Create template for language
- Organize templates by language/framework
Manages isolated, high-performance compilation and execution of user-submitted code snippets.
Responsibilities:
- Receives source code, standard input, language specification, and timeout settings.
- Interfaces with the self-hosted execution engine daemon (
CodeIDE-code-execution). - Manages execution tasks via a fast Redis-backed task queue.
- Polls execution statuses and returns compiled stdout, stderr, compile messages, and exit codes.
- Supports 10 languages: C++, C, Java, Python 3, JavaScript, Go, Rust, PHP, Ruby, and C#.
Handles privileged operations available only to admins.
Responsibilities:
- View/manage users
- Manage templates
- Monitor activity
More services like FileService, ContainerService, BillingService, NotificationService, etc., will be documented upon implementation.
This project is licensed under the MIT License.
Developed by Md. Sabbir Hosen.
