# nabeehafatima-code/deepverify architecture

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

- Interactive diagram: https://gitdiagram.com/nabeehafatima-code/deepverify
- Repository: https://github.com/nabeehafatima-code/deepverify

## Overview

DeepVerify is a media-verification application with a React client and FastAPI backend. The principal workflow is user upload, media-specific analysis, a verification result with explanations, then report review or export. The backend includes image classification, video processing, heuristic audio spectral scanning, explainability, and report persistence/PDF generation. The client also supports report browsing and detail views. Routes and selected services were sampled; where service wiring was not visible, the graph avoids asserting calls beyond the documented application entry points and module capabilities.

Main entry points: [`backend/app/api/routes/analyze.py`](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/api/routes/analyze.py) (Analysis routes), [`src/App.tsx`](https://github.com/nabeehafatima-code/deepverify/blob/main/src/App.tsx) (App routing), [`backend/app/main.py`](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/services/report_service.py`](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/report_service.py) (Report service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routing<br/>[App.tsx]"]
  node_analyze_page["Analyze page<br/>[AnalyzePage.tsx]"]
  node_upload["Upload interface<br/>[UploadZone.tsx]"]
  node_client_api["Analysis API client<br/>[api.ts]"]
  node_reports_page["Reports page<br/>[ReportsPage.tsx]"]
  node_detail_page["Report detail"]
  node_reports_api["Reports API client<br/>[reportsApi.ts]"]
end

subgraph group_api["API layer"]
  node_backend["FastAPI application<br/>[main.py]"]
  node_analyze_route["Analysis routes<br/>[analyze.py]"]
  node_reports_route["Report routes<br/>[reports.py]"]
  node_schemas["Analysis schemas<br/>[analysis.py]"]
end

subgraph group_analysis["Media analysis"]
  node_preprocessing["Media preprocessing<br/>[preprocessing.py]"]
  node_image_inference["Image inference"]
  node_video["Video analysis<br/>[video_service.py]"]
  node_audio["Audio spectral scan<br/>[audio_service.py]"]
  node_explainability["Visual explainability"]
end

subgraph group_reports["Report lifecycle"]
  node_report_service["Report service<br/>[report_service.py]"]
  node_report_store[("Reports JSON store<br/>[report_service.py]")]
end

node_user(("User"))
node_model{{"Image model"}}

node_user -->|"uses"| node_app
node_app -->|"routes"| node_analyze_page
node_app -->|"routes"| node_reports_page
node_app -->|"routes"| node_detail_page
node_analyze_page -->|"renders"| node_upload
node_analyze_page -->|"submits media"| node_client_api
node_client_api -->|"HTTP requests"| node_backend
node_backend -->|"dispatches"| node_analyze_route
node_backend -->|"dispatches"| node_reports_route
node_analyze_route -->|"processes media"| node_preprocessing
node_analyze_route -->|"requests inference"| node_image_inference
node_analyze_route -->|"analyzes video"| node_video
node_analyze_route -->|"scans audio"| node_audio
node_analyze_route -->|"requests explanation"| node_explainability
node_image_inference -->|"runs classification"| node_model
node_analyze_route -->|"returns response"| node_schemas
node_reports_page -->|"loads reports"| node_reports_api
node_detail_page -->|"loads report"| node_reports_api
node_reports_api -->|"HTTP requests"| node_backend
node_reports_route -->|"manages reports"| node_report_service
node_analyze_route -->|"saves report"| node_report_service
node_report_service -->|"reads and writes"| node_report_store
node_report_service -->|"builds PDF"| node_reports_route

click node_app "https://github.com/nabeehafatima-code/deepverify/blob/main/src/App.tsx"
click node_analyze_page "https://github.com/nabeehafatima-code/deepverify/blob/main/src/pages/AnalyzePage.tsx"
click node_upload "https://github.com/nabeehafatima-code/deepverify/blob/main/src/components/UploadZone.tsx"
click node_client_api "https://github.com/nabeehafatima-code/deepverify/blob/main/src/services/api.ts"
click node_reports_page "https://github.com/nabeehafatima-code/deepverify/blob/main/src/pages/ReportsPage.tsx"
click node_detail_page "https://github.com/nabeehafatima-code/deepverify/blob/main/src/pages/ReportDetailPage.tsx"
click node_reports_api "https://github.com/nabeehafatima-code/deepverify/blob/main/src/services/reportsApi.ts"
click node_backend "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/main.py"
click node_analyze_route "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/api/routes/analyze.py"
click node_reports_route "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/api/routes/reports.py"
click node_schemas "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/schemas/analysis.py"
click node_preprocessing "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/preprocessing.py"
click node_image_inference "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/inference_service.py"
click node_video "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/video_service.py"
click node_audio "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/audio_service.py"
click node_explainability "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/explainability_service.py"
click node_report_service "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/report_service.py"
click node_report_store "https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/report_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_analyze_page,node_upload,node_client_api,node_reports_page,node_detail_page,node_reports_api,node_user toneBlue
class node_backend,node_analyze_route,node_reports_route,node_schemas toneAmber
class node_preprocessing,node_image_inference,node_video,node_audio,node_explainability toneMint
class node_report_service,node_report_store toneRose
class node_model toneIndigo
```

## Components

### Web client

- [App routing](https://github.com/nabeehafatima-code/deepverify/blob/main/src/App.tsx): `src/App.tsx`
- [Analyze page](https://github.com/nabeehafatima-code/deepverify/blob/main/src/pages/AnalyzePage.tsx): `src/pages/AnalyzePage.tsx`
- [Upload interface](https://github.com/nabeehafatima-code/deepverify/blob/main/src/components/UploadZone.tsx): `src/components/UploadZone.tsx`
- [Analysis API client](https://github.com/nabeehafatima-code/deepverify/blob/main/src/services/api.ts): `src/services/api.ts`
- [Reports page](https://github.com/nabeehafatima-code/deepverify/blob/main/src/pages/ReportsPage.tsx): `src/pages/ReportsPage.tsx`
- [Report detail](https://github.com/nabeehafatima-code/deepverify/blob/main/src/pages/ReportDetailPage.tsx): `src/pages/ReportDetailPage.tsx`
- [Reports API client](https://github.com/nabeehafatima-code/deepverify/blob/main/src/services/reportsApi.ts): `src/services/reportsApi.ts`

### API layer

- [FastAPI application](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/main.py): `backend/app/main.py`
- [Analysis routes](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/api/routes/analyze.py): `backend/app/api/routes/analyze.py`
- [Report routes](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/api/routes/reports.py): `backend/app/api/routes/reports.py`
- [Analysis schemas](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/schemas/analysis.py): `backend/app/schemas/analysis.py`

### Media analysis

- [Media preprocessing](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/preprocessing.py): `backend/app/services/preprocessing.py`
- [Image inference](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/inference_service.py): `backend/app/services/inference_service.py`
- [Video analysis](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/video_service.py): `backend/app/services/video_service.py`
- [Audio spectral scan](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/audio_service.py): `backend/app/services/audio_service.py`
- [Visual explainability](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/explainability_service.py): `backend/app/services/explainability_service.py`

### Report lifecycle

- [Report service](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/report_service.py): `backend/app/services/report_service.py`
- [Reports JSON store](https://github.com/nabeehafatima-code/deepverify/blob/main/backend/app/services/report_service.py): `backend/app/services/report_service.py`

### Other components

- **User**
- **Image model**

## Connections

- User → App routing: uses
- App routing → Analyze page: routes
- App routing → Reports page: routes
- App routing → Report detail: routes
- Analyze page → Upload interface: renders
- Analyze page → Analysis API client: submits media
- Analysis API client → FastAPI application: HTTP requests
- FastAPI application → Analysis routes: dispatches
- FastAPI application → Report routes: dispatches
- Analysis routes → Media preprocessing: processes media
- Analysis routes → Image inference: requests inference
- Analysis routes → Video analysis: analyzes video
- Analysis routes → Audio spectral scan: scans audio
- Analysis routes → Visual explainability: requests explanation
- Image inference → Image model: runs classification
- Analysis routes → Analysis schemas: returns response
- Reports page → Reports API client: loads reports
- Report detail → Reports API client: loads report
- Reports API client → FastAPI application: HTTP requests
- Report routes → Report service: manages reports
- Analysis routes → Report service: saves report
- Report service → Reports JSON store: reads and writes
- Report service → Report routes: builds PDF
