A real-time collaborative document editor. Create a document, share the link, and edit together live.
Live: https://syncspace.bipashab497.workers.dev
Requirements: Go 1.20+, Node.js 18+, MongoDB Atlas account
cd backend
go mod tidy
go run .Set this environment variable before running:
MONGO_URI=mongodb+srv://your-connection-string
Server runs on http://localhost:8080.
cd frontend
npm install
npm run devApp runs on http://localhost:5173.
By default the frontend points to http://localhost:8080. If you deploy the backend, update the URLs in src/components/Editor.tsx and src/pages/HomePage.tsx to match your backend URL. Use wss:// instead of ws:// for WebSocket in production.
Backend — Render
- Root directory:
backend - Build command:
go build -o server . - Start command:
./server - Add
MONGO_URIin the Environment tab
Frontend — Cloudflare Workers
npm run build
npx wrangler deploy- No login required — anyone with the document URL can edit it
- Free Render instances sleep after inactivity; first load may take ~50 seconds