A modern, real-time collaborative documentation platform built for speed, security, and developer-centric content control.
OG Docs is a full-stack web application designed to streamline the way teams and developers write, edit, and share documentation together. The platform emphasizes structured content delivery and real-time collaboration, moving beyond traditional plain-text storage toward a robust, custom-tailored data architecture.
Built as a high-performance MERN application, OG Docs enables multiple collaborators to work simultaneously in a shared workspace, with changes reflected instantly for everyone—ensuring smooth, efficient, and transparent collaboration.
- Real-Time Collaborative Workspace: A dedicated editing area where multiple collaborators can make changes simultaneously, with updates reflected in real time.
- Custom Slate.js Engine: A custom-built implementation that structures content into JSON format for consistent styling and long-term portability.
- Modern UI/UX: A clean, responsive interface built with React 19, Tailwind CSS 4.0, and CoreUI components.
- Secure Authentication: Integrated Google OAuth for fast and secure user access.
- Developer-Friendly Build: Optimized with Vite for near-instant hot module replacement (HMR).
- Robust Security: Hardened backend using Helmet, HPP, Rate Limiting, and Zod for strict schema validation.
- Library: React 19
- Styling: Tailwind CSS 4.0 & CoreUI
- Editor: Slate.js (Custom JSON Content Engine)
- State & Routing: React Router 7
- Build Tool: Vite
- Runtime: Node.js
- Framework: Express.js (v5)
- Authentication: JWT & Google Auth Library
- Validation: Zod
- Database: MongoDB
- ODM: Mongoose
The core logic of OG Docs revolves around a structured, collaborative data pipeline:
- The Input: Contributors write using a custom editor powered by Slate.js. Instead of generating raw HTML, the editor produces a clean JSON tree representing the document structure.
- The Collaboration Layer: Multiple users can edit the same document simultaneously, with real-time updates synchronized across all active sessions.
- The Storage: The JSON structure is validated using Zod and securely stored in MongoDB via Mongoose models.
- The Rendering: On the frontend, a custom rendering engine traverses the JSON tree and dynamically paints the content using Tailwind-styled React components.
Follow these steps to run OG Docs locally.
-
Clone the Repository
git clone https://github.com/shamil-tp/Blogify.git cd blogify -
Setup Backend
cd backend npm installCreate a
.envfile in thebackendfolder and add yourMONGODB_URI,JWT_SECRET, andPORT. -
Setup Frontend
cd ../frontend npm install -
Run Development Servers
- Backend:
npm run test(nodemon) - Frontend:
npm run dev(Vite)
- Backend:
-
View the App Open
http://localhost:5173in your browser.
This project was collaboratively designed and developed by:
OG Docs is built with collaboration at its core—designed to help teams write, iterate, and ship documentation together, faster and cleaner.
frontend/src/ ├── collaboration/ │ ├── socket.js │ ├── ydoc.js │ ├── awareness.js │ └── collabTypes.js │ ├── hooks/ │ ├── useAuth.jsx │ └── useCollaboration.js ← NEW │ ├── components/ │ └── GridEditor/ │ ├── GridEditor.jsx │ ├── withCollaboration.js ← NEW │ ├── TextWidget.jsx │ ├── ImageWidget.jsx │ └── VideoWidget.jsx
backend/ ├── socket/ │ ├── index.js │ ├── auth.js │ ├── rooms.js │ └── handlers/ │ ├── joinDoc.js │ ├── syncUpdate.js │ ├── awareness.js │ └── disconnect.js │ ├── collaboration/ │ ├── yjs/ │ │ ├── createDoc.js │ │ └── applyUpdate.js │ └── persistence/ │ ├── loadSnapshot.js │ └── saveSnapshot.js
👤 Teammate A — Backend (Realtime Engine) 🎯 Responsibility
Everything related to:
Socket.IO
Yjs document sync
MongoDB snapshots
📁 Files they touch backend/ ├── socket/ ├── collaboration/ ├── models/Blog.js
They do NOT touch frontend.
🔧 Their Tasks (Very Exact) A1 — Socket.IO server
Attach Socket.IO to Express
JWT auth on connection
Rooms per blogId
A2 — Yjs document manager
Create Yjs doc per blog
Load collabSnapshot
Keep docs in memory
A3 — Sync protocol
Receive Yjs updates
Broadcast to room
Prevent echo loops
A4 — Persistence
Save snapshot when:
last user leaves
OR every 30s
📦 Output
socket.emit("doc:update", update) socket.emit("doc:sync", state)
👤 Teammate B — Frontend (Quill + Yjs) 🎯 Responsibility
Bind Quill editor → Yjs → Socket.IO.
📁 Files they touch frontend/src/ ├── collaboration/ │ ├── socket.js │ ├── ydoc.js │ └── awareness.js │ ├── components/GridEditor/ │ ├── GridEditor.jsx │ └── withCollaboration.js
They do NOT touch backend.
🔧 Their Tasks (Very Exact) B1 — Yjs + Quill binding
Create Y.Doc
Create Y.Text
Bind using y-quill
import { QuillBinding } from 'y-quill'
B2 — Socket sync
Send Yjs updates to backend
Apply remote updates
B3 — Presence & cursors
Use quill-cursors
Show colored cursors per user
📦 Output