Flux Docs
A browser-native state sync and offline resilience engine. Flux turns the browser into an intelligent data layer, IDB caching with TTL, a 3 layer offline write queue, realtime sync over any backend, and structural multi-tenant isolation for authenticated apps.
What Flux Is Not
The five things Flux deliberately does not do: server-side Redis, rate limiting, server to server calls, payment processing, and auth validation. Read this first if you're deciding whether Flux fits your stack.
Multi-Tenant Scoping
How Flux isolates per user cache, queues, and jobs on a shared browser structural namespacing, an explicit purge on logout, and a self-healing boot sweep. Read this before shipping an authenticated dashboard.
Install, withFlux() config, FluxProvider, and the SW/App Router hydration fix.
Same shape as the Next.js guide, minus the service worker specifics.
Signals adapter for Angular 16+, plain service pattern for 14–15.
Core Concepts
The mental model — the 5-layer stack, IDB & TTL, the offline write queue, mutation pipeline, job tracker, conflict resolution, sync anchors, and ActivityBus.
12 pagesAPI Reference
Every exported function — signature, parameters, return type, and one runnable example each.
13 pagesAdapters
Supabase, Socket.io, SSE, and WebSocket — plus the built-in polling adapter for apps with no realtime backend at all.
4 pagesBootstrap Endpoint Guides
Working backend examples for the single-packet bootstrap response — Postgres, MongoDB, Node, or any REST API.
5 pagesIngestion Strategies
SNAPSHOT, COLLECTION_ALL, LRU, and PAGINATED (deferred) — full register() examples for each.
4 pagesState Managers
Zustand, Redux, and Jotai adapters, plus how to wire up anything else via hydrateState.
4 pagesLicense
Setup, domain binding, quotas, and webhook reporting for the offline, signed-JWT license system.
4 pagesMigration Guides
Coming from Redis, a custom IDB implementation, or TanStack Query — what Flux replaces and what it doesn't.
3 pagesOffline Patterns
Practical recipes on top of the core concepts — the offline upload flow and a conflict resolution UI.
2 pagesFlux reduces or eliminates Redis for frontend state distribution TTL-aware caching, offline queues, and realtime sync that works with any backend.