# cosc-499-w2026/capstone-project-team-10 architecture

> Architecture diagram of the GitHub repository cosc-499-w2026/capstone-project-team-10, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cosc-499-w2026/capstone-project-team-10
- Repository: https://github.com/cosc-499-w2026/capstone-project-team-10
- Video tour (about a minute): https://gitdiagram.com/cosc-499-w2026/capstone-project-team-10/video

## Overview

Brachify is a desktop brachytherapy-planning application: users launch the GUI, import plan data, adjust 3D applicator geometry, inspect it, and export a report. The repository also contains anti-slop, a Python linting package with core rules and an optional FastAPI rule group. The graph includes both substantial products. Some Brachify workflow links and anti-slop runtime dispatch details are inferred from module structure or imports rather than shown calls; those links are dashed and marked unverified.

Main entry points: [`src/windows/main_window.py`](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/main_window.py) (Main window), [`agent-skills/anti-slop-py/src/anti_slop/__main__.py`](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/__main__.py) (CLI), [`src/windows/models/dicom_model.py`](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/dicom_model.py) (Plan model), [`src/windows/models/channels_model.py`](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/channels_model.py) (Channel model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_brachify_app["Brachify application"]
  node_launcher["Application launcher<br/>[launch.py]"]
  node_app["App lifecycle<br/>[app.py]"]
  node_settings["Configuration<br/>[values.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_import_view["Plan import<br/>[import_view.py]"]
end

subgraph group_brachify_domain["Plan data and geometry"]
  node_dicom_model["Plan model<br/>[dicom_model.py]"]
  node_dicom_io["DICOM reader<br/>[fileio.py]"]
  node_dicom_data["Plan data<br/>[data.py]"]
  node_shape_model["Shape model<br/>[shape_model.py]"]
  node_cylinder_model["Cylinder model<br/>[cylinder_model.py]"]
  node_cylinder_mesh["Cylinder geometry<br/>[cylinder.py]"]
  node_channels_model["Channel model<br/>[channels_model.py]"]
  node_channel_mesh["Channel geometry<br/>[channel.py]"]
  node_tandem_model["Tandem model<br/>[tandem_model.py]"]
  node_tandem_mesh["Tandem geometry<br/>[tandem.py]"]
  node_mesh_io["Mesh file I/O<br/>[fileio.py]"]
end

subgraph group_brachify_output["Display and reporting"]
  node_viewport["3D viewport<br/>[viewport.py]"]
  node_export_view["Export view<br/>[export_view.py]"]
  node_pdf_report["PDF report"]
end

subgraph group_lint_engine["Anti-slop engine"]
  node_anti_cli["CLI<br/>[__main__.py]"]
  node_lint_config["Lint configuration<br/>[config.py]"]
  node_rule_catalog["Rule catalog<br/>[catalog.py]"]
  node_lint_runner["Lint runner<br/>[runner.py]"]
  node_diagnostics["Rule and diagnostics<br/>[rule.py]"]
  node_rule_context["Rule context<br/>[context.py]"]
  node_scope_analysis["Scope analysis<br/>[scopes.py]"]
  node_review_output["Review output<br/>[review.py]"]
end

subgraph group_lint_rules["Anti-slop rules"]
  node_core_rules["Core rule set"]
  node_fastapi_rules["FastAPI rules"]
  node_route_detection["Route detection<br/>[_routes.py]"]
end

node_user(("Planner"))

node_user -.->|"starts"| node_launcher
node_launcher -.->|"starts"| node_app
node_app -->|"initializes"| node_window
node_app -.->|"creates"| node_settings
node_user -.->|"imports plan"| node_import_view
node_window -.->|"hosts"| node_import_view
node_import_view -.->|"loads plan"| node_dicom_model
node_dicom_model -.->|"reads DICOM"| node_dicom_io
node_dicom_io -.->|"populates"| node_dicom_data
node_window -.->|"initializes"| node_dicom_model
node_window -.->|"initializes"| node_cylinder_model
node_window -.->|"initializes"| node_channels_model
node_window -.->|"initializes"| node_tandem_model
node_dicom_model -->|"signals changes"| node_cylinder_model
node_dicom_model -->|"signals changes"| node_channels_model
node_cylinder_model -.->|"builds geometry"| node_cylinder_mesh
node_channels_model -.->|"builds geometry"| node_channel_mesh
node_tandem_model -.->|"builds geometry"| node_tandem_mesh
node_channels_model -.->|"creates shapes"| node_shape_model
node_tandem_model -.->|"creates shapes"| node_shape_model
node_window -.->|"initializes"| node_viewport
node_user -.->|"requests export"| node_export_view
node_window -.->|"hosts"| node_export_view
node_export_view -.->|"exports mesh"| node_mesh_io
node_export_view -.->|"creates report"| node_pdf_report
node_user -.->|"runs lint"| node_anti_cli
node_anti_cli -.->|"loads settings"| node_lint_config
node_anti_cli -.->|"selects rules"| node_rule_catalog
node_anti_cli -.->|"runs analysis"| node_lint_runner
node_lint_runner -.->|"dispatches rules"| node_diagnostics
node_rule_catalog -.->|"registers rules"| node_core_rules
node_rule_catalog -.->|"registers rules"| node_fastapi_rules
node_core_rules -.->|"reports findings"| node_rule_context
node_fastapi_rules -.->|"checks handlers"| node_route_detection
node_route_detection -.->|"resolves names"| node_scope_analysis
node_rule_context -->|"builds diagnostics"| node_diagnostics
node_anti_cli -.->|"formats review"| node_review_output

click node_launcher "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/launch.py"
click node_app "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/app.py"
click node_settings "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/settings/values.py"
click node_window "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/main_window.py"
click node_import_view "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/views/import_view.py"
click node_dicom_model "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/dicom_model.py"
click node_dicom_io "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/dicom/fileio.py"
click node_dicom_data "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/dicom/data.py"
click node_shape_model "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/shape_model.py"
click node_cylinder_model "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/cylinder_model.py"
click node_cylinder_mesh "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/cylinder.py"
click node_channels_model "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/channels_model.py"
click node_channel_mesh "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/channel.py"
click node_tandem_model "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/tandem_model.py"
click node_tandem_mesh "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/tandem.py"
click node_mesh_io "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/fileio.py"
click node_viewport "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/views/viewport.py"
click node_export_view "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/views/export_view.py"
click node_pdf_report "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/pdf/template_reference.py"
click node_anti_cli "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/__main__.py"
click node_lint_config "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/config.py"
click node_rule_catalog "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/catalog.py"
click node_lint_runner "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/runner.py"
click node_diagnostics "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/rule.py"
click node_rule_context "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/context.py"
click node_scope_analysis "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/scopes.py"
click node_core_rules "https://github.com/cosc-499-w2026/capstone-project-team-10/tree/main/agent-skills/anti-slop-py/src/anti_slop/rules"
click node_fastapi_rules "https://github.com/cosc-499-w2026/capstone-project-team-10/tree/main/agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/rules"
click node_route_detection "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/_routes.py"
click node_review_output "https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/review.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_launcher,node_app,node_settings,node_window,node_import_view toneBlue
class node_dicom_model,node_dicom_io,node_dicom_data,node_shape_model,node_cylinder_model,node_cylinder_mesh,node_channels_model,node_channel_mesh,node_tandem_model,node_tandem_mesh,node_mesh_io toneAmber
class node_viewport,node_export_view,node_pdf_report toneMint
class node_anti_cli,node_lint_config,node_rule_catalog,node_lint_runner,node_diagnostics,node_rule_context,node_scope_analysis,node_review_output toneRose
class node_core_rules,node_fastapi_rules,node_route_detection,node_user toneIndigo
```

## Components

### Brachify application

- [Application launcher](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/launch.py): `src/launch.py`
- [App lifecycle](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/app.py): `src/classes/app.py`
- [Configuration](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/settings/values.py): `src/settings/values.py`
- [Main window](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/main_window.py): `src/windows/main_window.py`
- [Plan import](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/views/import_view.py): `src/windows/views/import_view.py`

### Plan data and geometry

- [Plan model](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/dicom_model.py): `src/windows/models/dicom_model.py`
- [DICOM reader](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/dicom/fileio.py): `src/classes/dicom/fileio.py`
- [Plan data](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/dicom/data.py): `src/classes/dicom/data.py`
- [Shape model](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/shape_model.py): `src/windows/models/shape_model.py`
- [Cylinder model](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/cylinder_model.py): `src/windows/models/cylinder_model.py`
- [Cylinder geometry](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/cylinder.py): `src/classes/mesh/cylinder.py`
- [Channel model](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/channels_model.py): `src/windows/models/channels_model.py`
- [Channel geometry](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/channel.py): `src/classes/mesh/channel.py`
- [Tandem model](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/models/tandem_model.py): `src/windows/models/tandem_model.py`
- [Tandem geometry](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/tandem.py): `src/classes/mesh/tandem.py`
- [Mesh file I/O](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/mesh/fileio.py): `src/classes/mesh/fileio.py`

### Display and reporting

- [3D viewport](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/views/viewport.py): `src/windows/views/viewport.py`
- [Export view](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/windows/views/export_view.py): `src/windows/views/export_view.py`
- [PDF report](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/src/classes/pdf/template_reference.py): `src/classes/pdf/template_reference.py`

### Anti-slop engine

- [CLI](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/__main__.py): `agent-skills/anti-slop-py/src/anti_slop/__main__.py`
- [Lint configuration](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/config.py): `agent-skills/anti-slop-py/src/anti_slop/engine/config.py`
- [Rule catalog](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/catalog.py): `agent-skills/anti-slop-py/src/anti_slop/engine/catalog.py`
- [Lint runner](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/runner.py): `agent-skills/anti-slop-py/src/anti_slop/engine/runner.py`
- [Rule and diagnostics](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/rule.py): `agent-skills/anti-slop-py/src/anti_slop/engine/rule.py`
- [Rule context](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/context.py): `agent-skills/anti-slop-py/src/anti_slop/engine/context.py`
- [Scope analysis](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/scopes.py): `agent-skills/anti-slop-py/src/anti_slop/engine/scopes.py`
- [Review output](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/engine/review.py): `agent-skills/anti-slop-py/src/anti_slop/engine/review.py`

### Anti-slop rules

- [Core rule set](https://github.com/cosc-499-w2026/capstone-project-team-10/tree/main/agent-skills/anti-slop-py/src/anti_slop/rules): `agent-skills/anti-slop-py/src/anti_slop/rules`
- [FastAPI rules](https://github.com/cosc-499-w2026/capstone-project-team-10/tree/main/agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/rules): `agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/rules`
- [Route detection](https://github.com/cosc-499-w2026/capstone-project-team-10/blob/main/agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/_routes.py): `agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/_routes.py`

### Other components

- **Planner**

## Connections

- Planner → Application launcher: starts (evidence: `README.md`)
- Application launcher → App lifecycle: starts (evidence: `src/launch.py`)
- App lifecycle → Main window: initializes (evidence: `src/classes/app.py`)
- App lifecycle → Configuration: creates (evidence: `src/classes/app.py`)
- Planner → Plan import: imports plan
- Main window → Plan import: hosts
- Plan import → Plan model: loads plan
- Plan model → DICOM reader: reads DICOM
- DICOM reader → Plan data: populates (evidence: `src/classes/dicom/fileio.py`)
- Main window → Plan model: initializes (evidence: `src/windows/main_window.py`)
- Main window → Cylinder model: initializes (evidence: `src/windows/main_window.py`)
- Main window → Channel model: initializes (evidence: `src/windows/main_window.py`)
- Main window → Tandem model: initializes (evidence: `src/windows/main_window.py`)
- Plan model → Cylinder model: signals changes (evidence: `src/windows/main_window.py`)
- Plan model → Channel model: signals changes (evidence: `src/windows/main_window.py`)
- Cylinder model → Cylinder geometry: builds geometry
- Channel model → Channel geometry: builds geometry (evidence: `src/windows/models/channels_model.py`)
- Tandem model → Tandem geometry: builds geometry (evidence: `src/windows/models/tandem_model.py`)
- Channel model → Shape model: creates shapes (evidence: `src/windows/models/channels_model.py`)
- Tandem model → Shape model: creates shapes (evidence: `src/windows/models/tandem_model.py`)
- Main window → 3D viewport: initializes (evidence: `src/windows/main_window.py`)
- Planner → Export view: requests export
- Main window → Export view: hosts (evidence: `src/windows/main_window.py`)
- Export view → Mesh file I/O: exports mesh (evidence: `src/windows/views/export_view.py`)
- Export view → PDF report: creates report (evidence: `src/windows/views/export_view.py`)
- Planner → CLI: runs lint
- CLI → Lint configuration: loads settings (evidence: `agent-skills/anti-slop-py/src/anti_slop/__main__.py`)
- CLI → Rule catalog: selects rules (evidence: `agent-skills/anti-slop-py/src/anti_slop/__main__.py`)
- CLI → Lint runner: runs analysis (evidence: `agent-skills/anti-slop-py/src/anti_slop/__main__.py`)
- Lint runner → Rule and diagnostics: dispatches rules
- Rule catalog → Core rule set: registers rules (evidence: `agent-skills/anti-slop-py/src/anti_slop/engine/catalog.py`)
- Rule catalog → FastAPI rules: registers rules
- Core rule set → Rule context: reports findings (evidence: `agent-skills/anti-slop-py/src/anti_slop/engine/context.py`)
- FastAPI rules → Route detection: checks handlers (evidence: `agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/_routes.py`)
- Route detection → Scope analysis: resolves names (evidence: `agent-skills/anti-slop-py/src/anti_slop/contrib/fastapi/_routes.py`)
- Rule context → Rule and diagnostics: builds diagnostics (evidence: `agent-skills/anti-slop-py/src/anti_slop/engine/context.py`)
- CLI → Review output: formats review (evidence: `agent-skills/anti-slop-py/src/anti_slop/__main__.py`)
