Skip to content

sabbirhosen44/CodeIDE-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeIDE Platform - Backend Documentation

CodeIDE Banner

Table of Contents

  1. Introduction
  2. Project Architecture
  3. Install Guide
  4. Service Architecture

Introduction

Overview

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.

Purpose and Goals

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.

Key Features

  • User registration and authentication
  • Project and file management
  • Template-based project bootstrapping
  • Admin management system

Technology Stack

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB
  • Authentication: JWT
  • Language: Typescript

Project Architecture

System Overview

The CodeIDE backend is structured around microservices that handle domain-specific responsibilities such as authentication, user management, projects, templates, and admin operations.

Services Implemented

  • 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.


Install Guide

Prerequisites

  • Node.js (v16+ recommended)
  • MongoDB (Local or MongoDB Atlas)
  • npm or Yarn

Setup Instructions

  1. Clone the Repository
git clone https://github.com/sabbirhosen44/CodeIDE-Backend.git
cd CodeIDE-Backend
  1. Install Dependencies

Using npm:

npm install

Or using Yarn:

yarn
  1. 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=
  1. Run the Development Server

Using npm:

npm run dev

Or using Yarn:

yarn dev

The backend server will run at http://localhost:5000


Service Architecture

Authentication Service

Handles all user authentication workflows.

Responsibilities:

  • User signup, login
  • Token generation and validation
  • Email verification

Technologies:

  • JWT
  • Bcrypt
  • Nodemailer

Project Service

Controls project lifecycle and access management.

Responsibilities:

  • Project CRUD operations
  • Project metadata

Template Service

Provides bootstrapping options via code templates.

Responsibilities:

  • Fetch template metadata
  • Retrieve template files
  • Create template for language
  • Organize templates by language/framework

Code Execution Service

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#.

Admin Service

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.


License

This project is licensed under the MIT License.


Maintainer

Developed by Md. Sabbir Hosen.

About

Scalable and secure backend service for CodeIDE — a modern web-based integrated development environment with project management, template management, and authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages