Quickback Docs

Empty Scaffolding Templates

Start from scratch with just the config file. Cloudflare Workers + D1.

The empty template creates a project with only the configuration file — no example features. Use this when you know exactly what you want to build and don't need starter code.

Available Empty Templates

TemplateRuntimeDatabaseCommand
emptyCloudflare WorkersD1quickback create empty my-app

Alias: quickback create scaffold my-app (same as empty)

Create the Project

quickback create empty my-app

This scaffolds a minimal project:

my-app/
├── quickback/
│   ├── quickback.config.ts       # Compiler configuration
│   └── features/                 # Empty — add your own
├── package.json
└── tsconfig.json

Generated Configuration

export default {
  name: "my-app",
  template: "hono",
  providers: {
    runtime: { name: "cloudflare", config: {} },
    database: {
      name: "cloudflare-d1",
      config: { binding: "DB" },
    },
    auth: { name: "better-auth", config: {} },
  },
};

Organization-backed auth is the default. If you want a fixed-org deployment with no org switching UI, add features.pinnedOrganizationId as described in Pinned Organization Mode.

Adding Your First Feature

Create a feature directory with a schema file:

mkdir -p quickback/features/products
// quickback/features/products/products.ts
import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
import { defineTable } from "@quickback/compiler";

export const products = sqliteTable("products", {
  id: text("id").primaryKey(),
  name: text("name").notNull(),
  description: text("description"),
  price: integer("price").notNull(),
  organizationId: text("organization_id").notNull(),
  userId: text("user_id").notNull(),
});

export default defineTable(products, {
  firewall: {
    organization: {},
    owner: {},
    softDelete: {},
  },
  guards: {
    createable: ["name", "description", "price"],
    updatable: ["name", "description", "price"],
  },
  read: {
    access: { roles: ["member+"] },
  },
  create: { access: { roles: ["member+"] } },
  update: { access: { roles: ["member+"] } },
  delete: { access: { roles: ["admin+"] }, mode: "soft" },
});

Then compile:

quickback login    # First time only
quickback compile

Setup Steps

Follow the same setup steps as the Cloudflare template. The only difference is you'll need to add at least one feature before compiling.

Next Steps

On this page