← Projects · Web Development / active
Durable Chat // Edge Messaging
Real-time edge messaging platform built with Cloudflare Workers, Durable Objects embedded SQLite, R2, and React 19.
Real-time room messaging, highlighted search, and Web Push UI
React 19PartySocket Technical Case Study
From problem statement to working software.
Stack and architectural building blocks:
Project Overview
Low-latency room-isolated chat application backed by Cloudflare Durable Objects with embedded SQLite persistence, Google OAuth 2.0, Turnstile verification, CSWSH Origin protection, and R2 audit archiving.
Problem Statement
Centralized WebSocket backends incur high scaling overhead and latency spikes while exposing real-time rooms to Cross-Site WebSocket Hijacking (CSWSH) risks.
Architecture & Security Controls
Edge requests hit Cloudflare Workers and route each room via PartyServer to an isolated Durable Object backed by embedded SQLite. Authentication enforces Google OAuth 2.0 and Cloudflare Turnstile, WebSocket upgrades validate strict Origin headers, and compliance audit logs compress periodically into R2.
Key Highlights
- Per-room stateful isolation and zero-cold-start persistence via Durable Objects SQLite
- End-to-end WebSocket hardening with CSWSH Origin checks, Google OAuth, and Turnstile
- Instant full-text room/message search, highlighting, replies, and reactions
- Automated compliance log rotation to Cloudflare R2 and Web Push PWA support
Related Engineering Write-Up & Live Security Tools