Quickback Docs

Cloudflare Workers

Quickback generates Hono-based API routes for Cloudflare Workers with D1 database, application-level security, and full batch operations.

The Cloudflare target generates a complete Hono-based API running on Cloudflare Workers with D1 as the database.

Configuration

import { defineConfig, defineRuntime, defineDatabase, defineAuth } from "@quickback/compiler";

export default defineConfig({
  name: "my-app",
  providers: {
    runtime: defineRuntime("cloudflare"),
    database: defineDatabase("cloudflare-d1"),
    auth: defineAuth("better-auth"),
  },
});

Generated Output

src/
├── routes/           # Hono route handlers
├── middleware/        # Auth, firewall, access middleware
├── types/            # TypeScript interfaces
├── db/
│   └── schema.ts     # Drizzle schema
└── index.ts          # Hono app entry point

drizzle/
├── migrations/       # SQL migration files
└── meta/             # Drizzle metadata

Security Model

All four security layers run at the application level:

  1. Firewall — Drizzle WHERE clauses for data isolation
  2. Access — Role checks in middleware
  3. Guards — Field filtering in request handlers
  4. Masking — Response transformation before sending

Features

  • Full CRUD with batch operations
  • Custom actions with inline or handler-based execution
  • Soft delete support
  • Pagination, filtering, and sorting
  • Views (column-level projections)
  • OpenAPI specification generation
  • TypeScript client SDK generation

Deployment

# Development
npm run dev

# Production
npm run deploy
# or
wrangler deploy

On this page