# shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis architecture

> Architecture diagram of the GitHub repository shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis
- Repository: https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis

## Overview

This is a video-analysis web application: users authenticate, upload videos, and receive deepfake and sentiment results saved with their video records for later review. The sampled backend shows Express routing and authorization, a Flask processing service, and model inference. The README also describes dashboards, detailed reports, charts, PDF export, and live status updates; frontend implementation files were not present in the supplied tree, so those capabilities are represented at the frontend-directory level. The contact route exists but is not shown mounted by the sampled server entry point.

Main entry points: [`backend/src/routes/videos.js`](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/videos.js) (Video routes), [`backend/src/controllers/videoController.js`](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/videoController.js) (Video operations), [`backend/src/index.js`](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/index.js) (Express server), [`backend/src/routes/auth.js`](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/auth.js) (Authentication routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and access"]
  node_express["Express server<br/>[index.js]"]
  node_authroutes["Authentication routes<br/>[auth.js]"]
  node_videoroutes["Video routes<br/>[videos.js]"]
  node_contactroutes["Contact route<br/>[contactroutes.js]"]
  node_authguard["JWT authorization<br/>[auth.js]"]
  node_uploadguard["Upload handling<br/>[upload.js]"]
end

subgraph group_records["Accounts and video records"]
  node_authlogic["Account operations<br/>[authController.js]"]
  node_userrecord["User model<br/>[User.js]"]
  node_videologic["Video operations<br/>[videoController.js]"]
  node_videorecord["Video model<br/>[Video.js]"]
  node_contactlogic["Contact submission"]
  node_contactrecord["Contact model<br/>[contact.js]"]
  node_mongostore[("MongoDB and GridFS")]
end

subgraph group_analysis["AI analysis"]
  node_flask["Flask processing API<br/>[app.py]"]
  node_sentiment["Sentiment inference<br/>[inference.py]"]
  node_deepfake["Deepfake inference<br/>[inference.py]"]
end

subgraph group_experience["User experience"]
  node_frontend["Web experience"]
end

node_user(("Video user"))

node_user -.->|"uses API"| node_express
node_express -->|"mounts"| node_authroutes
node_express -->|"mounts"| node_videoroutes
node_authroutes -->|"dispatches"| node_authlogic
node_authroutes -->|"protects profile"| node_authguard
node_videoroutes -->|"dispatches"| node_videologic
node_videoroutes -->|"protects routes"| node_authguard
node_videoroutes -->|"parses upload"| node_uploadguard
node_authlogic -->|"reads and saves"| node_userrecord
node_authguard -->|"loads user"| node_userrecord
node_videologic -->|"reads and updates"| node_videorecord
node_videologic -->|"streams video files"| node_mongostore
node_videologic -->|"posts video"| node_flask
node_flask -->|"runs analysis"| node_sentiment
node_flask -->|"runs detection"| node_deepfake
node_contactroutes -->|"dispatches"| node_contactlogic
node_contactlogic -->|"saves submission"| node_contactrecord
node_frontend -.->|"calls API"| node_express
node_frontend -.->|"presents results"| node_user

click node_express "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/index.js"
click node_authroutes "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/auth.js"
click node_videoroutes "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/videos.js"
click node_contactroutes "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/contactroutes.js"
click node_authguard "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/middleware/auth.js"
click node_uploadguard "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/middleware/upload.js"
click node_authlogic "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/authController.js"
click node_userrecord "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/models/User.js"
click node_videologic "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/videoController.js"
click node_videorecord "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/models/Video.js"
click node_contactlogic "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/contactcontroller.js"
click node_contactrecord "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/models/contact.js"
click node_flask "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/app.py"
click node_sentiment "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/Sentimentanalysis/inference.py"
click node_deepfake "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/Deepfakedetection/inference.py"
click node_frontend "https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/tree/master/frontend"

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_express,node_authroutes,node_videoroutes,node_contactroutes,node_authguard,node_uploadguard,node_user toneBlue
class node_authlogic,node_userrecord,node_videologic,node_videorecord,node_contactlogic,node_contactrecord,node_mongostore toneAmber
class node_flask,node_sentiment,node_deepfake toneMint
class node_frontend toneRose
```

## Components

### API and access

- [Express server](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/index.js): `backend/src/index.js`
- [Authentication routes](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/auth.js): `backend/src/routes/auth.js`
- [Video routes](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/videos.js): `backend/src/routes/videos.js`
- [Contact route](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/routes/contactroutes.js): `backend/src/routes/contactroutes.js`
- [JWT authorization](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/middleware/auth.js): `backend/src/middleware/auth.js`
- [Upload handling](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/middleware/upload.js): `backend/src/middleware/upload.js`

### Accounts and video records

- [Account operations](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [User model](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/models/User.js): `backend/src/models/User.js`
- [Video operations](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/videoController.js): `backend/src/controllers/videoController.js`
- [Video model](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/models/Video.js): `backend/src/models/Video.js`
- [Contact submission](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/controllers/contactcontroller.js): `backend/src/controllers/contactcontroller.js`
- [Contact model](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/src/models/contact.js): `backend/src/models/contact.js`
- **MongoDB and GridFS**

### AI analysis

- [Flask processing API](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/app.py): `backend/app.py`
- [Sentiment inference](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/Sentimentanalysis/inference.py): `backend/Sentimentanalysis/inference.py`
- [Deepfake inference](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/blob/master/backend/Deepfakedetection/inference.py): `backend/Deepfakedetection/inference.py`

### User experience

- [Web experience](https://github.com/shammas-satti-00/ai-powered-deepfake-detection-with-sentiment-analysis/tree/master/frontend): `frontend`

### Other components

- **Video user**

## Connections

- Video user → Express server: uses API (evidence: `README.md`)
- Express server → Authentication routes: mounts (evidence: `backend/src/index.js`)
- Express server → Video routes: mounts (evidence: `backend/src/index.js`)
- Authentication routes → Account operations: dispatches (evidence: `backend/src/routes/auth.js`)
- Authentication routes → JWT authorization: protects profile (evidence: `backend/src/routes/auth.js`)
- Video routes → Video operations: dispatches (evidence: `backend/src/routes/videos.js`)
- Video routes → JWT authorization: protects routes (evidence: `backend/src/routes/videos.js`)
- Video routes → Upload handling: parses upload (evidence: `backend/src/routes/videos.js`)
- Account operations → User model: reads and saves (evidence: `backend/src/controllers/authController.js`)
- JWT authorization → User model: loads user (evidence: `backend/src/middleware/auth.js`)
- Video operations → Video model: reads and updates (evidence: `backend/src/controllers/videoController.js`)
- Video operations → MongoDB and GridFS: streams video files (evidence: `backend/src/controllers/videoController.js`)
- Video operations → Flask processing API: posts video (evidence: `backend/src/controllers/videoController.js`)
- Flask processing API → Sentiment inference: runs analysis (evidence: `backend/app.py`)
- Flask processing API → Deepfake inference: runs detection (evidence: `backend/app.py`)
- Contact route → Contact submission: dispatches (evidence: `backend/src/routes/contactroutes.js`)
- Contact submission → Contact model: saves submission (evidence: `backend/src/controllers/contactcontroller.js`)
- Web experience → Express server: calls API (evidence: `README.md`)
- Web experience → Video user: presents results (evidence: `README.md`)
