appkitc turns the declaration of an app (config/app.go) into the files that start it: the server, the browser and the migration binary. It is a development tool: it ships inside the webtyp program, which connects it to the server (SetMainGenerator); no app lists it in its go.mod and no production binary contains it. Its templates are compiled, in its own tests, against the libraries it requires, so a template that no longer matches them is not published.
| File | Single responsibility |
|---|---|
| generate.go | GenerateMain: chooses what to write for the kind of project, writes only files that carry the generated header, upgrades the libraries the templates call when output changed (UpgradeGeneratedLibraries). |
| templates.go | The templates, one constant each; the only place that knows what a generated file contains. |
| services.go | Refuses an app whose config/ is not split by side and moves the old removed.go. |
| migrations.go | Builds config/services/migrations.go from App.Modules. |
| register_args.go | The Register(...) call of apps that still use config/routes.go. |
| tests/fixtureapp/ | The smallest compilable app; its generated files are committed and compiled by the tests. |
- Generate: docs/diagrams/GENERATED_MAINS.md —
webtyp devasks the connected generator for the app's files; if any changed it runsgo get <library>@latestfor each library the templates call. - Publish: the fixture test regenerates the fixture, compares it with the committed copy and compiles it (native and
GOOS=js GOARCH=wasm) against the libraries ingo.mod. A template that does not compile fails here, never in an app.
appkitcimportswebtyp.com/server(project detection,MainConfig) and the libraries its templates call; neitherservernorappkitmay importappkitc, and no app lists it: the program that starts the server connects it.- A test fails if any main of the fixture depends on
webtyp.com/appkitc. - A file without the
Code generated by webtyp.com/header belongs to the developer and is never written. - No
go.mod/go.sumline is written by hand: onlygo getandgo mod tidy.