# aashishtalreja/asher architecture

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

- Interactive diagram: https://gitdiagram.com/aashishtalreja/asher
- Repository: https://github.com/aashishtalreja/asher

## Overview

CHAKRAVYUH is a terminal-based financial-crime investigation platform. Investigators launch the CLI to inspect accounts and leads; the scoring engine combines five detection layers, and the interface presents risk and network findings or requests a forensic evidence dossier. Synthetic-data generation is a separate capability. The README documents additional UI screens and evidence-export behavior; sampled excerpts do not expose all CLI routing or data-loading details, so those links are omitted where their ownership is unclear.

Main entry points: [`core/fusion.py`](https://github.com/aashishtalreja/asher/blob/main/core/fusion.py) (Weighted fusion), [`cli/app.py`](https://github.com/aashishtalreja/asher/blob/main/cli/app.py) (Investigation UI), [`core/report.py`](https://github.com/aashishtalreja/asher/blob/main/core/report.py) (Forensic dossier), [`main.py`](https://github.com/aashishtalreja/asher/blob/main/main.py) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data generation"]
  node_generator["Synthetic data generator<br/>[generator.py]"]
end

subgraph group_detection["Detection layers"]
  node_rules["Red-flag rules<br/>[rules.py]"]
  node_baseline["Account baseline<br/>[baseline.py]"]
  node_ml["ML risk scorer<br/>[ml.py]"]
  node_complaints["Complaint correlator<br/>[complaints.py]"]
  node_graphops["Graph operations<br/>[graph_ops.py]"]
end

subgraph group_scoring["Risk scoring"]
  node_fusion["Weighted fusion<br/>[fusion.py]"]
  node_config["Scoring configuration<br/>[config.py]"]
end

subgraph group_investigation["Investigation interface"]
  node_entry["Application entry<br/>[main.py]"]
  node_cli["Investigation UI<br/>[app.py]"]
end

subgraph group_evidence["Evidence export"]
  node_report["Forensic dossier<br/>[report.py]"]
  node_dossier["BSA §63 PDF"]
end

node_investigator(("Investigator"))

node_investigator -->|"launches"| node_entry
node_entry -->|"creates and runs"| node_cli
node_cli -->|"evaluates accounts"| node_fusion
node_fusion -->|"scores with"| node_rules
node_fusion -->|"scores with"| node_baseline
node_fusion -->|"scores with"| node_ml
node_fusion -->|"scores and links"| node_complaints
node_fusion -->|"scores and traces"| node_graphops
node_fusion -->|"uses weights"| node_config
node_cli -->|"shows network findings"| node_graphops
node_cli -->|"requests dossier"| node_report
node_report -->|"evaluates account"| node_fusion
node_report -->|"generates"| node_dossier
node_generator -.-> node_dossier

click node_generator "https://github.com/aashishtalreja/asher/blob/main/data_gen/generator.py"
click node_rules "https://github.com/aashishtalreja/asher/blob/main/core/rules.py"
click node_baseline "https://github.com/aashishtalreja/asher/blob/main/core/baseline.py"
click node_ml "https://github.com/aashishtalreja/asher/blob/main/core/ml.py"
click node_complaints "https://github.com/aashishtalreja/asher/blob/main/core/complaints.py"
click node_graphops "https://github.com/aashishtalreja/asher/blob/main/core/graph_ops.py"
click node_fusion "https://github.com/aashishtalreja/asher/blob/main/core/fusion.py"
click node_config "https://github.com/aashishtalreja/asher/blob/main/core/config.py"
click node_entry "https://github.com/aashishtalreja/asher/blob/main/main.py"
click node_cli "https://github.com/aashishtalreja/asher/blob/main/cli/app.py"
click node_report "https://github.com/aashishtalreja/asher/blob/main/core/report.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_generator toneBlue
class node_rules,node_baseline,node_ml,node_complaints,node_graphops toneAmber
class node_fusion,node_config toneMint
class node_entry,node_cli toneRose
class node_report,node_dossier,node_investigator toneIndigo
```

## Components

### Data generation

- [Synthetic data generator](https://github.com/aashishtalreja/asher/blob/main/data_gen/generator.py): `data_gen/generator.py`

### Detection layers

- [Red-flag rules](https://github.com/aashishtalreja/asher/blob/main/core/rules.py): `core/rules.py`
- [Account baseline](https://github.com/aashishtalreja/asher/blob/main/core/baseline.py): `core/baseline.py`
- [ML risk scorer](https://github.com/aashishtalreja/asher/blob/main/core/ml.py): `core/ml.py`
- [Complaint correlator](https://github.com/aashishtalreja/asher/blob/main/core/complaints.py): `core/complaints.py`
- [Graph operations](https://github.com/aashishtalreja/asher/blob/main/core/graph_ops.py): `core/graph_ops.py`

### Risk scoring

- [Weighted fusion](https://github.com/aashishtalreja/asher/blob/main/core/fusion.py): `core/fusion.py`
- [Scoring configuration](https://github.com/aashishtalreja/asher/blob/main/core/config.py): `core/config.py`

### Investigation interface

- [Application entry](https://github.com/aashishtalreja/asher/blob/main/main.py): `main.py`
- [Investigation UI](https://github.com/aashishtalreja/asher/blob/main/cli/app.py): `cli/app.py`

### Evidence export

- [Forensic dossier](https://github.com/aashishtalreja/asher/blob/main/core/report.py): `core/report.py`
- **BSA §63 PDF**

### Other components

- **Investigator**

## Connections

- Investigator → Application entry: launches (evidence: `main.py`)
- Application entry → Investigation UI: creates and runs (evidence: `main.py`)
- Investigation UI → Weighted fusion: evaluates accounts (evidence: `cli/app.py`)
- Weighted fusion → Red-flag rules: scores with (evidence: `core/fusion.py`)
- Weighted fusion → Account baseline: scores with (evidence: `core/fusion.py`)
- Weighted fusion → ML risk scorer: scores with (evidence: `core/fusion.py`)
- Weighted fusion → Complaint correlator: scores and links (evidence: `core/fusion.py`)
- Weighted fusion → Graph operations: scores and traces (evidence: `core/fusion.py`)
- Weighted fusion → Scoring configuration: uses weights (evidence: `core/fusion.py`)
- Investigation UI → Graph operations: shows network findings (evidence: `cli/app.py`)
- Investigation UI → Forensic dossier: requests dossier (evidence: `cli/app.py`)
- Forensic dossier → Weighted fusion: evaluates account (evidence: `core/report.py`)
- Forensic dossier → BSA §63 PDF: generates (evidence: `README.md`)
- Synthetic data generator → BSA §63 PDF
