Back to Case Studies
Case Study 06
Real-Time Multi-User Chat
From-scratch real-time messaging system using Bun's native WebSocket server — no frameworks, pure fundamentals.
#dev-ops3 online
Connection established
Hey, the deploy went through
Nice. Zero downtime?
Yep, all health checks passed
None
Framework
None
ORM
Bun
Runtime
Custom WS
Protocol
The Problem
Needed a from-scratch real-time messaging system to demonstrate WebSocket fundamentals and serve as a reference implementation. No frameworks, no ORMs — pure fundamentals.
The Solution
- Built with Bun runtime's native HTTP + WebSocket server (no Express, no Fastify)
- PostgreSQL with raw SQL queries and manual migration system
- React frontend with Vite
- Custom WebSocket protocol with JSON message types
- Read/unread (seen) feature with per-user tracking
- Chat rooms with real-time message broadcasting
- JWT auth with Bun.password hashing
Tech Stack
Bun TypeScript PostgreSQL React Vite WebSocket
Related Case Studies
Ready to start?
Let's build something solid.
We take on a limited number of projects to ensure every engagement gets our full engineering focus.
Start a Project