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: a server side in memory cache layer, rate limiting, server to server calls, payment processing, and auth validation. Read this first if you are deciding whether Flux fits your stack.
Multi-Tenant Scoping
How Flux isolates cache, queues, and jobs for each user on a shared browser, using 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 and App Router hydration fix.
Same shape as the Next.js guide, minus the service worker specifics.
Coming soon. Until then, the React guide shows the overall shape of a Flux setup.
Coming soon. Until then, the React guide shows the overall shape of a Flux setup.
Coming soon. Until then, the React guide shows the overall shape of a Flux setup.
A 10 line server snippet, with Node and Mongo, Node and Postgres, and NestJS variants.
Works with Python, Go, Rails, or any backend that speaks Server Sent Events.
Connect Flux to a raw WebSocket server written in any language or framework.
Use Supabase realtime or any Postgres database as the source of live updates.
Core Concepts
The mental model: the five layer stack, IDB and TTL, the offline write queue, mutation pipeline, job tracker, conflict resolution, sync anchors, and ActivityBus.
15 pagesAPI Reference
Every exported function with its 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, covering Postgres, MongoDB, Node, GraphQL, or any REST API.
5 pagesIngestion Strategies
SNAPSHOT, COLLECTION_ALL, LRU, and PAGINATED (deferred), with full register() examples for each.
4 pagesState Managers
Zustand, Redux, Jotai, and Stunk adapters, plus how to wire up anything else through hydrateState.
4 pagesLicense
Setup, domain binding, quotas, and webhook reporting for the offline license system built on signed JWTs.
4 pagesMigration Guides
Coming from an in memory cache layer, a custom IDB implementation, or server state hooks? See what Flux replaces and what it does not.
3 pagesOffline Patterns
Practical recipes built on the core concepts, including the offline upload flow and a conflict resolution UI.
2 pagesFlux moves caching and live updates for your interface into the browser. You get IndexedDB caching with expiry control, one realtime connection per session, and offline support, all working with any backend and with no extra infrastructure for frontend state.