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 metadataSecurity Model
All four security layers run at the application level:
- Firewall — Drizzle WHERE clauses for data isolation
- Access — Role checks in middleware
- Guards — Field filtering in request handlers
- 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