Providers Runtime, database, auth, and storage provider options for quickback.config.ts.
Providers configure which services your compiled backend targets.
Provider Description cloudflareCloudflare Workers (Hono) bunBun runtime (Hono) nodeNode.js runtime (Hono)
import { defineRuntime } from "@quickback/compiler" ;
providers : {
runtime : defineRuntime ( "cloudflare" ),
}
Provider Description cloudflare-d1Cloudflare D1 (SQLite) better-sqlite3SQLite via better-sqlite3 (Bun/Node) libsqlLibSQL / Turso neonNeon (PostgreSQL) supabaseSupabase (PostgreSQL)
import { defineDatabase } from "@quickback/compiler" ;
providers : {
database : defineDatabase ( "cloudflare-d1" , {
generateId: "prefixed" , // "uuid" | "cuid" | "nanoid" | "prefixed" | "serial" | false
namingConvention: "snake_case" , // "camelCase" | "snake_case"
usePlurals: false , // Auth table names: "users" vs "user"
}),
}
Option Type Default (D1) Description generateIdstring | false"prefixed"ID generation strategy namingConventionstring"snake_case"Column naming convention usePluralsbooleanfalsePluralize auth table names (e.g. user vs users) splitDatabasesbooleantrueSeparate auth and features databases authBindingstring"AUTH_DB"Binding name for auth database featuresBindingstring"DB"Binding name for features database
usePlurals only affects auth tables generated by Better Auth (e.g. user vs users, session vs sessions). Feature table names come directly from your Drizzle schema definitions — whatever you pass to sqliteTable() or pgTable() is used as-is. The namingConvention setting applies to both auth and feature column names.
Value Description Example "uuid"Server generates UUID 550e8400-e29b-41d4-a716-446655440000"cuid"Server generates CUID clh2v8k9g0000l508h5gx8j1a"nanoid"Server generates nanoid V1StGXR8_Z5jdHi6B-myT"prefixed"Prefixed ID from table name room_abc123"serial"Database auto-increments 1, 2, 3falseClient provides ID (enables PUT/upsert) Any string
Provider Description better-authBetter Auth with plugins supabase-authSupabase Auth externalExternal auth via Cloudflare service binding
import { defineAuth } from "@quickback/compiler" ;
providers : {
auth : defineAuth ( "better-auth" , {
session: {
expiresInDays: 7 ,
updateAgeInDays: 1 ,
},
rateLimit: {
enabled: true ,
window: 60 ,
max: 100 ,
},
}),
}
Option Type Description session.expiresInDaysnumberSession expiration in days session.updateAgeInDaysnumberSession refresh interval in days rateLimit.enabledbooleanEnable rate limiting rateLimit.windownumberRate limit window in seconds rateLimit.maxnumberMax requests per window socialProvidersobjectSocial login providers (google, github, discord) debugLogsbooleanEnable auth debug logging
Auth table naming (usePlurals, namingConvention) is inherited from your database provider config — you don't need to set it separately on the auth provider. usePlurals controls whether auth tables are named user/session or users/sessions. It does not affect feature tables, which use whatever name you define in your schema.
When features: ["organizations"] is set in your config, the compiler automatically enables organization-related plugins. Additional plugins can be configured:
Plugin Description organizationMulti-tenant organizations adminAdmin panel access apiKeyAPI key authentication anonymousAnonymous sessions upgradeAnonymousConvert anonymous to full accounts twoFactorTwo-factor authentication passkeyWebAuthn passkey login magicLinkEmail magic link login emailOtpEmail one-time password deviceAuthorizationDevice auth flow (CLI tools) jwtJWT token support openAPIOpenAPI spec generation
import { defineStorage, defineFileStorage } from "@quickback/compiler" ;
providers : {
storage : defineStorage ( "kv" , {
binding: "KV_STORE" ,
}),
fileStorage : defineFileStorage ( "r2" , {
binding: "FILES" ,
maxFileSize: "10mb" ,
allowedTypes: [ "image/png" , "image/jpeg" , "application/pdf" ],
publicDomain: "files.example.com" ,
}),
}
Type Description kvKey-value storage (Cloudflare KV, Redis) r2Object storage (Cloudflare R2) memoryIn-memory storage (development only) redisRedis storage
Option Type Description bindingstringR2 bucket binding name maxFileSizestringMaximum file size (e.g. "10mb") allowedTypesstring[]Allowed MIME types publicDomainstringPublic domain for file URLs userScopedBucketsbooleanScope files by user