# flipforensics/aift architecture

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

- Interactive diagram: https://gitdiagram.com/flipforensics/aift
- Repository: https://github.com/flipforensics/aift

## Overview

AIFT is a local forensic-triage application with browser, CLI, REST API, and MCP interfaces. Its main workflow discovers and hashes evidence, parses selected Windows/Linux artifacts, analyzes parsed data with a configured AI provider, and produces reports and exports for analyst review. The graph also shows profiles, multi-image analysis, chat, and audit/case management. Several relationships are documented in the README or referenced by the SOURCE INDEX; unsampled subsystem internals are represented conservatively.

Main entry points: [`app/automation/engine.py`](https://github.com/flipforensics/aift/blob/main/app/automation/engine.py) (Automation engine), [`app/routes/handlers.py`](https://github.com/flipforensics/aift/blob/main/app/routes/handlers.py) (Browser UI), [`app/automation/discovery.py`](https://github.com/flipforensics/aift/blob/main/app/automation/discovery.py) (Evidence discovery), [`aift_cli.py`](https://github.com/flipforensics/aift/blob/main/aift_cli.py) (CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_browser["Browser UI<br/>[handlers.py]"]
  node_cli["CLI<br/>[aift_cli.py]"]
  node_rest["REST API<br/>[automation.py]"]
  node_mcp["MCP server<br/>[mcp_server.py]"]
  node_automation["Automation engine<br/>[engine.py]"]
end

subgraph group_intake["Evidence and selection"]
  node_evidence["Evidence discovery<br/>[discovery.py]"]
  node_archives["Archive handling<br/>[archives.py]"]
  node_hashing["Evidence hashing<br/>[hasher.py]"]
  node_profiles["Artifact profiles"]
  node_registry["Artifact registry<br/>[registry.py]"]
end

subgraph group_analysis["Parsing and analysis"]
  node_parser["Dissect parser<br/>[core.py]"]
  node_analyzer["Forensic analysis<br/>[core.py]"]
  node_multi["Multi-image analysis<br/>[multi_image.py]"]
  node_providers["AI providers<br/>[base.py]"]
end

subgraph group_outputs["Review and outputs"]
  node_report["HTML reports<br/>[generator.py]"]
  node_json["JSON export<br/>[json_export.py]"]
  node_chat["Results chat<br/>[manager.py]"]
end

subgraph group_shared["Shared services"]
  node_cases[("Case management<br/>[case_manager.py]")]
  node_audit["Audit logging<br/>[audit.py]"]
  node_config["Configuration<br/>[config.py]"]
end

node_analyst(("DFIR analyst"))

node_analyst -->|"uses"| node_browser
node_analyst -->|"uses"| node_cli
node_analyst -->|"uses"| node_rest
node_analyst -->|"uses"| node_mcp
node_browser -->|"submits evidence"| node_evidence
node_browser -->|"selects artifacts"| node_profiles
node_cli -->|"runs pipeline"| node_automation
node_rest -->|"runs pipeline"| node_automation
node_mcp -->|"starts runs"| node_automation
node_automation -->|"discovers"| node_evidence
node_automation -->|"hashes evidence"| node_hashing
node_automation -->|"parses artifacts"| node_parser
node_automation -->|"analyzes data"| node_analyzer
node_automation -->|"generates report"| node_report
node_automation -->|"exports JSON"| node_json
node_automation -->|"manages cases"| node_cases
node_automation -->|"records audit"| node_audit
node_automation -->|"loads settings"| node_config
node_evidence -.->|"opens archives"| node_archives
node_parser -->|"uses registry"| node_registry
node_profiles -->|"resolves artifacts"| node_registry
node_analyzer -->|"requests analysis"| node_providers
node_automation -.->|"analyzes images"| node_multi
node_browser -->|"chats on results"| node_chat
node_chat -->|"logs activity"| node_audit
node_report -->|"shares normalized data"| node_json

click node_browser "https://github.com/flipforensics/aift/blob/main/app/routes/handlers.py"
click node_cli "https://github.com/flipforensics/aift/blob/main/aift_cli.py"
click node_rest "https://github.com/flipforensics/aift/blob/main/app/routes/automation.py"
click node_mcp "https://github.com/flipforensics/aift/blob/main/app/automation/mcp_server.py"
click node_automation "https://github.com/flipforensics/aift/blob/main/app/automation/engine.py"
click node_evidence "https://github.com/flipforensics/aift/blob/main/app/automation/discovery.py"
click node_archives "https://github.com/flipforensics/aift/blob/main/app/evidence/archives.py"
click node_hashing "https://github.com/flipforensics/aift/blob/main/app/utils/hasher.py"
click node_profiles "https://github.com/flipforensics/aift/blob/main/app/utils/artifact_profiles.py"
click node_registry "https://github.com/flipforensics/aift/blob/main/app/parser/registry.py"
click node_parser "https://github.com/flipforensics/aift/blob/main/app/parser/core.py"
click node_analyzer "https://github.com/flipforensics/aift/blob/main/app/analyzer/core.py"
click node_multi "https://github.com/flipforensics/aift/blob/main/app/analyzer/multi_image.py"
click node_providers "https://github.com/flipforensics/aift/blob/main/app/ai_providers/base.py"
click node_report "https://github.com/flipforensics/aift/blob/main/app/reporter/generator.py"
click node_json "https://github.com/flipforensics/aift/blob/main/app/automation/json_export.py"
click node_chat "https://github.com/flipforensics/aift/blob/main/app/chat/manager.py"
click node_cases "https://github.com/flipforensics/aift/blob/main/app/logging/case_manager.py"
click node_audit "https://github.com/flipforensics/aift/blob/main/app/logging/audit.py"
click node_config "https://github.com/flipforensics/aift/blob/main/app/utils/config.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_browser,node_cli,node_rest,node_mcp,node_automation toneBlue
class node_evidence,node_archives,node_hashing,node_profiles,node_registry toneAmber
class node_parser,node_analyzer,node_multi,node_providers toneMint
class node_report,node_json,node_chat toneRose
class node_cases,node_audit,node_config,node_analyst toneIndigo
```

## Components

### User interfaces

- [Browser UI](https://github.com/flipforensics/aift/blob/main/app/routes/handlers.py): `app/routes/handlers.py`
- [CLI](https://github.com/flipforensics/aift/blob/main/aift_cli.py): `aift_cli.py`
- [REST API](https://github.com/flipforensics/aift/blob/main/app/routes/automation.py): `app/routes/automation.py`
- [MCP server](https://github.com/flipforensics/aift/blob/main/app/automation/mcp_server.py): `app/automation/mcp_server.py`
- [Automation engine](https://github.com/flipforensics/aift/blob/main/app/automation/engine.py): `app/automation/engine.py`

### Evidence and selection

- [Evidence discovery](https://github.com/flipforensics/aift/blob/main/app/automation/discovery.py): `app/automation/discovery.py`
- [Archive handling](https://github.com/flipforensics/aift/blob/main/app/evidence/archives.py): `app/evidence/archives.py`
- [Evidence hashing](https://github.com/flipforensics/aift/blob/main/app/utils/hasher.py): `app/utils/hasher.py`
- [Artifact profiles](https://github.com/flipforensics/aift/blob/main/app/utils/artifact_profiles.py): `app/utils/artifact_profiles.py`
- [Artifact registry](https://github.com/flipforensics/aift/blob/main/app/parser/registry.py): `app/parser/registry.py`

### Parsing and analysis

- [Dissect parser](https://github.com/flipforensics/aift/blob/main/app/parser/core.py): `app/parser/core.py`
- [Forensic analysis](https://github.com/flipforensics/aift/blob/main/app/analyzer/core.py): `app/analyzer/core.py`
- [Multi-image analysis](https://github.com/flipforensics/aift/blob/main/app/analyzer/multi_image.py): `app/analyzer/multi_image.py`
- [AI providers](https://github.com/flipforensics/aift/blob/main/app/ai_providers/base.py): `app/ai_providers/base.py`

### Review and outputs

- [HTML reports](https://github.com/flipforensics/aift/blob/main/app/reporter/generator.py): `app/reporter/generator.py`
- [JSON export](https://github.com/flipforensics/aift/blob/main/app/automation/json_export.py): `app/automation/json_export.py`
- [Results chat](https://github.com/flipforensics/aift/blob/main/app/chat/manager.py): `app/chat/manager.py`

### Shared services

- [Case management](https://github.com/flipforensics/aift/blob/main/app/logging/case_manager.py): `app/logging/case_manager.py`
- [Audit logging](https://github.com/flipforensics/aift/blob/main/app/logging/audit.py): `app/logging/audit.py`
- [Configuration](https://github.com/flipforensics/aift/blob/main/app/utils/config.py): `app/utils/config.py`

### Other components

- **DFIR analyst**

## Connections

- DFIR analyst → Browser UI: uses
- DFIR analyst → CLI: uses
- DFIR analyst → REST API: uses
- DFIR analyst → MCP server: uses
- Browser UI → Evidence discovery: submits evidence
- Browser UI → Artifact profiles: selects artifacts
- CLI → Automation engine: runs pipeline (evidence: `aift_cli.py`)
- REST API → Automation engine: runs pipeline
- MCP server → Automation engine: starts runs
- Automation engine → Evidence discovery: discovers (evidence: `app/automation/engine.py`)
- Automation engine → Evidence hashing: hashes evidence (evidence: `app/automation/engine.py`)
- Automation engine → Dissect parser: parses artifacts (evidence: `app/automation/engine.py`)
- Automation engine → Forensic analysis: analyzes data (evidence: `app/automation/engine.py`)
- Automation engine → HTML reports: generates report (evidence: `app/automation/engine.py`)
- Automation engine → JSON export: exports JSON (evidence: `app/automation/engine.py`)
- Automation engine → Case management: manages cases (evidence: `app/automation/engine.py`)
- Automation engine → Audit logging: records audit (evidence: `app/automation/engine.py`)
- Automation engine → Configuration: loads settings (evidence: `app/automation/engine.py`)
- Evidence discovery → Archive handling: opens archives
- Dissect parser → Artifact registry: uses registry (evidence: `app/parser/core.py`)
- Artifact profiles → Artifact registry: resolves artifacts (evidence: `app/utils/artifact_profiles.py`)
- Forensic analysis → AI providers: requests analysis (evidence: `app/analyzer/core.py`)
- Automation engine → Multi-image analysis: analyzes images
- Browser UI → Results chat: chats on results
- Results chat → Audit logging: logs activity (evidence: `app/chat/manager.py`)
- HTML reports → JSON export: shares normalized data (evidence: `app/reporter/generator.py`)
