# techquanta/init-app architecture

> Architecture diagram of the GitHub repository techquanta/init-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techquanta/init-app
- Repository: https://github.com/techquanta/init-app

## Overview

The repository contains two related but distinct products: `init-app` scaffolds framework-specific projects, while `ai-scaffold` plans and applies bounded changes to FastAPI projects. The primary flow is CLI input → project configuration and generation → optional health analysis. The AI-native flow validates a plan, previews changes, then applies them with rollback and syntax checks. The graph also preserves documented dbt and local-RAG capabilities. Arrows rely on README statements or SOURCE INDEX references; unsampled implementation details are not inferred.

Main entry points: [`create_app/initializer/controller.py`](https://github.com/techquanta/init-app/blob/master/create_app/initializer/controller.py) (Generation controller), [`ai_scaffold/cli.py`](https://github.com/techquanta/init-app/blob/master/ai_scaffold/cli.py) (AI scaffold CLI), [`create_app/engine/cli.py`](https://github.com/techquanta/init-app/blob/master/create_app/engine/cli.py) (CLI and UI), [`ai_scaffold/planner.py`](https://github.com/techquanta/init-app/blob/master/ai_scaffold/planner.py) (Plan validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scaffold["Project scaffolding"]
  node_init_cli["CLI and UI<br/>[cli.py]"]
  node_project_spec["Project specification<br/>[project_spec.py]"]
  node_controller["Generation controller<br/>[controller.py]"]
  node_bundler["Blueprint bundler<br/>[bundler.py]"]
  node_generator["Project generator<br/>[generator.py]"]
  node_rules["Framework rules"]
  node_project_paths["Path configuration<br/>[path_config.py]"]
end

subgraph group_project_support["Project support"]
  node_doctor["Project health checks<br/>[doctor.py]"]
  node_dbt["dbt adapter support<br/>[dbt_support.py]"]
  node_rag["Local RAG context<br/>[rag_context.py]"]
end

subgraph group_ai_scaffold["AI scaffolding"]
  node_ai_cli["AI scaffold CLI<br/>[cli.py]"]
  node_mcp["MCP server<br/>[mcp_server.py]"]
end

subgraph group_ai_planning["AI planning"]
  node_plan_models["Plan contracts<br/>[models.py]"]
  node_planner["Plan validation<br/>[planner.py]"]
  node_component_registry["Component registry<br/>[registry.py]"]
  node_project_context["Project index<br/>[context.py]"]
  node_executor["Transactional executor<br/>[engine.py]"]
  node_manifest["Project metadata<br/>[manifest.py]"]
end

node_user(("User"))
node_ai_user(("Plan author"))

node_user -->|"configures project"| node_init_cli
node_init_cli -->|"loads spec"| node_project_spec
node_init_cli -->|"starts generation"| node_controller
node_controller -->|"resolves output"| node_project_paths
node_controller -->|"builds blueprint"| node_bundler
node_bundler -->|"selects rules"| node_rules
node_controller -->|"renders project"| node_generator
node_controller -->|"configures dbt"| node_dbt
node_controller -->|"writes context bundle"| node_rag
node_init_cli -->|"runs analysis"| node_doctor
node_user -->|"submits plan"| node_ai_cli
node_ai_user -->|"uses MCP tools"| node_mcp
node_ai_cli -->|"parses plans"| node_plan_models
node_ai_cli -->|"validates plan"| node_planner
node_planner -->|"uses contracts"| node_plan_models
node_planner -->|"resolves components"| node_component_registry
node_ai_cli -->|"lists components"| node_component_registry
node_ai_cli -->|"previews or applies"| node_executor
node_executor -->|"loads and writes metadata"| node_manifest
node_ai_cli -->|"builds project index"| node_project_context
node_project_context -->|"loads metadata"| node_manifest
node_mcp -->|"exposes planning"| node_planner
node_mcp -.->|"exposes application"| node_executor

click node_init_cli "https://github.com/techquanta/init-app/blob/master/create_app/engine/cli.py"
click node_project_spec "https://github.com/techquanta/init-app/blob/master/create_app/project_spec.py"
click node_controller "https://github.com/techquanta/init-app/blob/master/create_app/initializer/controller.py"
click node_bundler "https://github.com/techquanta/init-app/blob/master/create_app/framework/bundler.py"
click node_generator "https://github.com/techquanta/init-app/blob/master/create_app/initializer/generator.py"
click node_rules "https://github.com/techquanta/init-app/tree/master/create_app/rules"
click node_project_paths "https://github.com/techquanta/init-app/blob/master/create_app/path_config.py"
click node_doctor "https://github.com/techquanta/init-app/blob/master/create_app/doctor.py"
click node_dbt "https://github.com/techquanta/init-app/blob/master/create_app/dbt_support.py"
click node_rag "https://github.com/techquanta/init-app/blob/master/create_app/rag_context.py"
click node_ai_cli "https://github.com/techquanta/init-app/blob/master/ai_scaffold/cli.py"
click node_mcp "https://github.com/techquanta/init-app/blob/master/ai_scaffold/mcp_server.py"
click node_plan_models "https://github.com/techquanta/init-app/blob/master/ai_scaffold/models.py"
click node_planner "https://github.com/techquanta/init-app/blob/master/ai_scaffold/planner.py"
click node_component_registry "https://github.com/techquanta/init-app/blob/master/ai_scaffold/registry.py"
click node_project_context "https://github.com/techquanta/init-app/blob/master/ai_scaffold/context.py"
click node_executor "https://github.com/techquanta/init-app/blob/master/ai_scaffold/engine.py"
click node_manifest "https://github.com/techquanta/init-app/blob/master/ai_scaffold/manifest.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_init_cli,node_project_spec,node_controller,node_bundler,node_generator,node_rules,node_project_paths,node_user toneBlue
class node_doctor,node_dbt,node_rag toneAmber
class node_ai_cli,node_mcp toneMint
class node_plan_models,node_planner,node_component_registry,node_project_context,node_executor,node_manifest toneRose
class node_ai_user toneIndigo
```

## Components

### Project scaffolding

- [CLI and UI](https://github.com/techquanta/init-app/blob/master/create_app/engine/cli.py): `create_app/engine/cli.py`
- [Project specification](https://github.com/techquanta/init-app/blob/master/create_app/project_spec.py): `create_app/project_spec.py`
- [Generation controller](https://github.com/techquanta/init-app/blob/master/create_app/initializer/controller.py): `create_app/initializer/controller.py`
- [Blueprint bundler](https://github.com/techquanta/init-app/blob/master/create_app/framework/bundler.py): `create_app/framework/bundler.py`
- [Project generator](https://github.com/techquanta/init-app/blob/master/create_app/initializer/generator.py): `create_app/initializer/generator.py`
- [Framework rules](https://github.com/techquanta/init-app/tree/master/create_app/rules): `create_app/rules`
- [Path configuration](https://github.com/techquanta/init-app/blob/master/create_app/path_config.py): `create_app/path_config.py`

### Project support

- [Project health checks](https://github.com/techquanta/init-app/blob/master/create_app/doctor.py): `create_app/doctor.py`
- [dbt adapter support](https://github.com/techquanta/init-app/blob/master/create_app/dbt_support.py): `create_app/dbt_support.py`
- [Local RAG context](https://github.com/techquanta/init-app/blob/master/create_app/rag_context.py): `create_app/rag_context.py`

### AI scaffolding

- [AI scaffold CLI](https://github.com/techquanta/init-app/blob/master/ai_scaffold/cli.py): `ai_scaffold/cli.py`
- [MCP server](https://github.com/techquanta/init-app/blob/master/ai_scaffold/mcp_server.py): `ai_scaffold/mcp_server.py`

### AI planning

- [Plan contracts](https://github.com/techquanta/init-app/blob/master/ai_scaffold/models.py): `ai_scaffold/models.py`
- [Plan validation](https://github.com/techquanta/init-app/blob/master/ai_scaffold/planner.py): `ai_scaffold/planner.py`
- [Component registry](https://github.com/techquanta/init-app/blob/master/ai_scaffold/registry.py): `ai_scaffold/registry.py`
- [Project index](https://github.com/techquanta/init-app/blob/master/ai_scaffold/context.py): `ai_scaffold/context.py`
- [Transactional executor](https://github.com/techquanta/init-app/blob/master/ai_scaffold/engine.py): `ai_scaffold/engine.py`
- [Project metadata](https://github.com/techquanta/init-app/blob/master/ai_scaffold/manifest.py): `ai_scaffold/manifest.py`

### Other components

- **User**
- **Plan author**

## Connections

- User → CLI and UI: configures project (evidence: `README.md`)
- CLI and UI → Project specification: loads spec (evidence: `create_app/engine/cli.py`)
- CLI and UI → Generation controller: starts generation (evidence: `create_app/engine/cli.py`)
- Generation controller → Path configuration: resolves output (evidence: `create_app/initializer/controller.py`)
- Generation controller → Blueprint bundler: builds blueprint (evidence: `create_app/initializer/controller.py`)
- Blueprint bundler → Framework rules: selects rules (evidence: `create_app/framework/bundler.py`)
- Generation controller → Project generator: renders project (evidence: `create_app/initializer/controller.py`)
- Generation controller → dbt adapter support: configures dbt (evidence: `create_app/initializer/controller.py`)
- Generation controller → Local RAG context: writes context bundle (evidence: `create_app/initializer/controller.py`)
- CLI and UI → Project health checks: runs analysis (evidence: `create_app/engine/cli.py`)
- User → AI scaffold CLI: submits plan (evidence: `README.md`)
- Plan author → MCP server: uses MCP tools (evidence: `ai_scaffold/mcp_server.py`)
- AI scaffold CLI → Plan contracts: parses plans (evidence: `ai_scaffold/cli.py`)
- AI scaffold CLI → Plan validation: validates plan (evidence: `ai_scaffold/cli.py`)
- Plan validation → Plan contracts: uses contracts (evidence: `ai_scaffold/planner.py`)
- Plan validation → Component registry: resolves components (evidence: `ai_scaffold/planner.py`)
- AI scaffold CLI → Component registry: lists components (evidence: `ai_scaffold/cli.py`)
- AI scaffold CLI → Transactional executor: previews or applies (evidence: `README.md`)
- Transactional executor → Project metadata: loads and writes metadata (evidence: `ai_scaffold/engine.py`)
- AI scaffold CLI → Project index: builds project index (evidence: `ai_scaffold/cli.py`)
- Project index → Project metadata: loads metadata (evidence: `ai_scaffold/context.py`)
- MCP server → Plan validation: exposes planning (evidence: `ai_scaffold/mcp_server.py`)
- MCP server → Transactional executor: exposes application (evidence: `ai_scaffold/mcp_server.py`)
