CodeForge is a real-time collaborative code editor. Users can create or join a room and edit the same code together through Socket.IO.
- Create a room with a generated UUID or join an existing room.
- Join as a guest with only a username, or optionally create an account and log in.
- Open login and sign-up from the top-right of the home page.
- Sync code changes and participant lists in real time.
- Restore the latest code saved for a room when joining again.
- Show join and leave notifications.
- Copy the Room ID to invite collaborators.
- Edit C++ with CodeMirror, Dracula theme, line numbers, autocomplete, bracket matching, and auto-close brackets.
- Use Socket.IO websocket transport with polling fallback for local development.
- React 19 and Vite
- React Router DOM
- CodeMirror via
@uiw/react-codemirror - Socket.IO client
- React Hot Toast, Bootstrap, React Avatar, and UUID
- Node.js and Express 5
- Socket.IO
- Node
cryptofor password hashing and signed authentication tokens - JSON files for local user and room-code persistence
client/ React and Vite frontend
server/ Express and Socket.IO backend
Install dependencies:
cd server
npm install
cd ../client
npm installStart the backend in one terminal:
cd server
npm startStart the frontend in another terminal:
cd client
npm run devOpen http://localhost:5173 in the browser. The frontend uses http://localhost:5000 by default. To use another backend, set this value in client/.env:
VITE_BACKEND_URL=http://localhost:5000Room code is stored by Room ID in server/data/rooms.json. Local accounts are stored as salted password hashes in server/data/users.json. The server/data/ directory is ignored by Git because it contains local runtime data.
Authentication is optional for collaboration. Logged-in users receive a signed token and can still join the same rooms as guests.
For production, set a strong AUTH_SECRET environment variable and replace the local JSON stores with a shared database for multi-instance deployments.
/- home page, room creation, and room joining/editor/:roomId- collaborative editor
ISC