Quick Start: Full Stack
The fastest way to see the full stack in action is the example app — a SvelteKit app on Cloudflare that wires together auth, database, realtime, AI, billing, images, and rate limiting. It’s the canonical reference for how the packages fit together.
Run it locally
Section titled “Run it locally”-
Clone and install:
Terminal window git clone https://github.com/brianschwabauer/delightstack.gitcd delightstackpnpm install -
Start the example app (runs the SvelteKit dev server and a
wrangler devworker with the real Durable Object bindings):Terminal window pnpm dev:exampleThe SvelteKit app runs on
:5174and forwards to the backend worker on:8787.
How it’s wired
Section titled “How it’s wired”The example app uses the two-worker model from the Architecture page:
apps/example-app/server— the backend worker. Re-exports the five Durable Object classes (AuthDatabaseServer,OrgDatabaseServer,AppWebsocketServer,RateLimiterServer,ImageProcessorContainer) and declares them with migrations + the image-processing container inwrangler.toml.apps/example-app— the SvelteKit app. Binds those DO classes cross-script and uses them fromhooks.server.ts:createAuthHandle()resolves the session and populatesevent.locals.createWebsocketHandle()upgrades realtime connections.- The DB/WS/rate-limiter DOs are reached via
platform.env.*.
A typical request flow:
// hooks.server.ts (simplified)import { sequence } from '@sveltejs/kit/hooks';import { createAuthHandle } from '@delightstack/auth/server';import { createWebsocketHandle } from '@delightstack/websocket/server';
const auth = createAuthHandle({ config: authConfig, getDb: (e) => e.platform.env.AUTH });const ws = createWebsocketHandle({ getServer: (e) => e.platform.env.WS });
export const handle = sequence(auth, ws, appHandle);Deploying
Section titled “Deploying”The example app deploys to Cloudflare. Build artifacts come from pnpm build; deploy the backend
worker first, then the app worker (its DO bindings reference the backend). See the per-package
guides for the secrets and resources (KV, R2, AI Gateway) each one needs.
Next steps
Section titled “Next steps”- Architecture — the topology in detail
- Packages overview — what each package gives you
- Auth — usually the first package to wire up
- Database — reactive data + search