🚀 Fresher Portfolio Project #1

Real-time
Collaborative
Notes App

A full-stack application where multiple users edit the same document simultaneously — powered by WebSockets, React, Node.js & MongoDB.

WebSockets React Node.js MongoDB JWT Auth REST API Tailwind CSS
Under the Hood

How It Works

From the moment you type a character to when your collaborator sees it — here's the full journey.

🔐

User Authentication

Users sign up / log in via a REST API. The server issues a JWT token stored in the browser. Every request carries this token so the server knows who you are.

📄

Create / Open a Note

Notes are stored in MongoDB. When you open a note, the client fetches its content via a GET request and renders it in the editor. A unique room ID is assigned per note.

⚡

WebSocket Connection

The moment you open a note, your browser establishes a WebSocket connection to the server and joins a "room" specific to that note. This keeps a live, two-way channel open.

✍️

Typing & Broadcasting

When you type, your client emits a text-change event with the delta (just the change, not the whole doc) to the server. The server broadcasts it to all other users in the same room.

🔄

Operational Transform / CRDT

If two users type at the same moment, conflicts are resolved via Quill's built-in delta model (a simple OT approach) — ensuring both changes merge correctly without overwriting each other.

💾

Auto-save to Database

Every 2 seconds, the server debounces incoming changes and saves the latest document state to MongoDB. If the connection drops and reconnects, you always get the latest saved version.

SYSTEM ARCHITECTURE
React Client (User A)
React Client (User B)
React Client (User C)
↕ HTTP (REST)
↕ WebSocket (Socket.IO)
Express.js REST API
Socket.IO Server
↕
MongoDB (Notes + Users)

■ Frontend ■ REST Backend ■ Realtime ■ Database
LIVE COLLABORATION SIMULATION
Alice (editing)
Bob (viewing)
Charlie (offline)
📝 Meeting Notes — Q1 Planning
Goals for this quarter: launch v2,
improve onboarding flow
Assigned to: Alice, Bob
Technology

The Full Tech Stack

Every tool chosen intentionally. Hover each card to see why it was picked.

⚛️

React.js

Frontend UI

Component-based JavaScript library for building the user interface. Handles routing, state management, and re-renders only what changes — keeping the editor fast even while receiving live updates.

WHY IT MATTERS React's state-driven model means when a WebSocket event arrives with new text, only the affected editor component re-renders — not the whole page. Crucial for performance in a real-time app.
🟩

Node.js + Express

Backend Server

JavaScript runtime that runs the server. Express adds a minimal web framework for defining REST API routes (login, signup, CRUD for notes). Node's event loop handles thousands of concurrent WebSocket connections without blocking.

WHY IT MATTERS Since both frontend and backend use JavaScript, you share types and logic easily. Node's non-blocking I/O is perfect for real-time apps with many simultaneous connections.
🔌

Socket.IO

Real-time Engine

A library that wraps WebSockets (with fallback to HTTP long-polling). Provides rooms, namespaces, and event-based communication. When Alice types, her delta is emitted to a room — only users in that room receive it.

WHY IT MATTERS Raw WebSockets need manual reconnection logic, rooms, and fallbacks. Socket.IO handles all that out of the box — letting you focus on the app logic rather than protocol internals.
🍃

MongoDB + Mongoose

Database

NoSQL document database. Notes are stored as JSON documents — they don't have a rigid schema, so adding fields like "tags" or "version history" later is trivial. Mongoose provides schema validation and query helpers.

WHY IT MATTERS Notes are naturally document-shaped. A note is just a JSON object with content, owner, collaborators, timestamps. MongoDB stores this natively — no complex joins needed.
🔑

JWT Authentication

Security

JSON Web Tokens are signed, stateless tokens issued on login. Stored in the browser (HttpOnly cookie or localStorage), they are sent with every API request. The server verifies the signature without needing a database lookup for every request.

WHY IT MATTERS JWTs are stateless — no server-side session store needed. This makes your backend horizontally scalable. It's also industry-standard — every job description mentions JWT.
📝

Quill.js Editor

Rich Text

An open-source rich text editor that represents document content as "Deltas" — a JSON-based diff format. Instead of sending the whole document on each change, you send just the delta (e.g., "insert 'h' at position 42"). This is the foundation of real-time sync.

WHY IT MATTERS Quill's Delta format is tailor-made for collaboration. Deltas are compact, composable, and conflict-friendly. They integrate directly with Socket.IO events — this is the secret sauce of the real-time sync.
🎨

Tailwind CSS

Styling

Utility-first CSS framework. Instead of writing custom CSS classes, you compose styles directly in JSX using utility classes like flex gap-4 rounded-lg. Speeds up UI development dramatically.

WHY IT MATTERS Recruiters notice polished UIs. Tailwind lets a solo developer produce professional-looking interfaces quickly. It's also the most in-demand CSS framework in job postings right now.
☁️

GitHub Pages + Render

Deployment

GitHub Pages hosts the static React frontend for free. Render.com hosts the Node.js backend (also free tier). MongoDB Atlas provides a free cloud database. Combined, your full-stack app is live at zero cost.

WHY IT MATTERS A live link in your resume is 10x more impressive than a GitHub repo. Recruiters can click it and immediately use your project. This stack gets you deployed for free in under 30 minutes.
Free Hosting

Deploy to GitHub Pages

Get a live shareable link for your resume in 4 steps. Frontend on GitHub Pages, backend on Render, database on MongoDB Atlas — all free.

01

Set Up GitHub Repo

Create a new repository, push your code. Name the repo collab-notes or anything you like.

git init && git push origin main
02

Build & Deploy Frontend

In your React app, run the build command. Then use gh-pages package to push the build folder to the gh-pages branch.

npm run build && npm run deploy
03

Deploy Backend on Render

Sign up at render.com → New Web Service → connect your GitHub repo → set build and start commands. Render auto-deploys on every push.

node server.js
04

MongoDB Atlas (Free DB)

Create a free M0 cluster on atlas.mongodb.com. Copy the connection string and add it as an environment variable on Render.

MONGO_URI=mongodb+srv://...
PRO TIP FOR YOUR RESUME

Add this line under the project: "Live at [your-github-username].github.io/collab-notes — try editing simultaneously in two browser tabs." That single instruction shows recruiters exactly how to test your real-time feature in 5 seconds.

Ready to build it?

Check out the app itself, then come back here to understand every piece.

✏️ Open the App →