Back to projects

FreeChat

open source

Browser-based AI workspace with encrypted local storage

A browser-based AI workspace with client-side encrypted storage — thousands of messages at 60fps with 10× faster first renders. BYOK multi-model across OpenRouter and Z.AI, streaming with recovery, rate limiting, and credit-based billing. Its agent-side counterpart is Ompdeck, my cockpit for the pi coding agent.

  • Delivered 60fps scrolling across 1000s of messages — ~99% fewer re-renders via Svelte 5 runes + virtual scrolling
  • Cut initial render 10× — 100 messages in ~200ms, down from ~2000ms
  • Built to survive failure — streaming with partial-stream recovery, request queueing, rate limiting
  • Hardened by design — DOMPurify throughout, WCAG AA, encrypted local storage with keys on-device
  • Kept users free — multi-provider (Z.AI + OpenRouter), BYOK, credit billing with token tracking
  • Proven by tests — unit, integration, performance benchmarks, Playwright E2E

problem

AI chat tools either hold your conversations on their servers or lock you into one provider — privacy and portability both gone.

approach

Built a workspace where storage is client-side encrypted and models are bring-your-own-key: streaming with recovery, rate limiting and credit-based billing across OpenRouter and Z.AI.

outcome

A private AI workspace — thousands of messages at 60fps, 10× faster initial renders, and no server-side message storage to breach.

typescriptsveltellmbyokstreamingencryption