A lightweight, real-time collaborative rich-text editor built with React (Vite), Quill, Socket.IO, Node.js/Express, and MongoDB. Supports real-time editing, autosave, and persistent documents.
Live app: Access the Live Demo
- Frontend: React (Vite), Quill
- Realtime: Socket.IO
- Backend: Node.js, Express
- Database: MongoDB Atlas (M0 Free tier works)
- Build/Deploy: Render (Static Site for client, Web Service for server)
- Create & open documents via URL (UUID)
- Collaborative editing with Quill
- Realtime updates over WebSockets (Socket.IO)
- Autosave every few seconds
- Rich text formatting (headings, lists, bold/italic/underline, code blocks, images, alignment, colors)
/client # React + Vite app
/server # Node.js + Express + Socket.IO API
- Node.js 18+
- Yarn
- MongoDB Atlas cluster (or local MongoDB)
- Render accounts for frontend and backend (optional but recommended)
PORT=3001
MONGODB_URL=<your MongoDB connection string>
# Comma-separated list of allowed client origins (no spaces)
ALLOWED_ORIGINS=http://localhost:3000,https://google-docs-clone-zv83.onrender.com
# Point this to your local or deployed server base URL
VITE_SERVER_URL=http://localhost:3001
# For production build on Render (example):
# VITE_SERVER_URL=https://<your-backend-on-render>.onrender.com
# in /client
yarn
# in /server
yarn# in /server
yarn dev # or: yarn start / node server.js (match your server script)# in /client
yarn dev # runs Vite on http://localhost:3000Open http://localhost:3000 and create/open a document route like:
/documents/26edcc24-3634-474c-948a-7f284cd1be20
- Create a Web Service from the
/serverdirectory of your GitHub repo. - Environment:
- Add
MONGODB_URL - Add
ALLOWED_ORIGINSexactly as:http://localhost:3000,https://google-docs-clone-zv83.onrender.com
- Add
- Build command:
yarn - Start command (match your server script):
or
yarn startnode server.js - Note the backend URL (e.g.
https://your-server.onrender.com).
- Create a Static Site from the
/clientdirectory of your GitHub repo. - Environment (Static Site):
- Add
VITE_SERVER_URLand set it to your backend URL from step A (e.g.https://your-server.onrender.com).
- Add
- Build command:
yarn build - Publish directory:
dist - Redirects/Rewrites (SPA fix)
Add a rewrite so deep links like
/documents/<id>work on refresh:- Source:
/* - Destination:
/index.html - Action:
Rewrite
- Source:
This prevents 404s when opening a document URL directly in a new tab.
- Presence indicators & live cursors
- Commenting / suggestions mode
- Version history & snapshots
- Authentication & sharing permissions
