A real-time messaging platform built with modern web technologies. Designed for high concurrency, offline resilience, and sub-100ms message delivery.
| Layer | Technology |
|---|---|
| Client | Next.js 15, React 19, TypeScript, Tailwind CSS, Zustand |
| Server | Node.js, Express, TypeScript, Prisma |
| Database | MongoDB |
| Cache | Redis (Upstash) |
| Realtime | Socket.io with Redis Pub/Sub |
| Queue | BullMQ (Redis-backed) |
| Offline | IndexedDB (Dexie.js) |
graph TB
subgraph Client
A[Next.js App] --> B[Dexie.js IndexedDB]
A --> C[Socket.io Client]
end
subgraph Server
D[Express API] --> E[Prisma ORM]
F[Socket.io Server] --> G[Redis Pub/Sub]
D --> H[BullMQ Queue]
end
A -- HTTP/REST --> D
C -- WebSocket --> F
G -- horizontal sync --> F
H --> I[Chat Worker]
E --> J[(MongoDB)]
# Clone
git clone <repo-url> && cd quick-chat
# Backend
cd server && pnpm install && pnpm run dev
# Frontend (new terminal)
cd client && pnpm install && pnpm run devOpen http://localhost:3000.
| Document | Description |
|---|---|
| Architecture | High-level system design and component relationships |
| System Design | Auth flow, message lifecycle, cache strategy |
| Message Flow | End-to-end message delivery with sequence diagrams |
| Engineering Decisions | Tradeoffs and rationale for technology choices |
| API Reference | Complete REST and WebSocket API documentation |
| Deployment | Environment setup, Docker, production build |
| Performance | Optimizations, caching, scalability |
| Performance Engineering | Reconnect resilience, instrumentation, fanout hot spots |
| Performance Implementation | Shipped phases, commits, rollback |
| Security | Auth, validation, attack prevention |
| Client Docs | Frontend architecture and component structure |
| Server Docs | Backend modules, services, and infrastructure |
/
├── client/ # Next.js 15 frontend
├── server/ # Node.js + Express backend
├── docs/ # Engineering documentation
├── .nvmrc # Node version (22)
└── .gitattributes # LF normalization
MIT