Providers Overview
Providers render the canonical Codabra application model into native source files. Every target receives the same normalized models, endpoint operations and feature kits; only syntax and framework integration live in a provider.
Available targets
| Name | Runtime | Generated architecture | Persistence |
|---|---|---|---|
nextjs | Next.js 16 App Router | types, API routes, views, functions, voters | Drizzle or Prisma |
node | Node.js 22 + Express 5 | domain, application ports, persistence and HTTP adapters | replaceable memory adapter |
php | PHP 8.2, no framework | PSR-4 domain, application ports, persistence, front control | replaceable memory adapter |
go | Go 1.23 + net/http | domain, ports, memory and HTTP packages, cmd/api | replaceable memory adapter |
symfony | Symfony 7.4 LTS + PHP 8.2 | shared PHP domain/ports plus Symfony controllers and wiring | replaceable memory adapter |
API-only targets emit a warning when a config contains declarative views or custom functions that do not yet have a target adapter. Generation never silently invents business logic.
The memory repositories are useful development adapters and demonstrate the port contract. Replace them with a database adapter before production. Next.js already integrates Drizzle and Prisma lifecycle commands.
Several outputs from one config
{
"$schema": "./.codabra/schemas/codabra.schema.json",
"features": ["comments"],
"providers": [
{ "provider": "nextjs", "orm": "drizzle", "database": "postgresql" },
{ "provider": "go", "orm": "native", "database": "memory" },
{ "provider": "symfony", "orm": "native", "database": "memory" }
]
}codabra generate produces apps/nextjs, apps/go and apps/symfony. Use --provider go to target only one output.
Provider contract
interface Provider {
name: string;
label: string;
initCommand: string;
persistence: 'codabra-orm' | 'provider-native';
port: number;
generate(config: ConfigSet, appDir: string): Promise<CompilerResult>;
startDev(appDir: string, options?: { port?: string }): Promise<void>;
runBuild(appDir: string): Promise<void>;
generateDockerfile(): string;
}See Generation Architecture before adding a renderer.
