# dr4k3nkun-offsec/idshield-ai architecture

> Architecture diagram of the GitHub repository dr4k3nkun-offsec/idshield-ai, 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/dr4k3nkun-offsec/idshield-ai
- Repository: https://github.com/dr4k3nkun-offsec/idshield-ai

## Overview

IDShield AI is a credential-forensics and fraud-intelligence platform with a React investigator console and FastAPI backend. The principal workflow is credential upload and screening, followed by forensic analysis, field validation and biometric/credential checks, risk and syndicate assessment, then review and reporting. SQLite-backed records, watchlists and an audit ledger support the service. The README documents several detection and reporting capabilities whose precise internal wiring is not visible in the excerpts; those links are omitted or marked unverified rather than inferred.

Main entry points: [`backend/main.py`](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/main.py) (FastAPI gateway), [`idshield-ai/src/App.tsx`](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/App.tsx) (Console app), [`idshield-ai/src/pages/ScreeningPage.tsx`](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/ScreeningPage.tsx) (Screening form), [`idshield-ai/src/pages/OverviewPage.tsx`](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/OverviewPage.tsx) (Case overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Investigator console"]
  node_app["Console app<br/>[App.tsx]"]
  node_login["Access screen<br/>[LoginPage.tsx]"]
  node_screening["Screening form<br/>[ScreeningPage.tsx]"]
  node_overview["Case overview<br/>[OverviewPage.tsx]"]
  node_analysis["Analysis dossier"]
  node_analytics["Analytics<br/>[AnalyticsPage.tsx]"]
  node_reportmodal["Report viewer<br/>[ReportModal.tsx]"]
end

subgraph group_gateway["API and persistence"]
  node_api["FastAPI gateway<br/>[main.py]"]
  node_records[("SQLite records<br/>[database.py]")]
end

subgraph group_inspection["Credential inspection"]
  node_forensics["Image forensics"]
  node_validation["Field validation"]
  node_verification["Credential verification"]
  node_masking["PII masking<br/>[masking_engine.py]"]
end

subgraph group_intelligence["Fraud intelligence and evidence"]
  node_syndicate["Syndicate analysis<br/>[main.py]"]
  node_audit["Evidence ledger<br/>[audit_service.py]"]
  node_reports["Court reports"]
end

node_investigator(("Investigator"))

node_investigator -->|"uses"| node_app
node_app -->|"renders"| node_login
node_app -->|"routes to"| node_screening
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_analysis
node_app -->|"routes to"| node_analytics
node_app -->|"renders"| node_reportmodal
node_screening -.->|"submits scan"| node_api
node_overview -.->|"loads records"| node_api
node_api -->|"calls"| node_forensics
node_api -->|"calls"| node_validation
node_api -->|"calls"| node_verification
node_api -->|"calls"| node_masking
node_api -->|"reads and writes"| node_records
node_api -->|"builds graph"| node_syndicate
node_api -->|"records events"| node_audit
node_api -->|"generates dossier"| node_reports
node_analysis -->|"opens report"| node_reportmodal

click node_app "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/App.tsx"
click node_login "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/components/LoginPage.tsx"
click node_screening "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/ScreeningPage.tsx"
click node_overview "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/OverviewPage.tsx"
click node_analysis "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/AnalysisResultPage.tsx"
click node_analytics "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/AnalyticsPage.tsx"
click node_reportmodal "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/ReportModal.tsx"
click node_api "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/main.py"
click node_records "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/database.py"
click node_forensics "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/forensic_service.py"
click node_validation "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/validation_service.py"
click node_verification "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/verification_service.py"
click node_masking "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/masking_engine.py"
click node_syndicate "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/main.py"
click node_audit "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/audit_service.py"
click node_reports "https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/report_generator.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_login,node_screening,node_overview,node_analysis,node_analytics,node_reportmodal toneBlue
class node_api,node_records toneAmber
class node_forensics,node_validation,node_verification,node_masking toneMint
class node_syndicate,node_audit,node_reports toneRose
class node_investigator toneIndigo
```

## Components

### Investigator console

- [Console app](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/App.tsx): `idshield-ai/src/App.tsx`
- [Access screen](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/components/LoginPage.tsx): `idshield-ai/src/components/LoginPage.tsx`
- [Screening form](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/ScreeningPage.tsx): `idshield-ai/src/pages/ScreeningPage.tsx`
- [Case overview](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/OverviewPage.tsx): `idshield-ai/src/pages/OverviewPage.tsx`
- [Analysis dossier](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/AnalysisResultPage.tsx): `idshield-ai/src/pages/AnalysisResultPage.tsx`
- [Analytics](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/AnalyticsPage.tsx): `idshield-ai/src/pages/AnalyticsPage.tsx`
- [Report viewer](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/idshield-ai/src/pages/ReportModal.tsx): `idshield-ai/src/pages/ReportModal.tsx`

### API and persistence

- [FastAPI gateway](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/main.py): `backend/main.py`
- [SQLite records](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/database.py): `backend/database.py`

### Credential inspection

- [Image forensics](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/forensic_service.py): `backend/forensic_service.py`
- [Field validation](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/validation_service.py): `backend/validation_service.py`
- [Credential verification](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/verification_service.py): `backend/verification_service.py`
- [PII masking](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/masking_engine.py): `backend/masking_engine.py`

### Fraud intelligence and evidence

- [Syndicate analysis](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/main.py): `backend/main.py`
- [Evidence ledger](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/audit_service.py): `backend/audit_service.py`
- [Court reports](https://github.com/dr4k3nkun-offsec/idshield-ai/blob/main/backend/report_generator.py): `backend/report_generator.py`

### Other components

- **Investigator**

## Connections

- Investigator → Console app: uses
- Console app → Access screen: renders (evidence: `idshield-ai/src/App.tsx`)
- Console app → Screening form: routes to (evidence: `idshield-ai/src/App.tsx`)
- Console app → Case overview: routes to (evidence: `idshield-ai/src/App.tsx`)
- Console app → Analysis dossier: routes to (evidence: `idshield-ai/src/App.tsx`)
- Console app → Analytics: routes to (evidence: `idshield-ai/src/App.tsx`)
- Console app → Report viewer: renders (evidence: `idshield-ai/src/App.tsx`)
- Screening form → FastAPI gateway: submits scan
- Case overview → FastAPI gateway: loads records
- FastAPI gateway → Image forensics: calls (evidence: `backend/main.py`)
- FastAPI gateway → Field validation: calls (evidence: `backend/main.py`)
- FastAPI gateway → Credential verification: calls (evidence: `backend/main.py`)
- FastAPI gateway → PII masking: calls (evidence: `backend/main.py`)
- FastAPI gateway → SQLite records: reads and writes (evidence: `backend/main.py`)
- FastAPI gateway → Syndicate analysis: builds graph (evidence: `README.md`)
- FastAPI gateway → Evidence ledger: records events (evidence: `backend/main.py`)
- FastAPI gateway → Court reports: generates dossier (evidence: `backend/main.py`)
- Analysis dossier → Report viewer: opens report (evidence: `idshield-ai/src/App.tsx`)
