# Empty Scaffolding Templates

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

| Template | Runtime | Database | Command |
|----------|---------|----------|---------|
| `empty` | Cloudflare Workers | D1 | `quickback create empty my-app` |

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

## Create the Project

```bash
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

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

Multi-tenant mode (`organizations: true`) is the default. Change to `organizations: false` for [single-tenant mode](/compiler/config/single-tenant).

## Adding Your First Feature

Create a feature directory with a schema file:

```bash
mkdir -p quickback/features/products
```

```typescript
// 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:

```bash
quickback login    # First time only
quickback compile
```

## Setup Steps

Follow the same setup steps as the [Cloudflare template](/compiler/getting-started/template-cloudflare#setup-steps). The only difference is you'll need to add at least one feature before compiling.

## Next Steps

- [Schema Definitions](/compiler/definitions/schema) — Define tables with Drizzle ORM
- [Firewall](/compiler/definitions/firewall) — Data isolation and tenant scoping
- [Access Control](/compiler/definitions/access) — Role-based permissions
- [Guards](/compiler/definitions/guards) — Field-level write protection
- [Full Example](/compiler/getting-started/full-example) — Complete feature walkthrough
