Configuration
Understand and customize every aspect of your DocKit application.
Config File
DocKit uses a dockit.config.ts file at the project root. TypeScript is fully supported for editor IntelliSense.
TypeScript
import { defineConfig } from "dockit";
export default defineConfig({
root: "./src",
output: "./dist",
port: 3000,
logLevel: "info",
plugins: [],
});
Options Reference
| Option | Type | Default | Description |
|---|---|---|---|
| root | string | "./src" | Source directory for your application. |
| output | string | "./dist" | Output directory for the production build. |
| port | number | 3000 | Port the dev server listens on. |
| logLevel | string | "info" | Verbosity of log output (debug | info | warn | error). |
| plugins | Plugin[] | [] | Array of DocKit plugins to activate. |
| strict | boolean | true | Enable strict TypeScript checks across the project. |
Environment Variables
Prefix public variables with DOCKIT_PUBLIC_. All other variables remain server-only.
.env
DOCKIT_PUBLIC_APP_NAME=MyApp
DOCKIT_PUBLIC_API_URL=https://api.example.com
DATABASE_URL=postgresql://user:pass@localhost/db
SECRET_KEY=super-secret-value
Advanced Configuration
For monorepo setups, use the extends key to inherit from a base config:
TypeScript
export default defineConfig({
extends: "../../dockit.base.ts",
port: 4000,
});