# mukhilamsath/instagram-fake-account-detection---multi-class-classification architecture

> Architecture diagram of the GitHub repository mukhilamsath/instagram-fake-account-detection---multi-class-classification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification
- Repository: https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification

## Overview

FakeGuard AI classifies Instagram accounts as real, active fake, inactive fake, or spammer. The principal workflow is account-feature entry in the web UI, submission to FastAPI for feature preparation and model inference, then display of a class, confidence, and signals. The repository also includes a Streamlit exploration app and a separate dataset-to-model training pipeline. The README documents both interfaces; source excerpts show their main entry points, but not the template or CSS internals.

Main entry points: [`server.py`](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py) (FastAPI Server), [`static/js/main.js`](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/static/js/main.js) (UI Interactions), [`app.py`](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/app.py) (Streamlit Explorer), [`dataset.csv`](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/dataset.csv) (Account Dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Scanner"]
  node_webui["FakeGuard UI<br/>[index.html]"]
  node_browser["UI Interactions<br/>[main.js]"]
  node_api["FastAPI Server<br/>[server.py]"]
  node_prep["Feature Preparation<br/>[server.py]"]
  node_inference["Class Prediction<br/>[server.py]"]
  node_dashboard["Dataset Stats API<br/>[server.py]"]
end

subgraph group_explore["Model Explorer"]
  node_streamlit["Streamlit Explorer<br/>[app.py]"]
end

subgraph group_ml["Model Training"]
  node_training["Training Data Prep<br/>[train.py]"]
  node_engineering["Feature Engineering<br/>[train.py]"]
  node_evaluation["Model Training &amp; Evaluation<br/>[train.py]"]
  node_artifacts["Model Artifacts<br/>[train.py]"]
end

node_visitor(("Account Analyst"))
node_data[("Account Dataset<br/>[dataset.csv]")]

node_visitor -->|"opens"| node_webui
node_webui -->|"loads UI"| node_browser
node_browser -->|"submits scan"| node_api
node_api -->|"parses features"| node_prep
node_prep -->|"builds model input"| node_inference
node_inference -->|"returns result"| node_browser
node_browser -->|"requests stats"| node_api
node_api -->|"serves stats"| node_dashboard
node_dashboard -->|"returns metrics"| node_browser
node_api -->|"reads dataset"| node_data
node_visitor -->|"explores models"| node_streamlit
node_streamlit -->|"reads dataset"| node_data
node_streamlit -->|"loads models"| node_artifacts
node_data -->|"loads samples"| node_training
node_training -->|"engineers features"| node_engineering
node_engineering -->|"trains and evaluates"| node_evaluation
node_evaluation -->|"saves models"| node_artifacts

click node_webui "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/templates/index.html"
click node_browser "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/static/js/main.js"
click node_api "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py"
click node_prep "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py"
click node_inference "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py"
click node_dashboard "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py"
click node_data "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/dataset.csv"
click node_streamlit "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/app.py"
click node_training "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py"
click node_engineering "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py"
click node_evaluation "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py"
click node_artifacts "https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.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_webui,node_browser,node_api,node_prep,node_inference,node_dashboard toneBlue
class node_streamlit,node_data toneAmber
class node_training,node_engineering,node_evaluation,node_artifacts toneMint
class node_visitor toneIndigo
```

## Components

### Web Scanner

- [FakeGuard UI](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/templates/index.html): `templates/index.html`
- [UI Interactions](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/static/js/main.js): `static/js/main.js`
- [FastAPI Server](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py): `server.py`
- [Feature Preparation](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py): `server.py`
- [Class Prediction](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py): `server.py`
- [Dataset Stats API](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/server.py): `server.py`

### Model Explorer

- [Streamlit Explorer](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/app.py): `app.py`

### Model Training

- [Training Data Prep](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py): `train.py`
- [Feature Engineering](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py): `train.py`
- [Model Training & Evaluation](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py): `train.py`
- [Model Artifacts](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/train.py): `train.py`

### Other components

- **Account Analyst**
- [Account Dataset](https://github.com/mukhilamsath/instagram-fake-account-detection---multi-class-classification/blob/main/dataset.csv): `dataset.csv`

## Connections

- Account Analyst → FakeGuard UI: opens (evidence: `README.md`)
- FakeGuard UI → UI Interactions: loads UI
- UI Interactions → FastAPI Server: submits scan (evidence: `static/js/main.js`)
- FastAPI Server → Feature Preparation: parses features (evidence: `server.py`)
- Feature Preparation → Class Prediction: builds model input (evidence: `server.py`)
- Class Prediction → UI Interactions: returns result (evidence: `static/js/main.js`)
- UI Interactions → FastAPI Server: requests stats (evidence: `static/js/main.js`)
- FastAPI Server → Dataset Stats API: serves stats (evidence: `server.py`)
- Dataset Stats API → UI Interactions: returns metrics (evidence: `static/js/main.js`)
- FastAPI Server → Account Dataset: reads dataset (evidence: `server.py`)
- Account Analyst → Streamlit Explorer: explores models (evidence: `README.md`)
- Streamlit Explorer → Account Dataset: reads dataset (evidence: `app.py`)
- Streamlit Explorer → Model Artifacts: loads models (evidence: `app.py`)
- Account Dataset → Training Data Prep: loads samples (evidence: `train.py`)
- Training Data Prep → Feature Engineering: engineers features (evidence: `train.py`)
- Feature Engineering → Model Training & Evaluation: trains and evaluates (evidence: `train.py`)
- Model Training & Evaluation → Model Artifacts: saves models (evidence: `train.py`)
