Skip to content

Generator targets

modelARch compiles the same canonical JSON model into target-specific projections. Target parity is not assumed: generation preflight is the authority for whether a particular construct is supported by a selected target.

Target Role Typical output Evolution support
python-fastapi Backend FastAPI, domain/application/infra/API layers, SQL persistence, Alembic, modules Physical schema manifest and parent evolution bundle
react Frontend React application, persona-aware routes, view patterns, design system, API client Rebuilt from current model; backend chosen separately
nestjs Backend NestJS application with domain/application/infra separation JSON generation; no parity claim with FastAPI evolution
csharp-aspnetcore Backend ASP.NET Core/Clean Architecture, EF Core persistence and migrations JSON generation; target-specific migration output

Python/FastAPI is the primary full-fidelity backend path. React can target the generated Python, NestJS, or C# backend contract. Some modules and advanced semantics are target-specific; never infer support from the presence of a target name alone.

Use the versioned JSON model. A legacy CML path remains in the raw Python/FastAPI CLI for older inputs, but it does not carry the complete current model or evolution contract and is not the recommended authoring format.

Terminal window
# Backend
modelarch generate model.json --target python-fastapi --output ./backend
# React frontend for that backend
modelarch generate model.json --target react \
--backend python-fastapi --output ./frontend
# Alternative backends
modelarch generate model.json --target nestjs --output ./backend
modelarch generate model.json --target csharp-aspnetcore --output ./backend

Raw CLI availability is useful for reproducibility; the product generation workflow adds acquisition, server-side validation, preview, release, and delivery state.

The React target accepts a backend selection and can seed a supported visual mood. A bespoke design package may override the supported palette/font package where declared. The long-term authority remains the model’s brand intent; command-line design options are generation inputs and must be captured in provenance.

Canonical JSON generations emit MODEL.md; models with brand intent also emit DESIGN.md. The pipeline also emits a materialized command contract used to coordinate parameter semantics across consumers.

Before delivery, verify:

  • target preflight accepts every modeled construct;
  • frontend and backend target contracts match;
  • chosen modules are emitted on the selected backend;
  • migration and runtime topology match the destination;
  • generated tests and compile steps pass.

See Generate and Health and validation.