Skip to content

Config Overview

Codabra uses a /config directory for application definitions and a codabra.json project file for outputs and reusable features.

codabra.json

json
{
  "$schema": "./.codabra/schemas/codabra.schema.json",
  "features": ["auth", "comments"],
  "providers": [
    { "provider": "nextjs", "orm": "drizzle", "database": "sqlite" },
    { "provider": "node", "orm": "native", "database": "memory" }
  ]
}

Each provider writes to apps/<provider>/ and receives the same application model. Native providers currently generate a replaceable in-memory persistence adapter; Next.js can use Drizzle or Prisma with SQLite, PostgreSQL or MySQL.

FieldValuesDescription
featuresauth, admin, commentsReusable domain kits
providernextjs, node, php, go, symfonyOutput target
ormdrizzle, prisma, nativePersistence capability
databasesqlite, postgresql, mysql, memoryDatabase or native development store

Use codabra add-provider to add another output interactively.

Config directory

text
config/
├── models/        # Data entities
├── routes/        # HTTP endpoints
├── views/         # Declarative UI
├── functions/     # Reusable application logic
├── events/        # Lifecycle hooks
└── voters/        # Authorization policies

JSON files may be nested for organization. A route file can contain a route object, an array, or an object with a routes array. Model and view files contain one definition or an array of definitions.

Currently supported configuration format: JSON. The canonical model makes YAML or TypeScript loaders possible later without changing providers.

Released under the Elastic License 2.0.