Skip to content

Repository files navigation

SynCode

A real-time collaborative code editor that lets multiple users write, edit, and run code together in a shared room — live, in the browser.

Live:syncode.void57.space


Preview

Join Screen

DesktopMobile
Join DesktopJoin Mobile

Editor — Desktop

Editor Desktop

Editor — Mobile

EditorCollab
Editor MobileCollab Mobile

Features

  • Real-time collaborative editing powered by Socket.IO
  • Multi-language code execution (JS, TS, Python, Go, Rust, Java, C++, C, Ruby) via self-hosted Piston
  • Monaco Editor (same engine as VS Code) with syntax highlighting
  • Live user presence — see who's in the room and their typing status
  • Room-based sessions — share a room code to collaborate instantly

Tech Stack

LayerTechnology
FrontendReact 19, Vite, TailwindCSS 4, Monaco Editor
BackendNode.js, Express 5, Socket.IO
Code ExecutionSelf-hosted Piston API (AWS EC2)
ContainerizationDocker (Piston runtime isolation)
DeploymentRender (app), AWS EC2 (Piston)

Project Structure

synCode/
├── backend/
│ └── index.js # Express server, Socket.IO events, Piston
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── EditorView.jsx # Monaco editor + run panel + user list
│ │ │ └── JoinRoom.jsx # Room entry screen with validation
│ │ ├── context/
│ │ │ └── Room.jsx # Global room state context
│ │ └── App.jsx
│ └── public/
│ ├── og-image.png # OG banner image (1856×912)
│ ├── logo.svg / logo.png # App icon
│ └── ...
├── package.json # Root — start/build scripts
└── README.md

Getting Started

Prerequisites

  • Node.js 18+
  • Docker (required to self-host Piston)
  • A running Piston instance — production uses a self-hosted instance on AWS EC2

Running Piston Locally with Docker

Piston uses Docker to run untrusted code in isolated containers. To spin it up locally:

docker run \
--platform linux/amd64 \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 2000:2000 \
ghcr.io/engineer-man/piston

Then set your .env:

PISTON_URL=http://localhost:2000/api/v2/execute

Piston pulls language runtimes on demand the first time each language is executed. In production, the Piston instance runs on an AWS EC2 instance inside Docker.

Install & Run (Development)

# Install root dependencies
npm install
# Install frontend dependenciescd frontend && npm install &&cd ..
# Start backend (with nodemon)
npm run dev
# In a separate terminal, start the frontend dev servercd frontend && npm run dev

Backend runs on http://localhost:3000, frontend on http://localhost:5173 (Vite proxy).

Build for Production

npm run build
npm start

This builds the React app into frontend/dist/ and serves it from the Express backend.


Environment Variables

Create a .env file in the project root:

PISTON_URL=http://<your-piston-host>:2000/api/v2/executePORT=3000

Supported Languages

javascript · typescript · python · go · rust · java · c++ · c · ruby


License

This is a personal project. All rights reserved.

About

SynCode — Real-Time Collaborative Code Editor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages