Skip to content

About

Horizontally scalable chat system featuring a local-first client layer (Dexie.js/IndexedDB) for offline messaging, optimistic state syncing, and BullMQ background workers for reliable Web Push delivery.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

79 Commits

Folders and files

Repository files navigation

Quick Chat

A real-time messaging platform built with modern web technologies. Designed for high concurrency, offline resilience, and sub-100ms message delivery.

Tech Stack

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)

Architecture

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)]
Loading

Quick Start

# 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 dev

Open http://localhost:3000.

Documentation

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

Folder Structure

/
├── client/          # Next.js 15 frontend
├── server/          # Node.js + Express backend
├── docs/            # Engineering documentation
├── .nvmrc           # Node version (22)
└── .gitattributes   # LF normalization

License

MIT

About

Horizontally scalable chat system featuring a local-first client layer (Dexie.js/IndexedDB) for offline messaging, optimistic state syncing, and BullMQ background workers for reliable Web Push delivery.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages