# icancodefyi/sniffer-ahmedabad architecture

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

- Interactive diagram: https://gitdiagram.com/icancodefyi/sniffer-ahmedabad
- Repository: https://github.com/icancodefyi/sniffer-ahmedabad

## Overview

Sniffer Forensics is a media-authenticity analysis application: users upload image, video, or PDF evidence, the backend runs forensic checks and returns a scored, explainable report, and the frontend presents that result. The main request and analysis flow is documented in the README and supported by the sampled API and pipeline excerpts. The pipeline excerpt is partial, so internal signal wiring beyond the visible orchestration is represented at subsystem level. The tree does not show a persistent result store; no storage component is inferred.

Main entry points: [`services/analysis/pipeline.py`](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/pipeline.py) (Pipeline orchestration), [`services/analysis/main.py`](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/main.py) (Analyze endpoint), [`src/app/analyze/page.tsx`](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/analyze/page.tsx) (Upload interface), [`lib/analyze.ts`](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/lib/analyze.ts) (Analysis client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_upload["Upload interface<br/>[page.tsx]"]
  node_dropzone["Media selection<br/>[dropzone.tsx]"]
  node_api_client["Analysis client<br/>[analyze.ts]"]
  node_landing["Product introduction<br/>[page.tsx]"]
end

subgraph group_api["Analysis API"]
  node_api_entry["Analyze endpoint<br/>[main.py]"]
end

subgraph group_forensics["Forensic analysis"]
  node_pipeline["Pipeline orchestration<br/>[pipeline.py]"]
  node_media_util["Media validation<br/>[util.py]"]
  node_video["Video sampling<br/>[video.py]"]
  node_signal_suite["Forensic signals"]
  node_provenance["C2PA provenance<br/>[c2pa.py]"]
  node_scoring["Score and verdict<br/>[score.py]"]
end

subgraph group_evidence["Results and guidance"]
  node_result_page["Result view<br/>[page.tsx]"]
  node_report["Evidence report<br/>[report.tsx]"]
  node_signal_table["Signal breakdown<br/>[signal-table.tsx]"]
  node_gauge["Confidence display"]
  node_method["Method explanation<br/>[page.tsx]"]
  node_platforms["Platform directory"]
end

node_person(("Investigator"))

node_person -->|"submits media"| node_upload
node_upload -->|"selects files"| node_dropzone
node_upload -->|"requests analysis"| node_api_client
node_api_client -->|"sends multipart"| node_api_entry
node_api_entry -->|"validates media"| node_media_util
node_api_entry -->|"passes bytes"| node_pipeline
node_pipeline -->|"samples frames"| node_video
node_pipeline -->|"runs checks"| node_signal_suite
node_pipeline -->|"checks credentials"| node_provenance
node_pipeline -->|"fuses signals"| node_scoring
node_pipeline -->|"returns analysis"| node_api_entry
node_api_client -->|"provides result"| node_result_page
node_result_page -->|"renders evidence"| node_report
node_report -->|"shows signals"| node_signal_table
node_report -->|"shows confidence"| node_gauge
node_person -->|"explores product"| node_landing
node_person -->|"reads methodology"| node_method
node_person -->|"checks platforms"| node_platforms

click node_upload "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/analyze/page.tsx"
click node_dropzone "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/dropzone.tsx"
click node_api_client "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/lib/analyze.ts"
click node_api_entry "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/main.py"
click node_pipeline "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/pipeline.py"
click node_media_util "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/util.py"
click node_video "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/video.py"
click node_signal_suite "https://github.com/icancodefyi/sniffer-ahmedabad/tree/main/services/analysis/signals"
click node_provenance "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/signals/c2pa.py"
click node_scoring "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/score.py"
click node_result_page "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/result/%5Bid%5D/page.tsx"
click node_report "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/report.tsx"
click node_signal_table "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/signal-table.tsx"
click node_gauge "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/confidence-gauge.tsx"
click node_method "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/method/page.tsx"
click node_platforms "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/supported-platforms/SupportedPlatformsClient.tsx"
click node_landing "https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/page.tsx"

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_upload,node_dropzone,node_api_client,node_landing toneBlue
class node_api_entry toneAmber
class node_pipeline,node_media_util,node_video,node_signal_suite,node_provenance,node_scoring toneMint
class node_result_page,node_report,node_signal_table,node_gauge,node_method,node_platforms toneRose
class node_person toneIndigo
```

## Components

### Web application

- [Upload interface](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/analyze/page.tsx): `src/app/analyze/page.tsx`
- [Media selection](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/dropzone.tsx): `components/dropzone.tsx`
- [Analysis client](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/lib/analyze.ts): `lib/analyze.ts`
- [Product introduction](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/page.tsx): `src/app/page.tsx`

### Analysis API

- [Analyze endpoint](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/main.py): `services/analysis/main.py`

### Forensic analysis

- [Pipeline orchestration](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/pipeline.py): `services/analysis/pipeline.py`
- [Media validation](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/util.py): `services/analysis/util.py`
- [Video sampling](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/video.py): `services/analysis/video.py`
- [Forensic signals](https://github.com/icancodefyi/sniffer-ahmedabad/tree/main/services/analysis/signals): `services/analysis/signals`
- [C2PA provenance](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/signals/c2pa.py): `services/analysis/signals/c2pa.py`
- [Score and verdict](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/services/analysis/score.py): `services/analysis/score.py`

### Results and guidance

- [Result view](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/result/%5Bid%5D/page.tsx): `src/app/result/[id]/page.tsx`
- [Evidence report](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/report.tsx): `components/report.tsx`
- [Signal breakdown](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/signal-table.tsx): `components/signal-table.tsx`
- [Confidence display](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/components/confidence-gauge.tsx): `components/confidence-gauge.tsx`
- [Method explanation](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/method/page.tsx): `src/app/method/page.tsx`
- [Platform directory](https://github.com/icancodefyi/sniffer-ahmedabad/blob/main/src/app/supported-platforms/SupportedPlatformsClient.tsx): `src/app/supported-platforms/SupportedPlatformsClient.tsx`

### Other components

- **Investigator**

## Connections

- Investigator → Upload interface: submits media
- Upload interface → Media selection: selects files
- Upload interface → Analysis client: requests analysis
- Analysis client → Analyze endpoint: sends multipart
- Analyze endpoint → Media validation: validates media
- Analyze endpoint → Pipeline orchestration: passes bytes
- Pipeline orchestration → Video sampling: samples frames
- Pipeline orchestration → Forensic signals: runs checks
- Pipeline orchestration → C2PA provenance: checks credentials
- Pipeline orchestration → Score and verdict: fuses signals
- Pipeline orchestration → Analyze endpoint: returns analysis
- Analysis client → Result view: provides result
- Result view → Evidence report: renders evidence
- Evidence report → Signal breakdown: shows signals
- Evidence report → Confidence display: shows confidence
- Investigator → Product introduction: explores product
- Investigator → Method explanation: reads methodology
- Investigator → Platform directory: checks platforms
