Files
docs/standards/src/templates/README.md
Vishesh 'ironeagle' Bangotra 06ff5bce6e docs(standards): mirror doc-forge wiki style; mermaid + copyable build prompt
- move templates into src/templates; renumber wiki pages; add app-components page

- embed agentic build prompt as a copyable markdown block; add mermaid diagrams

- build.py writes <name>/mcp; config static bundle -> standards/mcp

- registry reads libraries.json as bytes (committed file was UTF-16LE); normalize to UTF-8

- Dockerfile: drop stale blog copy; per-repo <name>/mcp copies

- drop nested standards/mcp/standards duplicate and empty root mcp/
2026-10-12 00:21:41 +05:30

2.3 KiB

Application Template

A minimal, runnable skeleton of the standardized architecture. It demonstrates both axes of the blueprint (see standards):

  1. Resource axis — items and jobs, each a Claude-style generic CRUD slice (model → document → repo → service → route), all driven from openapi.yaml.
  2. Pipeline axis — a background worker.py that polls pending jobs and runs pipelines/item_sync.py, a deterministic async step chain.

Everything here is deliberately small so an agent can rewrite each file rather than delete unused code. The domain is a neutral "item", not an app noun.

Instantiate a new app

cp -r src/templates/app apps/<your-app>
cd apps/<your-app>
  1. pyproject.toml — rename the package; keep the internal library pins.
  2. config.py — replace/add settings consumed by your domain.
  3. openapi.yaml — replace the Item/Job resources with your resources.
  4. domain/ — rename item and job slices to your aggregates.
  5. pipelines/item_sync.py — replace the demo steps with your pipeline.
  6. tests/ — keep the two test files as the pattern for your own.

Run the API:

pip install -e ".[dev]"
uvicorn main:app --reload

Run the worker:

python worker.py

What to keep, what to replace

Keep Replace / rename
config.py shape Settings fields
init.py wiring pattern Resource names
openapi-first routing Paths, schemas, operationIds
mongo-ops repo factory Collections, doc models
generic CRUD adaptor Nothing (reuse as-is)
worker poll + status loop Job payloads, pipeline steps

Where the internal libraries slot in

  • openapi_first.app.OpenAPIFirstApp — main.py, interfaces/openapi.py
  • mongo_ops — infra/db/setup.py, infra/db/repos/mongo.py, domain/*/ports/db.py
  • hexa.build — domain/*/ports/service.py
  • dagpipe — pipelines/ (wrap step chains in a DAG once they branch)

Confirm current endpoints and ownership with the standards registry MCP tool: find_library("pipeline"), find_library("auth"), etc.