# ibnnuus/metadatacleaner architecture

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

- Interactive diagram: https://gitdiagram.com/ibnnuus/metadatacleaner
- Repository: https://github.com/ibnnuus/metadatacleaner

## Overview

AI Metadata Cleaner is a web app for inspecting and removing image metadata. The main workflow is upload, file validation, a pre-clean scan, in-memory metadata removal, a post-clean verification scan, then displaying a comparison and downloadable result. The scanner also detects known AI-generator signatures. The README describes temporary RAM-only processing and no database or external file storage. API and upload excerpts support the main call flow; the frontend excerpt is partial, so optional UI-to-endpoint wiring beyond the shown clean request is not assumed.

Main entry points: [`frontend/api/routers/cleaner.py`](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/routers/cleaner.py) (Scan and clean routes), [`frontend/components/Dropzone.tsx`](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/Dropzone.tsx) (Upload and results), [`frontend/app/page.tsx`](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/app/page.tsx) (Home page), [`frontend/api/services/scanner.py`](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/scanner.py) (Metadata scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_page["Home page<br/>[page.tsx]"]
  node_dropzone["Upload and results<br/>[Dropzone.tsx]"]
  node_features["Feature overview<br/>[Features.tsx]"]
  node_steps["Usage guide<br/>[HowItWorks.tsx]"]
  node_faq["Privacy FAQ<br/>[FAQ.tsx]"]
end

subgraph group_api["API entry"]
  node_api_app["FastAPI app<br/>[index.py]"]
  node_clean_routes["Scan and clean routes<br/>[cleaner.py]"]
  node_queue["Queue status<br/>[cleaner.py]"]
end

subgraph group_processing["Image processing"]
  node_scan["Metadata scanner<br/>[scanner.py]"]
  node_ai_detect["AI signature detection<br/>[scanner.py]"]
  node_clean["Metadata removal<br/>[cleaner.py]"]
end

subgraph group_validation["Input validation"]
  node_magic["Image validation<br/>[magic.py]"]
end

node_visitor(("Image user"))

node_visitor -->|"opens"| node_page
node_page -->|"renders"| node_dropzone
node_page -->|"renders"| node_features
node_page -->|"renders"| node_steps
node_page -->|"renders"| node_faq
node_visitor -->|"uploads image"| node_dropzone
node_dropzone -->|"requests clean"| node_clean_routes
node_dropzone -->|"checks status"| node_queue
node_api_app -->|"dispatches routes"| node_clean_routes
node_clean_routes -->|"validates image"| node_magic
node_clean_routes -->|"scans before and after"| node_scan
node_clean_routes -->|"removes metadata"| node_clean
node_scan -->|"checks signatures"| node_ai_detect
node_clean_routes -->|"returns result"| node_dropzone
node_queue -->|"returns status"| node_dropzone

click node_page "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/app/page.tsx"
click node_dropzone "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/Dropzone.tsx"
click node_features "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/Features.tsx"
click node_steps "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/HowItWorks.tsx"
click node_faq "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/FAQ.tsx"
click node_api_app "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/index.py"
click node_clean_routes "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/routers/cleaner.py"
click node_queue "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/routers/cleaner.py"
click node_magic "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/utils/magic.py"
click node_scan "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/scanner.py"
click node_ai_detect "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/scanner.py"
click node_clean "https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/cleaner.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_page,node_dropzone,node_features,node_steps,node_faq,node_visitor toneBlue
class node_api_app,node_clean_routes,node_queue toneAmber
class node_scan,node_ai_detect,node_clean toneMint
class node_magic toneRose
```

## Components

### Web interface

- [Home page](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Upload and results](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/Dropzone.tsx): `frontend/components/Dropzone.tsx`
- [Feature overview](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/Features.tsx): `frontend/components/Features.tsx`
- [Usage guide](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/HowItWorks.tsx): `frontend/components/HowItWorks.tsx`
- [Privacy FAQ](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/components/FAQ.tsx): `frontend/components/FAQ.tsx`

### API entry

- [FastAPI app](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/index.py): `frontend/api/index.py`
- [Scan and clean routes](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/routers/cleaner.py): `frontend/api/routers/cleaner.py`
- [Queue status](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/routers/cleaner.py): `frontend/api/routers/cleaner.py`

### Image processing

- [Metadata scanner](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/scanner.py): `frontend/api/services/scanner.py`
- [AI signature detection](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/scanner.py): `frontend/api/services/scanner.py`
- [Metadata removal](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/services/cleaner.py): `frontend/api/services/cleaner.py`

### Input validation

- [Image validation](https://github.com/ibnnuus/metadatacleaner/blob/main/frontend/api/utils/magic.py): `frontend/api/utils/magic.py`

### Other components

- **Image user**

## Connections

- Image user → Home page: opens
- Home page → Upload and results: renders
- Home page → Feature overview: renders
- Home page → Usage guide: renders
- Home page → Privacy FAQ: renders
- Image user → Upload and results: uploads image
- Upload and results → Scan and clean routes: requests clean
- Upload and results → Queue status: checks status
- FastAPI app → Scan and clean routes: dispatches routes
- Scan and clean routes → Image validation: validates image
- Scan and clean routes → Metadata scanner: scans before and after
- Scan and clean routes → Metadata removal: removes metadata
- Metadata scanner → AI signature detection: checks signatures
- Scan and clean routes → Upload and results: returns result
- Queue status → Upload and results: returns status
