# sm-joe/finovaunt architecture

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

- Interactive diagram: https://gitdiagram.com/sm-joe/finovaunt
- Repository: https://github.com/sm-joe/finovaunt

## Overview

Finovaunt is a local-first FinOps recommendation and read-only scan dashboard. The CLI workflow collects cloud utilization and billing context, generates conservative recommendations, validates risk and Terraform text, gates artifact or Git-branch writing on human approval, and can verify outcomes from evidence. A separate authenticated dashboard projects existing scan artifacts and supports account onboarding. The workflow and dashboard paths are distinct; unsampled subsystem links are omitted where their caller is not evidenced.

Main entry points: [`src/agent.py`](https://github.com/sm-joe/finovaunt/blob/main/src/agent.py) (FinOps workflow), [`scripts/dashboard_api.py`](https://github.com/sm-joe/finovaunt/blob/main/scripts/dashboard_api.py) (Dashboard API), [`frontend/src/App.tsx`](https://github.com/sm-joe/finovaunt/blob/main/frontend/src/App.tsx) (Dashboard views), [`frontend/src/AuthenticatedShell.tsx`](https://github.com/sm-joe/finovaunt/blob/main/frontend/src/AuthenticatedShell.tsx) (Authenticated shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Optimization workflow"]
  node_cli["CLI entry<br/>[app.py]"]
  node_agent["FinOps workflow<br/>[agent.py]"]
  node_metrics["Cloud metrics<br/>[cloud_metrics.py]"]
  node_billing["AWS cost data<br/>[aws_costs.py]"]
  node_schemas["Models and HCL checks<br/>[guardrails.py]"]
  node_approval["Human approval<br/>[agent.py]"]
  node_proposal["Proposal artifacts<br/>[agent.py]"]
  node_git["Local Git branch<br/>[agent.py]"]
end

subgraph group_evidence["Cost evidence"]
  node_costreport["Cost evidence report<br/>[cost_evidence.py]"]
  node_history["Proposal history"]
end

subgraph group_dashboard["Read-only dashboard"]
  node_scan["Read-only scan runner"]
  node_sync["Artifact sync"]
  node_api["Dashboard API<br/>[dashboard_api.py]"]
  node_projection["Dashboard projections<br/>[dashboard_data.py]"]
  node_webentry["Web app entry<br/>[main.tsx]"]
  node_dashboardui["Dashboard views<br/>[App.tsx]"]
end

subgraph group_access["Access and onboarding"]
  node_shell["Authenticated shell"]
  node_accessgate["Access gate<br/>[AccessGate.tsx]"]
  node_auth["Access control<br/>[access_control.py]"]
end

subgraph group_verification["Outcome verification"]
  node_verification["Outcome verification"]
  node_verifycli["Verification command<br/>[verify_outcome.py]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_cli
node_cli -->|"invokes"| node_agent
node_agent -->|"collects"| node_metrics
node_agent -->|"collects"| node_billing
node_agent -->|"validates"| node_schemas
node_agent -->|"requests"| node_approval
node_approval -->|"authorizes writing"| node_proposal
node_agent -->|"commits locally"| node_git
node_agent -->|"builds evidence"| node_costreport
node_agent -->|"uses history"| node_history
node_operator -->|"starts scan"| node_scan
node_scan -->|"runs workflow"| node_agent
node_sync -->|"supplies artifacts"| node_api
node_api -->|"checks access"| node_auth
node_api -->|"projects data"| node_projection
node_webentry -->|"renders"| node_shell
node_shell -->|"renders"| node_dashboardui
node_accessgate -->|"uses"| node_dashboardui
node_operator -.->|"signs in"| node_shell
node_dashboardui -.->|"requests dashboard data"| node_api
node_operator -->|"requests verification"| node_verifycli
node_verifycli -->|"verifies evidence"| node_verification

click node_cli "https://github.com/sm-joe/finovaunt/blob/main/src/app.py"
click node_agent "https://github.com/sm-joe/finovaunt/blob/main/src/agent.py"
click node_metrics "https://github.com/sm-joe/finovaunt/blob/main/src/tools/cloud_metrics.py"
click node_billing "https://github.com/sm-joe/finovaunt/blob/main/src/tools/aws_costs.py"
click node_schemas "https://github.com/sm-joe/finovaunt/blob/main/src/utils/guardrails.py"
click node_approval "https://github.com/sm-joe/finovaunt/blob/main/src/agent.py"
click node_proposal "https://github.com/sm-joe/finovaunt/blob/main/src/agent.py"
click node_git "https://github.com/sm-joe/finovaunt/blob/main/src/agent.py"
click node_costreport "https://github.com/sm-joe/finovaunt/blob/main/src/utils/cost_evidence.py"
click node_history "https://github.com/sm-joe/finovaunt/blob/main/src/utils/proposal_history.py"
click node_scan "https://github.com/sm-joe/finovaunt/blob/main/scripts/run_readonly_scan.py"
click node_sync "https://github.com/sm-joe/finovaunt/blob/main/scripts/scan_artifact_sync.py"
click node_api "https://github.com/sm-joe/finovaunt/blob/main/scripts/dashboard_api.py"
click node_projection "https://github.com/sm-joe/finovaunt/blob/main/src/utils/dashboard_data.py"
click node_webentry "https://github.com/sm-joe/finovaunt/blob/main/frontend/src/main.tsx"
click node_shell "https://github.com/sm-joe/finovaunt/blob/main/frontend/src/AuthenticatedShell.tsx"
click node_accessgate "https://github.com/sm-joe/finovaunt/blob/main/frontend/src/AccessGate.tsx"
click node_dashboardui "https://github.com/sm-joe/finovaunt/blob/main/frontend/src/App.tsx"
click node_auth "https://github.com/sm-joe/finovaunt/blob/main/scripts/access_control.py"
click node_verification "https://github.com/sm-joe/finovaunt/blob/main/src/utils/outcome_verification.py"
click node_verifycli "https://github.com/sm-joe/finovaunt/blob/main/scripts/verify_outcome.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_cli,node_agent,node_metrics,node_billing,node_schemas,node_approval,node_proposal,node_git toneBlue
class node_costreport,node_history toneAmber
class node_scan,node_sync,node_api,node_projection,node_webentry,node_dashboardui toneMint
class node_shell,node_accessgate,node_auth toneRose
class node_verification,node_verifycli,node_operator toneIndigo
```

## Components

### Optimization workflow

- [CLI entry](https://github.com/sm-joe/finovaunt/blob/main/src/app.py): `src/app.py`
- [FinOps workflow](https://github.com/sm-joe/finovaunt/blob/main/src/agent.py): `src/agent.py`
- [Cloud metrics](https://github.com/sm-joe/finovaunt/blob/main/src/tools/cloud_metrics.py): `src/tools/cloud_metrics.py`
- [AWS cost data](https://github.com/sm-joe/finovaunt/blob/main/src/tools/aws_costs.py): `src/tools/aws_costs.py`
- [Models and HCL checks](https://github.com/sm-joe/finovaunt/blob/main/src/utils/guardrails.py): `src/utils/guardrails.py`
- [Human approval](https://github.com/sm-joe/finovaunt/blob/main/src/agent.py): `src/agent.py`
- [Proposal artifacts](https://github.com/sm-joe/finovaunt/blob/main/src/agent.py): `src/agent.py`
- [Local Git branch](https://github.com/sm-joe/finovaunt/blob/main/src/agent.py): `src/agent.py`

### Cost evidence

- [Cost evidence report](https://github.com/sm-joe/finovaunt/blob/main/src/utils/cost_evidence.py): `src/utils/cost_evidence.py`
- [Proposal history](https://github.com/sm-joe/finovaunt/blob/main/src/utils/proposal_history.py): `src/utils/proposal_history.py`

### Read-only dashboard

- [Read-only scan runner](https://github.com/sm-joe/finovaunt/blob/main/scripts/run_readonly_scan.py): `scripts/run_readonly_scan.py`
- [Artifact sync](https://github.com/sm-joe/finovaunt/blob/main/scripts/scan_artifact_sync.py): `scripts/scan_artifact_sync.py`
- [Dashboard API](https://github.com/sm-joe/finovaunt/blob/main/scripts/dashboard_api.py): `scripts/dashboard_api.py`
- [Dashboard projections](https://github.com/sm-joe/finovaunt/blob/main/src/utils/dashboard_data.py): `src/utils/dashboard_data.py`
- [Web app entry](https://github.com/sm-joe/finovaunt/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [Dashboard views](https://github.com/sm-joe/finovaunt/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`

### Access and onboarding

- [Authenticated shell](https://github.com/sm-joe/finovaunt/blob/main/frontend/src/AuthenticatedShell.tsx): `frontend/src/AuthenticatedShell.tsx`
- [Access gate](https://github.com/sm-joe/finovaunt/blob/main/frontend/src/AccessGate.tsx): `frontend/src/AccessGate.tsx`
- [Access control](https://github.com/sm-joe/finovaunt/blob/main/scripts/access_control.py): `scripts/access_control.py`

### Outcome verification

- [Outcome verification](https://github.com/sm-joe/finovaunt/blob/main/src/utils/outcome_verification.py): `src/utils/outcome_verification.py`
- [Verification command](https://github.com/sm-joe/finovaunt/blob/main/scripts/verify_outcome.py): `scripts/verify_outcome.py`

### Other components

- **Operator**

## Connections

- Operator → CLI entry: runs (evidence: `README.md`)
- CLI entry → FinOps workflow: invokes (evidence: `src/app.py`)
- FinOps workflow → Cloud metrics: collects (evidence: `src/agent.py`)
- FinOps workflow → AWS cost data: collects (evidence: `src/agent.py`)
- FinOps workflow → Models and HCL checks: validates (evidence: `src/agent.py`)
- FinOps workflow → Human approval: requests (evidence: `README.md`)
- Human approval → Proposal artifacts: authorizes writing (evidence: `README.md`)
- FinOps workflow → Local Git branch: commits locally (evidence: `README.md`)
- FinOps workflow → Cost evidence report: builds evidence (evidence: `src/agent.py`)
- FinOps workflow → Proposal history: uses history (evidence: `src/agent.py`)
- Operator → Read-only scan runner: starts scan (evidence: `README.md`)
- Read-only scan runner → FinOps workflow: runs workflow (evidence: `scripts/run_readonly_scan.py`)
- Artifact sync → Dashboard API: supplies artifacts (evidence: `scripts/dashboard_api.py`)
- Dashboard API → Access control: checks access (evidence: `scripts/dashboard_api.py`)
- Dashboard API → Dashboard projections: projects data (evidence: `scripts/dashboard_api.py`)
- Web app entry → Authenticated shell: renders (evidence: `frontend/src/main.tsx`)
- Authenticated shell → Dashboard views: renders (evidence: `frontend/src/AuthenticatedShell.tsx`)
- Access gate → Dashboard views: uses (evidence: `frontend/src/AccessGate.tsx`)
- Operator → Authenticated shell: signs in (evidence: `README.md`)
- Dashboard views → Dashboard API: requests dashboard data
- Operator → Verification command: requests verification
- Verification command → Outcome verification: verifies evidence (evidence: `scripts/verify_outcome.py`)
