Deployment TutorialsSupported
End-to-end walkthroughs, as opposed to the task-shaped answers in Guides. Each one starts from an empty directory and ends with something running.
Start here#
Quick Start — a schema, a query, a typed result, in about five minutes. Read this before anything else on this page.
Your First Application — a controller, a module, a repository behind DI, and a route that returns real rows.
The three things that trip people up on day one#
Worth knowing before you follow any tutorial, because each one otherwise interrupts the first working run:
The AOT transformer must be configured. If it is not, is<T>() and assert<T>() throw because the erased type argument has no runtime witness. Write this test first, in every project:
it('the transformer is running', () => {
expect(is<{ id: number }>({ id: 'x' })).toBe(false);
});See AOT Setup.
References is a tag, not a call. The target is a table.column string literal, so there is nothing to import and no schema value to have on hand:
authorId: number & Sql<'integer'> & References<'users.id'>;The query builder is immutable. b.where(...) returns a new builder; it does not modify b. Chain or reassign.
Deploying#
| Deployment | The general shape: build, migrate, roll |
|---|---|
| Vercel | Functions, and the connection arithmetic |
| Next.js | Server components, route handlers, the bundler |
| Netlify | Functions and edge functions |
| Supabase Edge Functions | Deno, and the transformer problem |
| Railway | A long-running container, which is the easy case |
| Encore | Infrastructure-from-code, and where it conflicts |
Client applications#
Start with one generated HTTP client, then choose the framework guide that owns the application lifecycle:
| Client Applications | support and ownership across all nine integrations |
|---|---|
| React | context, hooks, cancellation, and request-local SSR |
| Angular | DI, signals, DestroyRef, and RxJS cancellation |
| Vue | plugin injection, reactive state, and SSR isolation |
| Svelte | context, lazy stores, and subscriber teardown |
| Solid | resources, owner disposal, Suspense, and errors |
| React Native | AppState, connectivity, credentials, and Metro |
| Next.js | App Router request scopes and browser separation |
| Nuxt | Nitro request clients and native hydration |
| SvelteKit | event fetch, load helpers, and navigation aborts |
Local development#
| Local Postgres | Docker, fast resets, psql |
|---|---|
| Local MySQL | Docker, and the collation settings that matter |
| PGlite | Postgres in-process, no daemon |
| Testing | Compile SQL with no database; fake the driver |
Going deeper#
| Schema Declaration | Columns, relations, options |
|---|---|
| Repository API | Every method, with the DTO types |
| Migrations | Snapshot, diff, emit, run |
| OpenAPI Generation | Controllers to a spec |
| Anti-Patterns | What zmdb deliberately will not do |
---
See also: Quick Start · Guides · Deployment