# hariomlokhande-coder/deep_fake_radar architecture

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

- Interactive diagram: https://gitdiagram.com/hariomlokhande-coder/deep_fake_radar
- Repository: https://github.com/hariomlokhande-coder/deep_fake_radar

## Overview

DeepFakeRadar is a web app for classifying uploaded audio and video as real or deepfake. A user selects or drops a file in the React interface, starts analysis, and the app posts it to the Flask prediction API; the returned prediction and confidence are shown in the results view. The README documents separate MFCC/Conv1D audio and EfficientNetB0/Dense video detection capabilities. The excerpts show the frontend request and UI composition, but not Flask route internals, so backend model links are documented rather than source-verified.

Main entry points: [`frontend/src/components/ResultsSection.js`](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/ResultsSection.js) (Results display), [`frontend/src/App.js`](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/App.js) (App workflow), [`frontend/src/components/Icon.js`](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Icon.js) (Icon set), [`frontend/src/components/FileUpload.js`](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/FileUpload.js) (File selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React interface"]
  node_app["App workflow<br/>[App.js]"]
  node_fileupload["File selection<br/>[FileUpload.js]"]
  node_results["Results display<br/>[ResultsSection.js]"]
  node_header["Theme header<br/>[Header.js]"]
  node_info["Info section<br/>[InfoSection.js]"]
  node_icons["Icon set<br/>[Icon.js]"]
  node_controls["UI controls<br/>[Button.js]"]
  node_cards["Card layout<br/>[Card.js]"]
  node_alerts["Alert display<br/>[Alert.js]"]
  node_progress["Confidence bar<br/>[Progress.js]"]
  node_switch["Theme switch<br/>[Switch.js]"]
end

subgraph group_backend["Prediction service"]
  node_api["Flask prediction API<br/>[app.py]"]
end

subgraph group_models["Detection models"]
  node_audio["Audio classifier"]
  node_video["Video classifier"]
end

node_user(("User"))

node_user -->|"submits media"| node_app
node_app -->|"posts prediction"| node_api
node_api -.->|"uses audio model"| node_audio
node_api -.->|"uses video model"| node_video
node_app -.->|"renders result"| node_results
node_app -.->|"renders upload"| node_fileupload
node_fileupload -->|"uses button"| node_controls
node_fileupload -->|"renders icons"| node_icons
node_results -->|"uses layout"| node_cards
node_results -->|"renders warning"| node_alerts
node_results -->|"uses buttons"| node_controls
node_results -->|"renders confidence"| node_progress
node_results -->|"renders icons"| node_icons
node_header -->|"renders icons"| node_icons
node_header -->|"uses switch"| node_switch
node_info -->|"renders icons"| node_icons

click node_app "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/App.js"
click node_fileupload "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/FileUpload.js"
click node_results "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/ResultsSection.js"
click node_header "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Header.js"
click node_info "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/InfoSection.js"
click node_icons "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Icon.js"
click node_controls "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Button.js"
click node_cards "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Card.js"
click node_alerts "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Alert.js"
click node_progress "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Progress.js"
click node_switch "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Switch.js"
click node_api "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/backend/app.py"
click node_audio "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/backend/audio_model_final.keras"
click node_video "https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/backend/video_deepfake_model_final.h5"

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_fileupload,node_results,node_header,node_info,node_icons,node_controls,node_cards,node_alerts,node_progress,node_switch,node_user toneBlue
class node_api toneAmber
class node_audio,node_video toneMint
```

## Components

### React interface

- [App workflow](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/App.js): `frontend/src/App.js`
- [File selection](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/FileUpload.js): `frontend/src/components/FileUpload.js`
- [Results display](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/ResultsSection.js): `frontend/src/components/ResultsSection.js`
- [Theme header](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Header.js): `frontend/src/components/Header.js`
- [Info section](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/InfoSection.js): `frontend/src/components/InfoSection.js`
- [Icon set](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Icon.js): `frontend/src/components/Icon.js`
- [UI controls](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Button.js): `frontend/src/components/Button.js`
- [Card layout](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Card.js): `frontend/src/components/Card.js`
- [Alert display](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Alert.js): `frontend/src/components/Alert.js`
- [Confidence bar](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Progress.js): `frontend/src/components/Progress.js`
- [Theme switch](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/frontend/src/components/Switch.js): `frontend/src/components/Switch.js`

### Prediction service

- [Flask prediction API](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/backend/app.py): `backend/app.py`

### Detection models

- [Audio classifier](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/backend/audio_model_final.keras): `backend/audio_model_final.keras`
- [Video classifier](https://github.com/hariomlokhande-coder/deep_fake_radar/blob/master/backend/video_deepfake_model_final.h5): `backend/video_deepfake_model_final.h5`

### Other components

- **User**

## Connections

- User → App workflow: submits media (evidence: `README.md`)
- App workflow → Flask prediction API: posts prediction (evidence: `frontend/src/App.js`)
- Flask prediction API → Audio classifier: uses audio model (evidence: `README.md`)
- Flask prediction API → Video classifier: uses video model (evidence: `README.md`)
- App workflow → Results display: renders result (evidence: `frontend/src/App.js`)
- App workflow → File selection: renders upload (evidence: `frontend/src/App.js`)
- File selection → UI controls: uses button (evidence: `frontend/src/components/FileUpload.js`)
- File selection → Icon set: renders icons (evidence: `frontend/src/components/FileUpload.js`)
- Results display → Card layout: uses layout (evidence: `frontend/src/components/ResultsSection.js`)
- Results display → Alert display: renders warning (evidence: `frontend/src/components/ResultsSection.js`)
- Results display → UI controls: uses buttons (evidence: `frontend/src/components/ResultsSection.js`)
- Results display → Confidence bar: renders confidence (evidence: `frontend/src/components/ResultsSection.js`)
- Results display → Icon set: renders icons (evidence: `frontend/src/components/ResultsSection.js`)
- Theme header → Icon set: renders icons (evidence: `frontend/src/components/Header.js`)
- Theme header → Theme switch: uses switch (evidence: `frontend/src/components/Header.js`)
- Info section → Icon set: renders icons (evidence: `frontend/src/components/InfoSection.js`)
