Build Your First App
This tutorial builds one feature end to end, in nine milestones. Each one ends with something you can see or run: a page, a passing test, a command's output.
The starter you scaffold already has a working example resource, Projects: a model, a policy, a form request, a factory, pages and tests. You will not rebuild it. You will add Tasks inside a project next to it, using it as the pattern, and then grow the app around them:
- Scaffold and run — a new app on your machine, signed in as the demo user.
- A model and a migration — a
taskstable and theTaskmodel. - Routes and pages — a page per project that lists its tasks, with a form to add one.
- Validation — what a task must contain, and the errors the form shows when it does not.
- A policy — only the project's owner can change or delete its tasks.
- A queued notification — an email to whoever a task is assigned to, sent in the background.
- Feature tests — every action, and the test that proves a stranger is refused.
- Teams —
@zerotal/tenancy, so each team sees only its own projects and tasks. - Deploy — the release gate, the production checklist, and the app running in production mode.
Before you start
You need Bun 1.3.14 or later, and nothing else: the starter uses SQLite, and mail is printed to the terminal until you configure a real driver. The Getting Started page covers installation in more depth.
Every command and every file in this tutorial was run on an app scaffolded from
create-zerotal@1.18.0. If you are on a later version, the steps still apply; the
Release Notes say what changed.
React, Vue or Flow
The main path uses the React starter. Everything on the server — models, migrations, routes that handle forms, validation, policies, notifications, tests and tenancy — is the same in all three. Where a step differs, a short On Vue or On Flow note says how:
- Vue differs only in the page components, which are
.vuefiles. - Flow renders its pages on the server as components registered in
routes/web.ts, so its page steps differ more. Its form handlers are the same files as React's.
Choosing a frontend explains the difference between them.
Working with a coding agent
The starter ships AGENTS.md, an MCP config and skills for the same tasks this tutorial
covers: adding a resource, queued notifications, feature tests and tenancy. The tutorial
does each step by hand so you know what the agent is doing when it does them for you.
See Agent Surface.