Zebric Quickstart (5 minutes)
This quick start gets you up and running with a Zebric web application on your local machine.
Prerequisites
Section titled “Prerequisites”You’ll need Node.js 22 or above. Zebric’s CI and published images use Node.js 24.
Create a Project
Section titled “Create a Project”npm create zebric@latest my-appcd my-appnpm installnpm run validatenpm run devOpen http://localhost:3000. You’ll see three sample posts. Continue with creating your first post below.
The starter includes the Blueprint, package scripts, README, and .gitignore without
installing dependencies. It requires a new or empty directory and never prompts.
Use . instead of my-app for the current empty directory. zebric init in
@zebric/cli creates the same starter. No AI credential is needed.
Create the Files Manually
Section titled “Create the Files Manually”To create the same app yourself instead of using init:
mkdir my-appcd my-appnpm install @zebric/cliThis installs the CLI locally in your project. Use npx zebric in this directory
for the commands below.
Create a Blueprint
Section titled “Create a Blueprint”Create a new file named blueprint.toml, or download this Blueprint:
version = "0.6.0"
[project]name = "My Blog"version = "1.0.0"description = "A simple blog"
[project.runtime]min_version = "0.6.0"
[auth]providers = ["email"]trustedOrigins = ["http://localhost:3000"]
# Define a Post entity[entity.Post]fields = [ { name = "id", type = "ULID", primary_key = true }, { name = "title", type = "Text", required = true }, { name = "body", type = "LongText", required = true }, { name = "published", type = "Boolean", default = false }, { name = "createdAt", type = "DateTime", default = "now" }]seed = [ { title = "Welcome to Zebric", body = "This blog runs from a single TOML blueprint. Edit blueprint.toml and the page reloads.", published = true }, { title = "How seeding works", body = "These sample posts come from the seed array on the Post entity. zebric dev --seed inserts them when the table is empty.", published = true }, { title = "Write your own", body = "Sign up, visit /posts/new, and create your first post.", published = false }]
[entity.Post.access]read = truecreate = "authenticated"update = "authenticated"delete = "authenticated"
# Home page — list all posts[page."/"]title = "All Posts"auth = "none"layout = "list"
[page."/".query.posts]entity = "Post"orderBy = { createdAt = "desc" }limit = 25
# Create-post form[page."/posts/new"]title = "New Post"auth = "required"layout = "form"
[page."/posts/new".form]entity = "Post"method = "create"
[[page."/posts/new".form.fields]]name = "title"type = "text"label = "Title"required = true
[[page."/posts/new".form.fields]]name = "body"type = "textarea"label = "Body"rows = 10required = true
[page."/posts/new".form.onSuccess]redirect = "/"message = "Post created!"
# Post detail page[page."/posts/:id"]title = "Post Detail"auth = "none"layout = "detail"
[page."/posts/:id".query.post]entity = "Post"where = { id = "$params.id" }Start the Dev Server Manually
Section titled “Start the Dev Server Manually”npx zebric validate --blueprint blueprint.tomlnpx zebric dev --blueprint blueprint.toml --seedOpen http://localhost:3000 in your browser. You’ll see:
- A public list page at
/showing all posts, including the three sample posts fromseed - A public detail page at
/posts/:idfor each post - A protected form at
/posts/newfor signed-in users
Create Your First Post
Section titled “Create Your First Post”Visit /posts/new. Zebric redirects you to its built-in sign-in page because
the form has auth = "required". Select Sign up, create an account, then
return to /posts/new and create your first post. Readers can visit the list
and detail pages without signing in.
Make Your First Change
Section titled “Make Your First Change”Keep the server running. In blueprint.toml, change title = "All Posts" to
title = "My Posts" and save. The browser reloads and shows My Posts; your
records remain in the local SQLite database at data/app.db.
Stop the server with Ctrl+C. Run npm run dev again for a generated project,
or repeat the manual start command, to continue.
--seed skips entities that already contain records, so restarting does not add
duplicate sample posts.
This learning app lets every signed-in user modify any post, and its public list
includes all posts regardless of the published field. Before adapting it for
multiple authors or private drafts, add ownership rules and publication filters
as described in security and access control.
What Just Happened?
Section titled “What Just Happened?”Zebric read your TOML blueprint and:
- Created a SQLite database with a
Posttable matching your entity definition - Generated routes for each page (
/,/posts/new,/posts/:id) - Rendered server-side HTML using the layout type you specified (list, form, detail)
- Wired up CRUD operations so the form creates records and the list queries them
- Enabled email/password authentication and server-side sessions through Better Auth
- Kept reading public while requiring authentication for every create, update, or delete operation
No code was generated. The runtime interprets the blueprint directly.
Next Steps
Section titled “Next Steps”-
Continue with Humans and Agents to share one guarded action across the UI and agent tools without a model account
-
Choose your next app from the example catalog
-
Learn more about authentication and access control
-
Add an
authorIdfield and let authors update their own posts -
Add workflows to automate status transitions
-
Explore the example blueprints for more patterns