Define your features.
Get your secure backend.
One TypeScript file per table, written by you or your agent, becomes a production Hono backend: typed API, auth, migrations, admin UI, MCP server. Security is compiled in, so it can't be forgotten.
Free while in beta. Standard Hono + Drizzle + Better Auth on your own Cloudflare account.Read the docs
Get started
Three ways in. Same backend out.
Describe the app. The Start agent defines the features, runs the build, walks you through what it generated, and hands you a project you can deploy from the browser or download. No install, no signup to try.
Try it — describe an app, get a real backend
A real build validates every definition. No signup to try it.
Scaffold a project, define tables in quickback/features/, build, run, deploy. Node 20+ and a free account when you build.
npx @quickback-dev/cli startPick a template: blank, todos, blog, or saas.
quickback buildValidates every definition and generates src/. Re-run after any change to a feature file.
npm run devYour API, admin UI and OpenAPI docs on localhost.
quickback deployCreates the D1, KV and R2 resources in your Cloudflare account, applies migrations, ships the Worker.
Already building with Claude Code or Cursor? Give it Quickback context and let it write the feature files. The build validates everything it writes, so it learns from errors instead of shipping them.
Claude Code skill
npx @quickback-dev/cli claude install --globalDeep knowledge of the security layers plus a specialist agent that drafts complete feature definitions.
Cursor rules
npx @quickback-dev/cli cursor installDrops quickback.mdc into .cursor/rules/. Commit it and the whole project gets the rules.
MCP server, any tool
{
"mcpServers": {
"quickback": { "command": "npx", "args": ["@quickback-dev/cli", "mcp"] }
}
}Docs, your config and your feature definitions as tools for Claude Desktop, VS Code, Windsurf, or anything MCP.
Or just paste this into your agent
It scaffolds the project, installs the skill for itself, and asks what you want to build.
How it works
Prompt. Define. Generate.
Describe a feature. Your agent turns it into one TypeScript file, or you write it yourself. Build, and every layer you declared lands in the routes, the migration, the types, the docs, the MCP tools and the admin UI.
Build a hiring pipeline for my side project.Each company is its own organization; nobody ever sees another company's jobs.A job has a title, department, description, status, salary range and internal notes.Anyone on the team can read jobs, but only hiring managers and admins can create or edit them, and only admins can delete.Salary is set when the job is created, not edited later.Hide internal notes from everyone except admins,and encrypt them at rest.Publish open jobs on a public careers page, showing only the title, department, description and salary.Add a “close job” step that moves an open job to closed and records who closed it.Keep the team's job board live.Embed each posting's title and description for AI search, and refresh it when they change.
// quickback/features/jobs/jobs.tsimport { feature, q } from "@quickback/compiler"; export default feature("jobs", { columns: { id: q.id(), title: q.text().required().searchable(), department: q.text().required().filterable("eq"), description: q.text().optional(), status: q.enum(["draft", "open", "closed"]).default("draft").required(), salaryMin: q.int().optional(), salaryMax: q.int().optional(), internalNotes: q.text().encrypted().optional(), closedAt: q.timestamp().optional(), closedById: q.text().optional(), embedding: q.text().optional(), organizationId: q.scope("organization"), ...q.audit(), ...q.softDelete(), }, // firewall derived from q.scope(): // WHERE organization_id = ctx.activeOrgId AND deleted_at IS NULL guards: { createable: ["title", "department", "description", "salaryMin", "salaryMax", "internalNotes"], updatable: ["title", "department", "description", "internalNotes"], protected: { status: ["close"], closedAt: ["close"], closedById: ["close"] }, }, masking: { internalNotes: { type: "redact", show: { roles: ["admin+"] } }, }, read: { access: { roles: ["member+"] }, pageSize: 25, views: { careers: { fields: ["id", "title", "department", "description", "salaryMin", "salaryMax"], access: { roles: ["PUBLIC"], record: { status: { equals: "open" } } }, }, }, }, create: { access: { roles: ["hiring-manager", "admin+"] } }, update: { access: { roles: ["hiring-manager", "admin+"] } }, delete: { access: { roles: ["admin+"] }, mode: "soft" }, transitions: { close: { field: "status", from: "open", to: "closed", access: { roles: ["hiring-manager", "admin+"] }, stamp: { at: "closedAt", by: "closedById" }, }, }, realtime: { enabled: true, access: { roles: ["member+"] } }, embeddings: { fields: ["title", "description"], onInsert: true, onUpdate: ["title", "description"] },});
- $ quickback build
- ✓ parsed 1 feature · 1 table · 1 view · 1 transition
- ✓ firewall: organization scope + soft delete on jobs
- ✓ access: every operation gated, deny by default · careers view PUBLIC, open jobs only
- ✓ guards: 6 createable · 4 updatable · 3 protected
- ✓ masking + encryption: internalNotes ciphertext at rest, redacted below admin
- ✓ realtime broadcaster · embeddings queue → Workers AI
- ✓ emitted Hono routes, Drizzle migration, types, OpenAPI, MCP tools, wrangler.toml, admin registry
- done in 2.4s
// src/features/jobs/jobs.routes.ts — GENERATED, rebuilt from jobs.ts (excerpt)import { Hono } from "hono";import { jobs } from "./schema";import { buildFirewallConditions, prepareJobs, MASKING_CONFIG } from "./jobs.resource";import { createRealtime } from "../../lib/realtime"; // Guards — the body schema IS the allowlist. .strict() rejects any other key with a 400.const CreateBodySchema = z.object({ title: z.string(), department: z.string(), description: z.string().optional().nullable(), salaryMin: z.number().int().optional().nullable(), salaryMax: z.number().int().optional().nullable(), internalNotes: z.string().optional().refine((v) => !v?.startsWith("qbenc:"), { message: "Encrypted fields take plaintext" }).nullable(),}).strict();const UpdateBodySchema = z.object({ title, department, description, internalNotes /* … */ }).strict(); const VIEWS = { careers: { fields: ["id", "title", "department", "description", "salaryMin", "salaryMax"], access: { roles: ["PUBLIC"], record: { status: { equals: "open" } } }, },} as const; // GET /api/v1/jobs/views/careers — PUBLIC, no session neededapp.get("/views/:viewName", async (c) => { const view = VIEWS[c.req.param("viewName")]; // anonymous callers address one tenant with ?organizationId= — and see only its PUBLIC rows if (!(await evaluateAccessPreRecord(view.access, effectiveCtx))) { return problemJson(c, AccessErrors.roleRequired(/* … */), 403); } const filterConditions: SQL[] = []; filterConditions.push(buildFirewallConditions(effectiveCtx, db)); // org + soft delete const recordGroups = resolveRecordPredicates(view.access, effectiveCtx); // → AND status = 'open': drafts and closed jobs never reach the careers page // … pagination, sort allowlist, ?search over title, ?department= filter return renderCollection(c, { data: await prepareJobs(results, effectiveCtx, c.env, db), view: viewName });}); // POST /api/v1/jobs — create.access: hiring-manager, admin+app.post("/", async (c) => { // … auth, access, rate limit const parseResult = validateWithSchema(json, CreateBodySchema); const data = { id: crypto.randomUUID(), ...body, organizationId: ctx.activeOrgId }; const result = await db.insert(jobs).values(data).returning(); // internalNotes encrypted before the write // Enqueue embedding job (async via Cloudflare Queue) await c.env.EMBEDDINGS_QUEUE.send({ type: "embedding", table: "jobs", id: result[0].id, content: [result[0].title, result[0].description].filter(Boolean).join(" "), model: "@cf/baai/bge-base-en-v1.5", embeddingColumn: "embedding", organizationId: ctx.activeOrgId, }); // Realtime broadcast — to this org only, masked per recipient role const realtime = createRealtime(c.env); await realtime.insert("jobs", result[0], { organizationId: ctx.activeOrgId }, { targetRoles: ["member", "admin", "owner"], maskingConfig: MASKING_CONFIG }); // …}); // PATCH /api/v1/jobs/:id — re-embeds only when a watched field changedconst embeddingWatchFields = ["title", "description"];const shouldReEmbed = embeddingWatchFields.some((field) => field in body); // POST /api/v1/jobs/:id/close — transitions.closeapp.post("/:id/close", async (c) => { if (!ctx.authenticated) return problemJson(c, AuthErrors.missing(), 401); // … access: hiring-manager, admin+ · record fetched through the firewall const __fromTo = { open: ["closed"] }; if (!__fromTo[record.status]?.includes("closed")) { return problemJson(c, AccessErrors.actionNotAllowedForState("status", record.status, "closed"), 409); } // whereTransition re-checks status in the UPDATE itself, closing the race between check and write const whereTransition = (t) => and(...buildScopeConditions(t, ctx), eq(t.id, record.id), eq(t.status, record.status)); // … sets status = "closed", stamps closedAt / closedById, broadcasts the update});
// src/features/jobs/jobs.resource.ts — GENERATED (excerpt) // Firewall — derived from q.scope("organization") + soft deleteexport function buildFirewallConditions(ctx: AppContext): SQL | undefined { if (ctx.activeOrgId == null) return sql`1 = 0`; // no proven org → no rows return and(eq(jobs.organizationId, ctx.activeOrgId!), isNull(jobs.deletedAt));} // Masking — internalNotes: show to admin, ownerexport function maskJob<T>(record: T, ctx: AppContext): T { const masked: any = { ...record }; if (!(ctx.roles?.some((r) => ["admin", "owner"].includes(r)))) { if (masked.internalNotes != null) masked.internalNotes = masks.redact(masked.internalNotes); } return masked as T;} // Envelope encryption: decrypt-then-mask response prepexport async function prepareJobs<T>(records: T[], ctx: AppContext, env: any, db: any) { const decrypted = await decryptRowsForTable(env, db, ctx.activeOrgId, "jobs", records); return maskJobs(decrypted, ctx);}
-- quickback/drizzle/features/0000_quickback.sql — GENERATED by drizzle-kitCREATE TABLE `jobs` ( `id` text PRIMARY KEY NOT NULL, `title` text NOT NULL, `department` text NOT NULL, `description` text, `status` text DEFAULT 'draft' NOT NULL, `salary_min` integer, `salary_max` integer, `internal_notes` text, -- holds "qbenc:…" ciphertext, never plaintext `closed_at` text, `closed_by_id` text, `embedding` text, `organization_id` text NOT NULL, `created_at` text NOT NULL, `modified_at` text NOT NULL, `created_by` text, `modified_by` text, `deleted_at` text, `deleted_by` text); -- every firewalled query filters on this pairCREATE INDEX `jobs_organization_id_deleted_at_idx` ON `jobs` (`organization_id`,`deleted_at`);CREATE INDEX `jobs_status_idx` ON `jobs` (`status`);CREATE INDEX `jobs_created_at_idx` ON `jobs` (`created_at`); -- one wrapped data key per organization; the key-encryption key never touches the databaseCREATE TABLE `org_data_keys` ( `org_id` text PRIMARY KEY NOT NULL, `wrapped_dek` text NOT NULL, `key_version` integer DEFAULT 1 NOT NULL, `rotated_at` text, `retired_deks` text, -- …);
// quickback.gen.ts — GENERATED type tree. Zero runtime.// import type { Api, Qb } from "./quickback.gen";export namespace Api { export namespace jobs { export type Id = Qb.Brand<string, "jobs.jobs">; // branded — a candidate id will not type-check here // Masked columns depend on who is reading: Row<"admin"> reveals, Row may be masked export interface Row<Role extends string = never> { id: Id; title: string; department: string; description: string | null; status: "draft" | "open" | "closed"; salaryMin: number | null; salaryMax: number | null; internalNotes: Qb.Reveal<Role, "admin" | "owner", string | null>; closedAt: string | null; closedById: string | null; organizationId: Qb.OrganizationId; // auth principals are branded too createdAt: string; createdBy: Qb.UserId | null; // … } // Insert / Update mirror guards.createable / guards.updatable export interface Insert { title: string; department: string; description?: string | null; salaryMin?: number | null; salaryMax?: number | null; internalNotes?: string | null; // plaintext in, ciphertext at rest } export interface Update { title?: string; department?: string; description?: string | null; internalNotes?: string | null; } export type ListResponse<Role extends string = never> = Qb.Page<Row<Role>>; export namespace views { export namespace careers { export type Item<Role extends string = never> = Pick<Row<Role>, "id" | "title" | "department" | "description" | "salaryMin" | "salaryMax">; export type Response<Role extends string = never> = Qb.Page<Item<Role>>; } } export namespace actions { export namespace close { export type Input = Record<string, never>; export type Params = { id: Id }; } } }}
// openapi.json — GENERATED, served from the Worker (excerpt){ "openapi": "3.1.0", "paths": { "/api/v1/jobs": { "get": { "operationId": "listJobs", /* filters · search · sort · cursor · fields */ }, "post": { "operationId": "createJobs", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobsCreate" // required: title, department } } } }, "responses": { "201": …, "400": …, "401": …, "403": …, "409": …, "422": … } } }, "/api/v1/jobs/views/careers": { "get": { "operationId": "getJobsViewCareers", "summary": "Get Jobs careers view", "security": [], "parameters": ["limit", "offset", "sort", "order"] } }, "/api/v1/jobs/{id}/close": { "post": { "operationId": "jobsClose", "responses": { "200": "Action result", "401": "Unauthorized", "403": "Forbidden", "404": "Not found", "409": … } } } }, "components": { "schemas": { "Jobs": { "properties": { "internalNotes": { "anyOf": [{ "type": ["string", "null"] }, { "type": "string", "enum": ["[REDACTED]"] }], "x-masking": { "type": "redact", "show": { "roles": ["admin", "owner"] } } } } } } }}
# MCP server — the same routes, exposed as tools to Claude Code, Cursor, or any MCP client# Every tool carries the same firewall, access, guards and masking as the HTTP route. jobs__listJobs GET /api/v1/jobs roles member, admin, owner returns Page<Job> — internalNotes redacted below admin jobs__getJobsViewCareers GET /api/v1/jobs/views/careers public no auth — open jobs only, six fields jobs__createJobs POST /api/v1/jobs roles hiring-manager, admin, owner input title* · department* · description · salaryMin · salaryMax · internalNotes rejects anything else — additionalProperties: false jobs__updateJobs PATCH /api/v1/jobs/{id} roles hiring-manager, admin, owner input title · department · description · internalNotes jobs__deleteJobs DELETE /api/v1/jobs/{id} (soft) roles admin, owner jobs__jobsClose POST /api/v1/jobs/{id}/close roles hiring-manager, admin, owner annotations readOnlyHint: false · destructiveHint: true # Cross-tenant reads are impossible from here: organization_id comes from the session, never the tool input.
# wrangler.toml — GENERATED (excerpt). Every binding the definition needs, declared for you. [[d1_databases]]binding = "DB"migrations_dir = "quickback/drizzle/features" # embeddings: a queue between the write and Workers AI[[queues.producers]]queue = "jobs-demo-embeddings-queue"binding = "EMBEDDINGS_QUEUE"[[queues.consumers]]queue = "jobs-demo-embeddings-queue"max_batch_size = 10max_retries = 3[ai]binding = "AI" # realtime: one Durable Object room per organization[[durable_objects.bindings]]name = "BROADCASTER"class_name = "Broadcaster" # access: per-operation caps on every route[[ratelimits]]name = "RL_200_60"simple = { limit = 200, period = 60 } # encryption: the Worker refuses to boot without ENCRYPTION_KEK# wrangler secret put ENCRYPTION_KEK
| Title | Department | Status | Salary | Internal notes | |
|---|---|---|---|---|---|
| Senior Backend Engineer | Engineering | open | 140–180k | 🔒 •••••••• | Close job |
| Product Designer | Design | open | 110–135k | 🔒 •••••••• | Close job |
| Support Lead | Customer | closed | — | 🔒 •••••••• | Close job |
Rendered from schema-registry.json. Zero UI code per table — forms follow the guards, columns follow the masking, buttons follow access.
Real shapes from the complete example in the docs, trimmed to fit. Nothing here runs on our servers: the build emits code, you deploy it.
Faster
The boring 80% is already done.
Everything a backend needs before your first real feature is generated from the same definitions. You spend your time, and your tokens, on what makes your app yours.
All the basics you'd expect
Typed end to end
Every build emits quickback.gen.ts: Row, Insert, Update, view items and action input/output for every table, with branded IDs so a candidate ID can't be passed where a job ID goes. Type-only, no runtime package.
Your agent already knows it
The CLI installs a Claude Code skill, Cursor rules and an MCP server that serves the docs, your config and your definitions to any AI tool. And because the build validates every definition, your agent is told exactly what's wrong instead of guessing at runtime.
An admin UI, for free
Set cms: true and a schema-driven CMS ships inside your Worker. Tables, inline editing, action dialogs, role switching, masked columns. Zero UI code per table. Add a table, rebuild, it's there.
Save your tokens
Your agent writes forty lines of definitions, not two thousand lines of routes, policies, migrations and types. Less to generate, less to review, and nothing security-critical left for a model to improvise. The build catches mistakes before a single request does.
More secure
Secure, because you can't forget.
Security isn't middleware you remember to add. It's declared next to the table and compiled into every route, every MCP tool and every admin button. The build refuses to emit an endpoint without it.
Firewall
Every table is scoped to a tenant. The WHERE clause is compiled into every query, so a cross-org read cannot be written.
Access
Roles gate every operation. Deny by default: no write route exists until you declare one.
Guards
Only the fields you list are writable from the client. Everything else is dropped before it reaches the database.
Masking
PII and notes are redacted below the role you name, in the API, the MCP tools, and the admin UI alike.
Rate limits
Per-operation request caps on every endpoint, backed by Cloudflare. Nothing to install.
Also in the box: end-to-end encryption for chosen columns, workflows with guarded transitions, and a per-view column allowlist so different roles see different fields.How the layers stack
When it doesn't fit
You're never stuck.
Generated code covers the common case. For everything else there are two doors, and both are wide open.
Door one
Drop into code
An action is a typed handler with the firewalled database in hand. Write any TypeScript. Need raw SQL? Opt in on that one action and the build lets it through, on the record.
// quickback/features/jobs/actions/salary-bands.ts
import { z } from "zod";
import { sql } from "drizzle-orm";
import { defineAction } from "../.quickback/define-action";
export default defineAction({
path: "/salary-bands", // standalone, not per-record
access: { roles: ["admin+"] },
allowRawSql: true, // explicit, per action
output: z.array(z.object({ department: z.string(), median: z.number() })),
async execute({ db, ctx }) {
return db.execute(sql`
SELECT department, AVG(salary_min) AS median
FROM jobs
WHERE organization_id = ${ctx.activeOrgId} -- raw SQL: you scope it
GROUP BY department
`);
},
});Every automatic rule has an explicit exception, too: firewall exceptions, access overrides, guard opt-outs, one resource at a time.Actions
Door two
Or just fork the code
The output is ordinary TypeScript: Hono routes, Drizzle schema and migrations, Better Auth. No SDK, no runtime, no proprietary anything. Stop running the build tomorrow and you still have a working codebase on libraries you already know.
- Nothing runs on Quickback's servers. We never see your database or your data.
- Your action handlers live in your project and are never overwritten.
- Rebuilds overwrite
src/only. Patch it after a build, or branch off for good.
Who it's for
Built for one person shipping real things.
The weekend side project
Real auth, real permissions, a real admin panel, before Sunday night. Not a demo that needs rewriting the moment someone else signs up.
Indie developers →The commercial product
Multi-tenant from the first table. Orgs, roles, masking, audit columns and rate limits are the default, so the security review is already written.
Ship a SaaS →The agent-first builder
You direct, the agent writes. Give it a target where the dangerous parts are compiled, not prompted, and review forty lines instead of four thousand.
First-time builders →Define. Build. Ship.
Free while in beta. Your code, your Cloudflare account, our build step.
Questions about rebuilds, lock-in, databases or custom logic? Read the FAQ
