Dexie Cloud Documentation
Dexie Cloud is an optional cloud service for Dexie.js that adds sync, authentication, access control, and real-time collaboration to your offline-first applications.
🤖 AI/LLM? For a structured documentation summary optimized for AI assistants, see llms.txt.
Getting Started
- Get started with Dexie Cloud — Step-by-step guide to add sync
- Quickstart — Fastest path to a syncing app
- Best Practices — Including primary keys
Example Applications
- Dexie Cloud To-do App — Full PWA with sharing (Vite + React)
- Dexie Cloud Starter (Next.js) — Next.js app with Y.js integration
Core Concepts
Authentication
- Authentication Overview — Login flows, OAuth, OTP
- db.cloud.login() — Trigger login
- db.cloud.logout() — Logout current user
- db.cloud.currentUser — Get logged-in user info
- Add Demo Users — Test without real emails
Access Control
- Access Control Overview — Realms, roles, permissions
- Realms — Isolated data compartments
- Roles — Permission sets for users
- Members — Users with access to realms
- DBPermissionSet — Permission definitions
- db.cloud.permissions() — Check permissions on objects
Sync & Consistency
- Consistency Models — Server-authoritative vs CRDT
- db.cloud.sync() — Force a sync
- SyncState — Current sync status
- db.cloud.syncState — Observable sync state
Y.js Integration (Real-time Collaboration)
- Y.js with Dexie — Overview of Y.js integration
- y-dexie — Store Y.Doc in Dexie tables
Client-side API
Configuration
- dexie-cloud-addon — The addon package
- db.cloud.configure() — Configure cloud connection
- DexieCloudOptions — Configuration options
Tables
- db.members — Members table
- db.realms — Realms table
- db.roles — Roles table
Observables
- db.cloud.currentUser — Current user observable
- db.cloud.syncState — Sync state observable
- db.cloud.invites — Pending invites observable
- db.cloud.webSocketStatus — WebSocket connection status
Server-side & Infrastructure
- REST API — Server-to-server integration
- Web Hooks — Event notifications
- CLI — Command-line interface
- API Limits — Rate limits and quotas
- Sharding & Scalability — Architecture for scale
- Self-hosted (Premium) — Run on your own servers
Additional Topics
- Custom Emails — Customize email templates
- Add Public Data — Data visible to all users
Have questions? Ask on Stack Overflow or Discord.