Skip to main content

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

PropertyTypeRequiredDescription
$schemastringNoJSON schema URL for validation
namestringYesProject name (kebab-case)
versionstringNoProject version
descriptionstringNoProject description
frameworkstringYesTarget framework
databasestringNoDatabase type
pluginsobjectNoPlugin configurations
entitiesarrayNoCustom entities
featuresobjectNoFeature flags
deploymentobjectNoDeployment 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

TypePrisma TypeDescription
StringStringText
IntIntInteger
FloatFloatFloating point
DecimalDecimalPrecise decimal
BooleanBooleanTrue/false
DateTimeDateTimeDate and time
JsonJsonJSON object

Relation Types

TypeDescription
one-to-oneSingle reference
one-to-manyArray reference
many-to-oneBelongs to
many-to-manyMany-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.