BackendGen

v0.2.2
io.github.SiTouhemi/backendgen Checked 2 hours ago Published 4 months ago

Validate compact backend specs and generate tested NestJS, Prisma, and PostgreSQL repositories.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_capabilities

What this compiler can generate: specification version, targets, features and response limits. Call this first.

list_targets

Backend targets this compiler can generate, with their supported databases.

describe_target

Full detail for one target: databases, capabilities and project commands.

ParameterTypeDescription
targetId *string

list_features

Feature packs available, with their dependencies and conflicts. Use describe_feature for the configuration schema.

describe_feature

One feature's configuration JSON Schema, dependencies, conflicts and worked examples.

ParameterTypeDescription
feature *string

validate_spec

Validate a specification. Returns stable error codes and JSON pointers, so a failure can be fixed without guessing.

ParameterTypeDescription
specobjectThe specification inline, as an object. Use this or specPath, not both.
specPathstringPath to a YAML or JSON specification, inside an allowed root.

inspect_spec

Compile a specification and return the normalized backend IR: entities, endpoints, events, secrets and infrastructure.

ParameterTypeDescription
specobjectThe specification inline, as an object. Use this or specPath, not both.
specPathstringPath to a YAML or JSON specification, inside an allowed root.

preview_generation

Dry run: what generation would create, update, delete or refuse to overwrite. Writes nothing.

ParameterTypeDescription
outputPath *string
specobjectThe specification inline, as an object. Use this or specPath, not both.
specPathstringPath to a YAML or JSON specification, inside an allowed root.

generate_backend

Generate the backend. Refuses by default if a generated file was edited by hand; pass force to overwrite. Never overwrites src/custom/.

ParameterTypeDescription
outputPath *string
forcebooleanOverwrite generated files that have local modifications.
specobjectThe specification inline, as an object. Use this or specPath, not both.
specPathstringPath to a YAML or JSON specification, inside an allowed root.

run_generated_tests

Run the generated project's test suites and return counts, not logs. Integration tests need a reachable database.

ParameterTypeDescription
outputPath *string
installbooleanInstall dependencies first.
integrationbooleanAlso run the integration suite.

get_generation_report

Read the generation manifest of an already-generated project: versions, checksums and file ownership.

ParameterTypeDescription
outputPath *string

explain_customization_points

Where to put custom code for a specification, and which interface each extension point expects.

ParameterTypeDescription
specobjectThe specification inline, as an object. Use this or specPath, not both.
specPathstringPath to a YAML or JSON specification, inside an allowed root.