> For the complete documentation index, see [llms.txt](https://docs.devarmor.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devarmor.com/modules/threat-modeler/architecture-and-diagrams.md).

# Architecture & Diagrams

How DevArmor builds and maintains your application's architecture

DevArmor combines everything you've connected — code, uploaded diagrams, and documents — into one coherent architecture: the components, data stores, data flows, actors, and trust zones/boundaries that make up your system.

## Generating architecture

Architecture can be generated from any combination of:

* **Code** — analyzing one or more linked repositories, modeling how multiple repositories connect as a single system when more than one is linked.
* **Diagrams** — uploaded architecture or data-flow diagrams, including PDFs, photos, or scans of a whiteboard, which DevArmor converts into an editable digital diagram.
* **Documents** — PRDs, release docs, and other imported documentation; architecture generation takes diagrams and visuals within a document into account, not just its text.

You can generate architecture at the project level, covering everything linked to the project, or within a single threat model version. When creating a new threat model version, you can choose to reuse the architecture from the version it's based on instead of regenerating it.

Trust boundaries are generated automatically as part of this process.

## Reviewing and editing diagrams

Generated diagrams are Mermaid diagrams you can edit directly: zoom, pan, and click between the diagram and the table row for the component, data store, or data flow it represents. Diagrams also display trust-zone information for their elements, with clickable references to related items.

## Data source coverage

Architecture generation works even for repositories without a GitHub integration installed, falling back to public access where possible.
