A backend service for sIDE — a collaborative, real-time code editor / IDE.
This repository provides the server-side API, real-time collaboration (WebSocket) endpoints, and integrations for persistence, authentication, and tooling used by the sIDE frontend.
- REST API for user, project, file, and session management.
- Real-time collaborative editing via WebSocket / Socket.IO.
- Authentication & authorization (JWT / session-based).
- Persistence with relational or NoSQL datastore (MongoDB).
- File execution / sandboxing interface.
- Dockerized for easy deployment.
- Runtime: Node.js
- Framework: ExpressJS
- Language: JavaScript
- Database: MongoDB
- Git >= 2.20
- Node.js >= 16
- Docker
- A database (MongoDB)
git clone https://github.com/soham1260/sIDE-backend.git
cd sIDE-backendCreate a .env file at the project root from .env.example (if present). Example variables commonly used:
# Server
PORT=4000
# Database (example for Postgres)
DB=mongodb+srv://<username>:<password>@cluster.mongodb.net/<dbname>
# Auth
JWT=replace_with_a_strong_secret
# Docker
VM_IP=ip
VM_PORT=port
Make sure to replace placeholders with secure values in production.
Adjust commands to match the scripts in package.json.
Install dependencies:
npm installRun the server:
node index.js- Ensure Docker is installed and running.
- The backend automatically connects to Docker via the default socket (
/var/run/docker.sock) if no ip or port provided. - Pre-pull the required language images:
docker pull gcc docker pull openjdk docker pull node docker pull python