A full-stack real-time document editor where multiple users can collaborate simultaneously. Built for a 5-hour hackathon.
- Frontend: collab-app-omega.vercel.app
- Backend: group-1-8vy2.onrender.com
- 🔐 User Authentication — Register and login with email/password via Supabase Auth
- 📄 Document Management — Create, open, and delete documents from your personal dashboard
- ✍️ Rich Text Editing — Full formatting toolbar powered by Quill.js (headings, bold, italic, lists, code blocks)
- ⚡ Real-time Collaboration — Changes made by any user instantly appear for all connected users via Socket.io
- 💾 Auto-save — Document content automatically saves to the database every 3 seconds
- 🕓 Version History — Every save creates a snapshot, allowing content recovery
- 👥 User Presence — See colored avatars of who else is currently editing the document
- 🔒 Document Sharing — Owners can invite collaborators by email with editor permissions
- 📱 Responsive UI — Works on desktop and mobile
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite |
| Styling | Tailwind CSS v4 |
| Editor | Quill.js |
| Auth + Database | Supabase (PostgreSQL) |
| Real-time | Socket.io |
| Backend | Node.js + Express |
| Deployment | Vercel (frontend) + Render (backend) |
collab-platform/
├── client/ # React frontend
│ ├── src/
│ │ ├── pages/
│ │ │ ├── Login.jsx # Authentication
│ │ │ ├── Register.jsx # User registration
│ │ │ ├── Dashboard.jsx # Document list + create/delete
│ │ │ └── Editor.jsx # Quill editor + real-time sync
│ │ ├── lib/
│ │ │ ├── supabaseClient.js # Supabase singleton
│ │ │ └── socket.js # Socket.io singleton
│ │ └── App.jsx # Routing + auth guard
│ └── package.json
│
└── server/ # Express backend
├── index.js # Express + Socket.io server
├── routes/
│ └── docs.js # Document REST API
└── package.json
- Node.js 18+
- A Supabase account
git clone https://github.com/Maddy-MM/Group-1.git
cd Group-1Create a new project on Supabase, then run this in the SQL Editor:
-- Documents table
create table documents (
id uuid primary key default gen_random_uuid(),
title text not null,
content text default '',
owner_id uuid references auth.users(id),
created_at timestamp default now()
);
-- Version history
create table versions (
id uuid primary key default gen_random_uuid(),
doc_id uuid references documents(id) on delete cascade,
content text,
saved_at timestamp default now()
);
-- Document sharing/permissions
create table document_members (
id uuid primary key default gen_random_uuid(),
doc_id uuid references documents(id) on delete cascade,
user_id uuid references auth.users(id) on delete cascade,
role text default 'editor',
created_at timestamp default now(),
unique(doc_id, user_id)
);
-- Helper function for sharing by email
create or replace function get_user_by_email(email_input text)
returns table(id uuid, email text) as $$
select id, email from auth.users where email = email_input;
$$ language sql security definer;
grant execute on function get_user_by_email to anon, authenticated;cd client
cp .env.example .env
# Fill in your Supabase URL and anon key
npm install
npm run devcd server
cp .env.example .env
# Fill in your Supabase URL and service key
npm install
npm run devclient/.env
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_SOCKET_URL=http://localhost:4000
server/.env
PORT=4000
CLIENT_URL=http://localhost:5173
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=your_service_role_key
- Import repo on vercel.com
- Set root directory to
client - Add environment variables (use production Render URL for
VITE_SOCKET_URL)
- Create new Web Service on render.com
- Set root directory to
server - Build command:
npm install - Start command:
node index.js - Add environment variables (use production Vercel URL for
CLIENT_URL)
User A types → Quill fires text-change event
→ Delta sent to server via Socket.io
→ Server broadcasts delta to all users in the same document room
→ User B's Quill applies the delta instantly
→ Auto-save triggers after 3 seconds of inactivity
→ Content + version snapshot saved to Supabase
Built in 5 hours at a hackathon.