Packages Overview
DelightStack’s backend packages are for building full-stack apps on Cloudflare Workers. Each package is edge-native, built on Durable Objects, and designed to work together — but every one of them stands on its own.
The packages
Section titled “The packages” @delightstack/auth JWT sessions, Argon2id password hashing, OAuth, magic links, multi-org, invitations, and SvelteKit route guards.
@delightstack/database Type-safe reactive SQLite on Durable Objects, with full-text + vector search (Orama), Zod validation, and automatic migrations.
@delightstack/websocket Room-scoped realtime with reactive presence, typed events, hibernation, and live database sync.
@delightstack/presence Live cursors, online roster, cursor chat, reactions, and field presence — on a swappable transport and identity.
@delightstack/ai Chat completions, resumable streaming over WebSocket, and async vector embeddings via Cloudflare AI Gateway.
@delightstack/stripe Stripe billing — products, subscriptions, metered usage, webhooks, and subscription guards.
@delightstack/images Image processing via Cloudflare Containers — variants, ThumbHash, EXIF, color extraction, and face-aware crops.
@delightstack/rate-limiter Token-bucket rate limiting as a Durable Object, with zero runtime dependencies.
What they share
Section titled “What they share”- Durable Objects everywhere. Each package’s server lives in a Durable Object, giving you a single-writer model — one instance handles all writes for a given key, so there are no race conditions. SQLite provides durable, transactional storage inside the DO.
- Edge-native. No external database, queue, or cache to provision. Everything runs on Cloudflare’s network, close to your users.
- Reactive Svelte 5 clients.
auth,database,websocket,ai, andstripeship a client built on Svelte 5 runes ($state/$derived) with off-thread workers and optimistic updates. - SvelteKit handles. Most packages expose a
create*Handle()that plugs into SvelteKit’shandlehook, wiring API routes, auth, and CSRF for you. DelightErrorfor errors. Every package throws the singleDelightErrorclass from@delightstack/utilitiesfor consistent, serializable error responses.
Not drop-in libraries — infrastructure
Section titled “Not drop-in libraries — infrastructure”Unlike the component library, these packages assume a specific Cloudflare Workers + Durable
Objects topology: you re-export the DO classes from a Worker, declare them in wrangler.toml
with migrations, and bind them into your app. The Architecture page explains
that wiring, and the example app
is the canonical reference for putting it all together.
Next steps
Section titled “Next steps”- Architecture — Durable Object topology, bindings, and migrations
- Quick Start: Full Stack — stand up the example app end-to-end
- Pick a package from the sidebar to go deep