Configuration
FleetDVK is configured through the top-level declarations in your .dvk files. There is no separate config file — your DSL source is the single source of truth.
Project name
project "my-api"
Sets the name field in the generated package.json. Also used in the server health check response and console output.
Database
database "supabase"
Determines which database client is generated. Currently FleetDVK generates a Supabase client by default. The generated src/config/database.ts file exports a configured client instance.
| Value | Generated client | Required env vars |
|---|---|---|
| supabase | @supabase/supabase-js | SUPABASE_URL, SUPABASE_ANON_KEY |
| postgresql | Generic config object | DB_HOST, DB_PORT, DB_NAME |
| mysql | Generic config object | DB_HOST, DB_PORT, DB_NAME |
| sqlite | Generic config object | DB_PATH |
Framework
framework "express"
Controls which HTTP framework the generated server uses. The entry point (src/index.ts) and route files are generated differently for each framework.
| Value | npm package | Notes |
|---|---|---|
| express | express ^4.18 | Default. Includes helmet and cors middleware. |
| fastify | fastify ^4.25 | Async-first. Uses @fastify/cors and @fastify/helmet. |
| hono | hono ^3.12 | Lightweight. Uses @hono/node-server for Node.js runtime. |
Auth
auth "jwt"
Determines the authentication middleware generated in src/middleware/auth.ts.
| Value | Behavior |
|---|---|
| jwt | Bearer token validation using jsonwebtoken. Requires JWT_SECRET env var. |
| session | Placeholder session-based auth middleware. |
| apikey | Placeholder API key validation middleware. |
| none | Empty middleware that passes through. No auth generated. |
When auth is set to "jwt", the generated middleware exports two functions:
authenticate— Express middleware that validates theAuthorization: Bearerheader and attaches the decoded payload toreq.user.generateToken— Helper function that signs a payload using the JWT secret.
Language
language "typescript"
Currently FleetDVK only generates TypeScript. JavaScript output is on the roadmap. The language declaration defaults to "typescript" if omitted.
Environment variables
The generator creates a .env file with placeholder values. These must be set before running the generated backend.
PORT=3000 NODE_ENV=development # Database SUPABASE_URL=your-supabase-url SUPABASE_ANON_KEY=your-supabase-anon-key # Auth JWT_SECRET=your-jwt-secret-change-this JWT_EXPIRES_IN=7d
Output directory
By default, fleetdvk generate writes to ./generated/. Override this with the -o flag:
$ fleetdvk generate -o ./src
The fleetdvk dev command also accepts -o.