GCC is a full-stack collaborative code editor built with React, Vite, Node.js, Express, MongoDB, and Socket.IO. It enables users to register, log in, create projects, add files, invite members, and collaborate on code in real-time.
The project consists of:
gcc-web/— frontend React application using Vite and Monaco Editorserver/— backend Express API with MongoDB data persistence and Socket.IO for live collaborationRules and Regulations/— separate documentation folder for project guidelines and policies
- User authentication with registration and login
- JWT-based session support
- Create and manage coding projects
- Add files to a project and save file content
- Invite members to share a project by email
- Real-time collaborative editing through Socket.IO
- JavaScript and Python code execution from the editor interface
- MongoDB-backed persistence for users, projects, files, and membership
- Frontend: React + Vite with
@monaco-editor/reactfor editor UI - Backend: Express server with RESTful routes
- Database: MongoDB via Mongoose
- Realtime: Socket.IO for collaborative code updates
- Authentication: bcrypt for password hashing and JWT for tokens
-
gcc-web/src/pages/— React pages (Login,Register,Dashboard,Project)services/— API and Socket.IO clientsroutes.jsx— application routingApp.jsx— app entry component
public/— static assetspackage.json— frontend dependencies and scripts
-
server/controllers/— route handlers for auth, projects, and code executionmodels/— Mongoose schemas forUserandProjectroutes/— API endpoints for authentication, projects, and codeserver.js— Express app setup, MongoDB setup, Socket.IO serverpackage.json— backend dependencies and scripts
- Node.js (recommended latest LTS)
- npm
- Python installed and available on the system path
- MongoDB instance or MongoDB Atlas
Create a .env file inside server/ with the following values:
MONGO_URI=<your_mongo_connection_string>
JWT_SECRET=<your_jwt_secret>
PORT=5001From the root of the repository, run:
cd server
npm install
cd ../gcc-web
npm installFrom server/:
npm run devThis starts the backend on http://localhost:5001.
From gcc-web/:
npm run devOpen the Vite server URL shown in the terminal, usually http://localhost:5173.
POST /api/auth/register— register new userPOST /api/auth/login— user login
POST /api/projects/create— create a new projectGET /api/projects/:userId— get projects for a userGET /api/projects/project/:id— get project by project IDPOST /api/projects/add-file— add a file to a projectPUT /api/projects/update-file— update file contentPOST /api/projects/invite— invite a user to a project by email
POST /api/code/run— backend route for running JavaScript and Python code
Note: the editor now sends code to the backend runtime for execution. Python support is available for
.pyfiles, and JavaScript files execute on the server as well.
The backend creates a Socket.IO server and listens for:
join-file— join a shared editing room for a filecode-change— broadcast code changes to other connected peersreceive-code— receive live code updates from collaborators
The frontend connects to Socket.IO at http://localhost:5001 and emits changes when the editor content updates.
- The frontend currently stores the authenticated user in
localStorage. - Projects and file contents are persisted in MongoDB with the
Projectmodel. - Each project includes an owner, member list, and file tree schema.
- The backend uses
bcryptjsfor password hashing andjsonwebtokenfor token generation.
- Invite flow only works if the invited user is already registered in the system.
- File save uses file
namematching; duplicate file names may cause conflicts. - Code execution is currently limited to JavaScript and css files in the browser.
- Add logout and token expiration handling in frontend
- Improve file tree support for nested folders
- Persist live editor changes automatically
- Integrate backend
/api/code/runroute in the frontend - Add better error handling and user notifications
- Add Python language runtime support in the editor and backend
- Ganesh Chavan(Leader) — handles backened
- Chinmayi Udata — Backend
- Prajyot Bolli — Frontend
- Samruddhi Katare — Testing