Backend is a first-class target with its own policy block. Lowering decides framework, persistence, and security defaults, then emitters only render the resolved TargetIR.

1irgen examples/app.dsl.ts --targets=backend,frontend --outDir=generated/fullstack
2irgen examples/docs.dsl.ts --targets=static-site --outDir=generated/static-docs
3
4# Specialized v0.3.0 Commands:
5irgen init my-project
6irgen check examples/*.dsl.ts
7irgen studio examples/app.dsl.ts
1policies: {
2  backend: {
3    core: { generateId: "uuid_v4" },
4    persistence: { provider: "prisma" },
5    auth: { mode: "jwt" },
6    logging: { enabled: true }, // New in v0.3.0
7    health: { enabled: true }   // New in v0.3.0
8  }
9}

Target Scope

Backend output includes API, data modeling, and service wiring. It is not a subset of frontend or static-site output.

Policy-Driven Decisions

Policies choose providers, ID strategies, and auth defaults. Emitters never interpret policies directly.

Lowering Boundaries

Lowering resolves routing, validation, and persistence wiring into TargetIR so outputs stay deterministic.

Observability

v0.3.0 adds built-in structured logging via pino and automated health/metrics endpoints (/health, /metrics) to ensure your production environment is easily monitorable.

Extensibility

Backend can be extended with new mappers, transforms, or emitters using the extension system without changing core targets.