# akashvedappan/fakenix architecture

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

- Interactive diagram: https://gitdiagram.com/akashvedappan/fakenix
- Repository: https://github.com/akashvedappan/fakenix

## Overview

FAKENIX is a web platform for deepfake detection and digital forensics. Investigators submit images, videos, or URLs; the backend analyzes media, assesses risk, records detections and evidence, and supports verification and report generation. The frontend also exposes authentication, dashboards, incident reporting, and awareness resources. The graph follows documented routes and indexed imports; several capabilities are documented in the README but their implementation was not sampled, so those links are identified as documented rather than source-verified.

Main entry points: [`backend/app/services/detection_service.py`](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/detection_service.py) (Detection orchestration), [`backend/app/ai/groq_analyzer.py`](https://github.com/akashvedappan/fakenix/blob/main/backend/app/ai/groq_analyzer.py) (Vision analysis), [`backend/app/services/report_service.py`](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/report_service.py) (PDF report generation), [`backend/app/services/evidence_service.py`](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/evidence_service.py) (Evidence custody)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Investigator interface"]
  node_webapp["Application routes<br/>[App.jsx]"]
  node_analysis_ui["Analysis screens"]
  node_client_api["API client<br/>[api.js]"]
  node_detection_client["Detection client"]
end

subgraph group_api["API and access"]
  node_route_detection["Detection endpoints"]
  node_route_auth["Authentication endpoints<br/>[auth_routes.py]"]
  node_route_dashboard["Dashboard endpoints"]
  node_route_evidence["Evidence endpoints<br/>[evidence_routes.py]"]
  node_route_reports["Forensic report endpoints<br/>[report_routes.py]"]
  node_route_cybercrime["Incident reporting endpoints"]
end

subgraph group_analysis["Media analysis"]
  node_detection_service["Detection orchestration"]
  node_media_processing["Media processing<br/>[image_service.py]"]
  node_metadata["Metadata extraction"]
  node_ai_analysis["Vision analysis<br/>[groq_analyzer.py]"]
  node_risk["Risk classification<br/>[risk_classifier.py]"]
  node_video["Video analysis<br/>[video_service.py]"]
end

subgraph group_forensics["Evidence and reporting"]
  node_evidence_service["Evidence custody"]
  node_hashing["Evidence hashing<br/>[hashing_service.py]"]
  node_report_service["PDF report generation<br/>[report_service.py]"]
  node_cybercrime_service["Incident dossier service"]
end

subgraph group_data["Identity and records"]
  node_auth_service["Authentication service<br/>[auth_service.py]"]
  node_dashboard_service["Dashboard analytics"]
  node_detection_record[("Detection records<br/>[detection.py]")]
  node_database[("Application database<br/>[extensions.py]")]
end

node_investigator(("Investigator"))
node_groq{{"Groq vision service"}}

node_investigator -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_analysis_ui
node_analysis_ui -.->|"submits analysis"| node_detection_client
node_detection_client -->|"sends requests"| node_client_api
node_client_api -.->|"calls API"| node_route_detection
node_route_detection -->|"dispatches"| node_detection_service
node_detection_service -->|"uses"| node_media_processing
node_detection_service -->|"extracts metadata"| node_metadata
node_detection_service -->|"requests analysis"| node_ai_analysis
node_ai_analysis -.->|"analyzes media"| node_groq
node_ai_analysis -->|"classifies risk"| node_risk
node_ai_analysis -->|"uses video analysis"| node_video
node_detection_service -->|"seals uploads"| node_hashing
node_detection_service -->|"records evidence"| node_evidence_service
node_route_evidence -->|"dispatches"| node_evidence_service
node_evidence_service -->|"verifies hashes"| node_hashing
node_route_reports -->|"generates reports"| node_report_service
node_report_service -->|"checks integrity"| node_hashing
node_route_cybercrime -->|"dispatches"| node_cybercrime_service
node_route_auth -->|"authenticates"| node_auth_service
node_route_dashboard -->|"requests metrics"| node_dashboard_service
node_detection_service -->|"persists results"| node_detection_record
node_dashboard_service -->|"queries trends"| node_detection_record
node_auth_service -->|"reads and writes"| node_database
node_detection_record -->|"uses ORM"| node_database
node_report_service -.->|"stores reports"| node_database

click node_webapp "https://github.com/akashvedappan/fakenix/blob/main/frontend/src/App.jsx"
click node_analysis_ui "https://github.com/akashvedappan/fakenix/tree/main/frontend/src/pages"
click node_client_api "https://github.com/akashvedappan/fakenix/blob/main/frontend/src/services/api.js"
click node_detection_client "https://github.com/akashvedappan/fakenix/blob/main/frontend/src/services/detectionService.js"
click node_route_detection "https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/detection_routes.py"
click node_route_auth "https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/auth_routes.py"
click node_route_dashboard "https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/dashboard_routes.py"
click node_route_evidence "https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/evidence_routes.py"
click node_route_reports "https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/report_routes.py"
click node_route_cybercrime "https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/cybercrime_routes.py"
click node_detection_service "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/detection_service.py"
click node_media_processing "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/image_service.py"
click node_metadata "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/metadata_service.py"
click node_ai_analysis "https://github.com/akashvedappan/fakenix/blob/main/backend/app/ai/groq_analyzer.py"
click node_risk "https://github.com/akashvedappan/fakenix/blob/main/backend/app/ai/risk_classifier.py"
click node_video "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/video_service.py"
click node_evidence_service "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/evidence_service.py"
click node_hashing "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/hashing_service.py"
click node_report_service "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/report_service.py"
click node_cybercrime_service "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/cybercrime_service.py"
click node_auth_service "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/auth_service.py"
click node_dashboard_service "https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/dashboard_service.py"
click node_detection_record "https://github.com/akashvedappan/fakenix/blob/main/backend/app/models/detection.py"
click node_database "https://github.com/akashvedappan/fakenix/blob/main/backend/app/extensions.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_webapp,node_analysis_ui,node_client_api,node_detection_client toneBlue
class node_route_detection,node_route_auth,node_route_dashboard,node_route_evidence,node_route_reports,node_route_cybercrime toneAmber
class node_detection_service,node_media_processing,node_metadata,node_ai_analysis,node_risk,node_video toneMint
class node_evidence_service,node_hashing,node_report_service,node_cybercrime_service toneRose
class node_auth_service,node_dashboard_service,node_detection_record,node_database,node_investigator,node_groq toneIndigo
```

## Components

### Investigator interface

- [Application routes](https://github.com/akashvedappan/fakenix/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Analysis screens](https://github.com/akashvedappan/fakenix/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/akashvedappan/fakenix/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Detection client](https://github.com/akashvedappan/fakenix/blob/main/frontend/src/services/detectionService.js): `frontend/src/services/detectionService.js`

### API and access

- [Detection endpoints](https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/detection_routes.py): `backend/app/routes/detection_routes.py`
- [Authentication endpoints](https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/auth_routes.py): `backend/app/routes/auth_routes.py`
- [Dashboard endpoints](https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/dashboard_routes.py): `backend/app/routes/dashboard_routes.py`
- [Evidence endpoints](https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/evidence_routes.py): `backend/app/routes/evidence_routes.py`
- [Forensic report endpoints](https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/report_routes.py): `backend/app/routes/report_routes.py`
- [Incident reporting endpoints](https://github.com/akashvedappan/fakenix/blob/main/backend/app/routes/cybercrime_routes.py): `backend/app/routes/cybercrime_routes.py`

### Media analysis

- [Detection orchestration](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/detection_service.py): `backend/app/services/detection_service.py`
- [Media processing](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/image_service.py): `backend/app/services/image_service.py`
- [Metadata extraction](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/metadata_service.py): `backend/app/services/metadata_service.py`
- [Vision analysis](https://github.com/akashvedappan/fakenix/blob/main/backend/app/ai/groq_analyzer.py): `backend/app/ai/groq_analyzer.py`
- [Risk classification](https://github.com/akashvedappan/fakenix/blob/main/backend/app/ai/risk_classifier.py): `backend/app/ai/risk_classifier.py`
- [Video analysis](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/video_service.py): `backend/app/services/video_service.py`

### Evidence and reporting

- [Evidence custody](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/evidence_service.py): `backend/app/services/evidence_service.py`
- [Evidence hashing](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/hashing_service.py): `backend/app/services/hashing_service.py`
- [PDF report generation](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/report_service.py): `backend/app/services/report_service.py`
- [Incident dossier service](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/cybercrime_service.py): `backend/app/services/cybercrime_service.py`

### Identity and records

- [Authentication service](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Dashboard analytics](https://github.com/akashvedappan/fakenix/blob/main/backend/app/services/dashboard_service.py): `backend/app/services/dashboard_service.py`
- [Detection records](https://github.com/akashvedappan/fakenix/blob/main/backend/app/models/detection.py): `backend/app/models/detection.py`
- [Application database](https://github.com/akashvedappan/fakenix/blob/main/backend/app/extensions.py): `backend/app/extensions.py`

### Other components

- **Investigator**
- **Groq vision service**

## Connections

- Investigator → Application routes: uses (evidence: `README.md`)
- Application routes → Analysis screens: routes to (evidence: `frontend/src/App.jsx`)
- Analysis screens → Detection client: submits analysis (evidence: `frontend/src/pages/CybercrimeReport.jsx`)
- Detection client → API client: sends requests (evidence: `frontend/src/services/detectionService.js`)
- API client → Detection endpoints: calls API
- Detection endpoints → Detection orchestration: dispatches (evidence: `backend/app/routes/detection_routes.py`)
- Detection orchestration → Media processing: uses (evidence: `backend/app/services/detection_service.py`)
- Detection orchestration → Metadata extraction: extracts metadata (evidence: `backend/app/services/detection_service.py`)
- Detection orchestration → Vision analysis: requests analysis (evidence: `backend/app/services/detection_service.py`)
- Vision analysis → Groq vision service: analyzes media (evidence: `README.md`)
- Vision analysis → Risk classification: classifies risk (evidence: `backend/app/ai/groq_analyzer.py`)
- Vision analysis → Video analysis: uses video analysis (evidence: `backend/app/ai/groq_analyzer.py`)
- Detection orchestration → Evidence hashing: seals uploads (evidence: `backend/app/services/detection_service.py`)
- Detection orchestration → Evidence custody: records evidence (evidence: `backend/app/services/detection_service.py`)
- Evidence endpoints → Evidence custody: dispatches (evidence: `backend/app/routes/evidence_routes.py`)
- Evidence custody → Evidence hashing: verifies hashes (evidence: `backend/app/services/evidence_service.py`)
- Forensic report endpoints → PDF report generation: generates reports (evidence: `backend/app/routes/report_routes.py`)
- PDF report generation → Evidence hashing: checks integrity (evidence: `backend/app/services/report_service.py`)
- Incident reporting endpoints → Incident dossier service: dispatches (evidence: `backend/app/routes/cybercrime_routes.py`)
- Authentication endpoints → Authentication service: authenticates (evidence: `backend/app/routes/auth_routes.py`)
- Dashboard endpoints → Dashboard analytics: requests metrics (evidence: `backend/app/routes/dashboard_routes.py`)
- Detection orchestration → Detection records: persists results (evidence: `backend/app/services/detection_service.py`)
- Dashboard analytics → Detection records: queries trends (evidence: `backend/app/services/dashboard_service.py`)
- Authentication service → Application database: reads and writes (evidence: `backend/app/services/auth_service.py`)
- Detection records → Application database: uses ORM (evidence: `backend/app/models/detection.py`)
- PDF report generation → Application database: stores reports (evidence: `backend/app/services/report_service.py`)
