SURJEET® — PORTFOLIO 2025NEW DELHI, IN — 28.6139° N
SURJEET
000
COMPILING PORTFOLIO — FULL-STACK / AI / E-COMMERCEPATIENCE IS A VIRTUE. SPEED IS A HABIT.

CASE STUDY — 03 / WEB APP — Aug 2024

Multi-user editing with live chat — sub-50ms sync latency in local testing.

RoleFull-stack, solo
StackNext.js · Node.js · WebSockets · Redis
ShippedAug 2024
StatusOpen source ↗
Real-Time Workspace

THE PROBLEM

Collaborative tools are either heavyweight platforms or toy demos with 400ms of lag. I built a lean multi-user workspace: shared documents, presence, and live chat, engineered so the sync loop is fast enough that you stop noticing it.

Real-time sync fails in the boring places: every client broadcasting to every other client, chat and document updates fighting over the same socket, and state drifting the moment two people touch the same paragraph.

03.BTHE BUILDFOUR DECISIONS THAT MATTERED
↳

THE APPROACH

Socket.io channels are split by concern — document updates, presence, and chat each get their own lane. Redis Pub/Sub fans updates out across server instances, so the architecture scales horizontally instead of living and dying on one process. Document ops are batched and applied in order to keep every client converging on the same state.

01

Sub-50ms sync loop

Local-tested end-to-end latency: update → broadcast → apply, with operations batched to survive bursts without visible lag.

02

Redis Pub/Sub fanout

Updates propagate across server instances, so rooms are not pinned to a single process — the pattern real products scale on.

03

Presence + live chat

Who is in the room, who is typing, and the conversation — all on dedicated socket channels so chat never competes with document ops.

04

Conflict-safe updates

Ordered operation application keeps concurrent editors converging instead of diverging.

0ms
Sync latency, local testing
0
Socket lanes — docs / presence / chat
∞
Horizontal scale via Redis
0
Repo, fully open source
GALEVIDENCEFIG. 01 — 02
“Multiplayer isn’t magic. It’s plumbing done right.”

— Architecture note — August 2024

Open live
Source on GitHub
NEXT CASE — 01 / BATCH TOOLWatermarking Engine ↗