Kanban Example
A local Svelte app using Prisma Next IDB, explicit migrations, and a barebones PWA shell
The Prisma Next kanban example is a small local-only app. It keeps the demo focused on the browser database: no auth, no sync worker, and no server API.
Live app: next-kanban.prisma-idb.dev
Source: apps/prisma-next-idb-kanban-example
What it shows
- A committed migration chain under
migrations/app createAutoMigratingIdbClientopening IndexedDB and applying pending migrations- Chainable typed ORM calls like
where(...).update(...),include(...),all(), andtoArray() - Local relations across users, boards, and todos
- A minimal PWA manifest and service worker so the app shell works offline after the first load
Run it
From the repository root:
pnpm --filter @prisma-next-idb/kanban-example devFor a production check:
pnpm --filter @prisma-next-idb/kanban-example check
pnpm --filter @prisma-next-idb/kanban-example buildOffline behavior
The PWA setup intentionally stays small. The service worker precaches the built app shell and static files, then caches same-origin GET requests as they are fetched.
IndexedDB data already lives on the device. Once the browser has loaded the app and installed the service worker, the kanban UI can reopen offline and continue reading or writing local data.
Where to look
| File | Purpose |
|---|---|
src/lib/prisma/db.ts | Opens the auto-migrating IDB client |
src/lib/stores/kanban.svelte.ts | Uses the typed ORM from Svelte state |
src/service-worker.ts | Caches the app shell and same-origin assets |
static/manifest.webmanifest | Provides the installable PWA metadata |