← 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.

Private Repository · Closed Source
Edge Runtime Workers + Durable Objects
Frontend React 19 + TypeScript
Security CSWSH + OAuth + R2
Durable Chat // Edge Messaging interface preview
PREVIEW // DURABLE-CHAT Sanitized interface & telemetry preview · Zero secrets

INTERACTIVE ARCHITECTURE BLUEPRINT · 4 LAYERS

Edge WebSocket & Durable Object State Architecture

WSS / HTTPS Cloudflare Worker Durable Object (SQLite) R2 Archive
HOP 01/04 Inspecting · React 19 PWA Client
01 Selected Layer
React 19 PWA Client

Real-time room messaging, highlighted search, and Web Push UI

Technology Stack
React 19PartySocket
DEFENSE-IN-DEPTH Security Control
CSP headers, secure cookies & Turnstile challenge

Technical Case Study

From problem statement to working software.

Stack and architectural building blocks:

  • Cloudflare Workers
  • Durable Objects
  • React 19
  • TypeScript
  • R2

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