Configuration
AutoDeployBase uses a JSON configuration file to define your project settings.
Configuration File
The main configuration file is autodeploy.config.json in your project root.
autodeploy.config.json
{
"$schema": "https://autodeploybase.dev/schema.json",
"name": "my-app",
"version": "1.0.0",
"description": "My awesome application",
"framework": "next",
"database": "postgresql",
"plugins": {
"auth-jwt": {
"enabled": true,
"settings": {
"tokenExpiry": "7d"
}
}
},
"features": {
"typescript": true,
"tailwind": true
},
"deployment": {
"target": "vercel"
}
}
Schema Reference
Root Properties
| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | No | JSON schema URL for validation |
name | string | Yes | Project name (kebab-case) |
version | string | No | Project version |
description | string | No | Project description |
framework | string | Yes | Target framework |
database | string | No | Database type |
plugins | object | No | Plugin configurations |
entities | array | No | Custom entities |
features | object | No | Feature flags |
deployment | object | No | Deployment settings |
Framework Options
{
"framework": "next" | "nuxt" | "sveltekit" | "remix" | "astro" | "hono" | "fresh" | "react"
}
Database Options
{
"database": "postgresql" | "mongodb" | "sqlite"
}
Plugins Configuration
{
"plugins": {
"plugin-name": {
"enabled": true,
"settings": {
// Plugin-specific settings
}
}
}
}
Entities
Define custom data models:
{
"entities": [
{
"name": "Product",
"fields": [
{
"name": "title",
"type": "String",
"required": true
},
{
"name": "price",
"type": "Decimal",
"required": true
},
{
"name": "description",
"type": "String",
"required": false
},
{
"name": "inStock",
"type": "Boolean",
"default": true
}
],
"relations": [
{
"name": "category",
"type": "many-to-one",
"target": "Category"
}
]
}
]
}
Field Types
| Type | Prisma Type | Description |
|---|---|---|
String | String | Text |
Int | Int | Integer |
Float | Float | Floating point |
Decimal | Decimal | Precise decimal |
Boolean | Boolean | True/false |
DateTime | DateTime | Date and time |
Json | Json | JSON object |
Relation Types
| Type | Description |
|---|---|
one-to-one | Single reference |
one-to-many | Array reference |
many-to-one | Belongs to |
many-to-many | Many-to-many join |
Features
{
"features": {
"typescript": true,
"tailwind": true,
"docker": true,
"testing": true,
"storybook": false,
"pwa": false
}
}
Deployment
{
"deployment": {
"target": "vercel" | "docker" | "railway" | "fly",
"region": "iad1",
"env": {
"NODE_ENV": "production"
}
}
}
Plugin Settings
Each plugin can have its own settings:
auth-jwt
{
"auth-jwt": {
"enabled": true,
"settings": {
"tokenExpiry": "7d",
"refreshExpiry": "30d",
"algorithm": "HS256"
}
}
}
payments-stripe
{
"payments-stripe": {
"enabled": true,
"settings": {
"currency": "usd",
"allowPromoCodes": true,
"taxBehavior": "exclusive"
}
}
}
email
{
"email": {
"enabled": true,
"settings": {
"provider": "resend",
"from": "noreply@myapp.com"
}
}
}
analytics
{
"analytics": {
"enabled": true,
"settings": {
"retention": 90,
"anonymizeIp": true
}
}
}
Environment Variables
Configuration can reference environment variables:
{
"database": "${DATABASE_TYPE:-postgresql}",
"deployment": {
"target": "${DEPLOY_TARGET}"
}
}
Multiple Environments
Use different config files per environment:
autodeploy.config.json # Default
autodeploy.config.staging.json # Staging
autodeploy.config.prod.json # Production
Generate with specific config:
autodeploybase generate -c autodeploy.config.prod.json
Extending Configuration
Inherit from Base
autodeploy.config.prod.json
{
"extends": "./autodeploy.config.json",
"deployment": {
"target": "vercel",
"region": "sfo1"
}
}
Custom Archetypes
Create reusable configurations:
archetypes/company-standard.json
{
"framework": "next",
"database": "postgresql",
"plugins": {
"auth-jwt": { "enabled": true },
"admin-dashboard": { "enabled": true },
"analytics": { "enabled": true }
},
"features": {
"typescript": true,
"tailwind": true,
"docker": true
}
}
Use with init:
autodeploybase init my-app --archetype ./archetypes/company-standard.json
Validation
Validate your configuration:
# Check config syntax
autodeploybase generate --dry-run
# Detailed validation
autodeploybase doctor --config
IDE Support
Add the schema for autocomplete:
{
"$schema": "https://autodeploybase.dev/schema.json"
}
VS Code
Install the JSON Schema extension for validation and autocomplete.
WebStorm
Automatically detects the $schema property.