# vinayakbhat19/amacti architecture

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

- Interactive diagram: https://gitdiagram.com/vinayakbhat19/amacti
- Repository: https://github.com/vinayakbhat19/amacti

## Overview

AMACTI is a URL/domain cyber-threat triage application: users submit a target in the React dashboard, the FastAPI API starts an asynchronous multi-stage investigation, and the result is streamed and presented as an evidence-backed report. The graph includes documented collector, enrichment, scoring, persistence, visual inspection, and STIX capabilities. Some links rely on README architecture statements or the SOURCE INDEX; unsampled implementation details are not inferred.

Main entry points: [`backend/app/orchestrator/graph.py`](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/orchestrator/graph.py) (Async Orchestrator), [`backend/app/api/router.py`](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/api/router.py) (REST API), [`frontend/src/App.jsx`](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/App.jsx) (Dashboard App), [`frontend/src/components/ThreatReportView.jsx`](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/ThreatReportView.jsx) (Threat Report View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard"]
  node_app["Dashboard App<br/>[App.jsx]"]
  node_api_client["API Client<br/>[client.js]"]
  node_live_stream["Live Stream Panel"]
  node_report_view["Threat Report View"]
  node_debate_view["Debate Viewer<br/>[DebateViewer.jsx]"]
  node_memory_view["Memory Graph Viewer"]
  node_visual_preview["Visual Preview<br/>[VisualPreview.jsx]"]
  node_provenance["Provenance Badges<br/>[provenance.jsx]"]
end

subgraph group_api["API and Access"]
  node_api_router["REST API<br/>[router.py]"]
  node_ws_api["WebSocket API<br/>[websocket.py]"]
  node_access_controls["Auth and Limits<br/>[auth.py]"]
end

subgraph group_investigation["Investigation Pipeline"]
  node_orchestrator["Async Orchestrator<br/>[graph.py]"]
  node_url_agent["URL Analysis<br/>[url_agent.py]"]
  node_domain_agent["Domain Intel<br/>[domain_agent.py]"]
  node_dns_agent["DNS and TLS<br/>[dns_agent.py]"]
  node_reputation_agent["Reputation Checks"]
  node_threat_agent["Threat Intel"]
  node_visual_agent["Visual Analysis<br/>[visual_agent.py]"]
  node_memory_agent["Episodic Memory<br/>[episodic_memory.py]"]
  node_debate_agent["Debate Verification<br/>[debate_agent.py]"]
  node_risk_agent["Risk Synthesis<br/>[risk_agent.py]"]
end

subgraph group_evidence["Evidence Services"]
  node_model_gateway["Model Gateway<br/>[model_gateway.py]"]
  node_browser_service["Browser Inspection<br/>[browser_service.py]"]
  node_browser_worker["Isolated Browser Worker<br/>[browser_worker.py]"]
  node_stream_events["Stream Events<br/>[stream_events.py]"]
end

subgraph group_results["Reports and Storage"]
  node_schemas["Evidence Schemas<br/>[schemas.py]"]
  node_stix_service["STIX Export<br/>[stix_service.py]"]
  node_database[("Database<br/>[database.py]")]
  node_db_models["Stored Models<br/>[db_models.py]"]
  node_retention["Retention Service"]
end

node_user(("Analyst"))

node_user -->|"submits target"| node_app
node_app -->|"calls"| node_api_client
node_api_client -->|"POST investigate"| node_api_router
node_api_client -->|"opens stream"| node_ws_api
node_app -->|"renders report"| node_report_view
node_app -->|"renders stream"| node_live_stream
node_report_view -->|"renders"| node_debate_view
node_report_view -->|"renders"| node_memory_view
node_report_view -->|"renders"| node_visual_preview
node_debate_view -->|"uses badges"| node_provenance
node_memory_view -->|"uses badges"| node_provenance
node_visual_preview -->|"uses badges"| node_provenance
node_api_router -->|"enforces access"| node_access_controls
node_api_router -->|"runs investigation"| node_orchestrator
node_orchestrator -->|"collects URL evidence"| node_url_agent
node_orchestrator -->|"collects domain evidence"| node_domain_agent
node_orchestrator -->|"collects DNS evidence"| node_dns_agent
node_orchestrator -->|"collects reputation"| node_reputation_agent
node_orchestrator -->|"collects threat intel"| node_threat_agent
node_orchestrator -->|"runs visual pipeline"| node_visual_agent
node_orchestrator -->|"uses browser inspection"| node_browser_service
node_browser_service -->|"starts isolated worker"| node_browser_worker
node_orchestrator -->|"enriches evidence"| node_memory_agent
node_orchestrator -->|"requests synthesis"| node_model_gateway
node_orchestrator -->|"verifies synthesis"| node_debate_agent
node_orchestrator -->|"synthesizes risk"| node_risk_agent
node_orchestrator -->|"emits events"| node_stream_events
node_ws_api -.->|"streams events"| node_stream_events
node_orchestrator -->|"builds report"| node_schemas
node_api_router -->|"persists report"| node_database
node_database -->|"uses mappings"| node_db_models
node_api_router -->|"prunes history"| node_retention
node_api_router -->|"validates export"| node_stix_service

click node_app "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/api/client.js"
click node_live_stream "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/LiveStreamPanel.jsx"
click node_report_view "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/ThreatReportView.jsx"
click node_debate_view "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/DebateViewer.jsx"
click node_memory_view "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/MemoryGraphViewer.jsx"
click node_visual_preview "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/VisualPreview.jsx"
click node_provenance "https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/utils/provenance.jsx"
click node_api_router "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/api/router.py"
click node_ws_api "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/api/websocket.py"
click node_access_controls "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/auth.py"
click node_orchestrator "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/orchestrator/graph.py"
click node_url_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/url_agent.py"
click node_domain_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/domain_agent.py"
click node_dns_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/dns_agent.py"
click node_reputation_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/reputation_agent.py"
click node_threat_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/threat_intel_agent.py"
click node_visual_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/visual_agent.py"
click node_memory_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/episodic_memory.py"
click node_model_gateway "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/model_gateway.py"
click node_debate_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/debate_agent.py"
click node_risk_agent "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/risk_agent.py"
click node_browser_service "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/browser_service.py"
click node_browser_worker "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/browser_worker.py"
click node_stream_events "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/stream_events.py"
click node_schemas "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/models/schemas.py"
click node_stix_service "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/stix_service.py"
click node_database "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/database.py"
click node_db_models "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/models/db_models.py"
click node_retention "https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/retention_service.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_app,node_api_client,node_live_stream,node_report_view,node_debate_view,node_memory_view,node_visual_preview,node_provenance toneBlue
class node_api_router,node_ws_api,node_access_controls toneAmber
class node_orchestrator,node_url_agent,node_domain_agent,node_dns_agent,node_reputation_agent,node_threat_agent,node_visual_agent,node_memory_agent,node_debate_agent,node_risk_agent toneMint
class node_model_gateway,node_browser_service,node_browser_worker,node_stream_events toneRose
class node_schemas,node_stix_service,node_database,node_db_models,node_retention,node_user toneIndigo
```

## Components

### Dashboard

- [Dashboard App](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API Client](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Live Stream Panel](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/LiveStreamPanel.jsx): `frontend/src/components/LiveStreamPanel.jsx`
- [Threat Report View](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/ThreatReportView.jsx): `frontend/src/components/ThreatReportView.jsx`
- [Debate Viewer](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/DebateViewer.jsx): `frontend/src/components/DebateViewer.jsx`
- [Memory Graph Viewer](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/MemoryGraphViewer.jsx): `frontend/src/components/MemoryGraphViewer.jsx`
- [Visual Preview](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/components/VisualPreview.jsx): `frontend/src/components/VisualPreview.jsx`
- [Provenance Badges](https://github.com/vinayakbhat19/amacti/blob/main/frontend/src/utils/provenance.jsx): `frontend/src/utils/provenance.jsx`

### API and Access

- [REST API](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/api/router.py): `backend/app/api/router.py`
- [WebSocket API](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/api/websocket.py): `backend/app/api/websocket.py`
- [Auth and Limits](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/auth.py): `backend/app/auth.py`

### Investigation Pipeline

- [Async Orchestrator](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/orchestrator/graph.py): `backend/app/orchestrator/graph.py`
- [URL Analysis](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/url_agent.py): `backend/app/agents/url_agent.py`
- [Domain Intel](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/domain_agent.py): `backend/app/agents/domain_agent.py`
- [DNS and TLS](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/dns_agent.py): `backend/app/agents/dns_agent.py`
- [Reputation Checks](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/reputation_agent.py): `backend/app/agents/reputation_agent.py`
- [Threat Intel](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/threat_intel_agent.py): `backend/app/agents/threat_intel_agent.py`
- [Visual Analysis](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/visual_agent.py): `backend/app/agents/visual_agent.py`
- [Episodic Memory](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/episodic_memory.py): `backend/app/agents/episodic_memory.py`
- [Debate Verification](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/debate_agent.py): `backend/app/agents/debate_agent.py`
- [Risk Synthesis](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/agents/risk_agent.py): `backend/app/agents/risk_agent.py`

### Evidence Services

- [Model Gateway](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/model_gateway.py): `backend/app/services/model_gateway.py`
- [Browser Inspection](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/browser_service.py): `backend/app/services/browser_service.py`
- [Isolated Browser Worker](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/browser_worker.py): `backend/app/services/browser_worker.py`
- [Stream Events](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/stream_events.py): `backend/app/services/stream_events.py`

### Reports and Storage

- [Evidence Schemas](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/models/schemas.py): `backend/app/models/schemas.py`
- [STIX Export](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/stix_service.py): `backend/app/services/stix_service.py`
- [Database](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/database.py): `backend/app/database.py`
- [Stored Models](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/models/db_models.py): `backend/app/models/db_models.py`
- [Retention Service](https://github.com/vinayakbhat19/amacti/blob/main/backend/app/services/retention_service.py): `backend/app/services/retention_service.py`

### Other components

- **Analyst**

## Connections

- Analyst → Dashboard App: submits target
- Dashboard App → API Client: calls (evidence: `frontend/src/App.jsx`)
- API Client → REST API: POST investigate (evidence: `frontend/src/api/client.js`)
- API Client → WebSocket API: opens stream
- Dashboard App → Threat Report View: renders report (evidence: `frontend/src/App.jsx`)
- Dashboard App → Live Stream Panel: renders stream (evidence: `frontend/src/App.jsx`)
- Threat Report View → Debate Viewer: renders (evidence: `frontend/src/components/ThreatReportView.jsx`)
- Threat Report View → Memory Graph Viewer: renders (evidence: `frontend/src/components/ThreatReportView.jsx`)
- Threat Report View → Visual Preview: renders (evidence: `frontend/src/components/ThreatReportView.jsx`)
- Debate Viewer → Provenance Badges: uses badges (evidence: `frontend/src/components/DebateViewer.jsx`)
- Memory Graph Viewer → Provenance Badges: uses badges (evidence: `frontend/src/components/MemoryGraphViewer.jsx`)
- Visual Preview → Provenance Badges: uses badges (evidence: `frontend/src/components/VisualPreview.jsx`)
- REST API → Auth and Limits: enforces access (evidence: `backend/app/api/router.py`)
- REST API → Async Orchestrator: runs investigation (evidence: `backend/app/api/router.py`)
- Async Orchestrator → URL Analysis: collects URL evidence (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Domain Intel: collects domain evidence (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → DNS and TLS: collects DNS evidence (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Reputation Checks: collects reputation (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Threat Intel: collects threat intel (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Visual Analysis: runs visual pipeline (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Browser Inspection: uses browser inspection (evidence: `backend/app/orchestrator/graph.py`)
- Browser Inspection → Isolated Browser Worker: starts isolated worker (evidence: `backend/app/services/browser_service.py`)
- Async Orchestrator → Episodic Memory: enriches evidence (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Model Gateway: requests synthesis (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Debate Verification: verifies synthesis (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Risk Synthesis: synthesizes risk (evidence: `backend/app/orchestrator/graph.py`)
- Async Orchestrator → Stream Events: emits events (evidence: `backend/app/orchestrator/graph.py`)
- WebSocket API → Stream Events: streams events
- Async Orchestrator → Evidence Schemas: builds report (evidence: `backend/app/orchestrator/graph.py`)
- REST API → Database: persists report (evidence: `backend/app/api/router.py`)
- Database → Stored Models: uses mappings (evidence: `backend/app/database.py`)
- REST API → Retention Service: prunes history (evidence: `backend/app/api/router.py`)
- REST API → STIX Export: validates export (evidence: `backend/app/api/router.py`)
