# aishwaryaprabhu24/online-recruitment-fraud-detection architecture

> Architecture diagram of the GitHub repository aishwaryaprabhu24/online-recruitment-fraud-detection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aishwaryaprabhu24/online-recruitment-fraud-detection
- Repository: https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection

## Overview

FraudShield is a job-posting fraud detection application backed by an XGBoost prediction API. A user enters job details or pastes an advertisement, the frontend submits it to Flask, and the results page presents the prediction and risk indicators. The repository also contains an offline machine-learning workflow for preparing features, training and evaluating models, and analyzing feature importance. The interactive request path is shown from excerpts; offline workflow links are limited where source was not sampled.

Main entry points: [`dataset/processed`](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/tree/main/dataset/processed) (Feature and model files), [`app/frontend/src/pages/AnalyzeJob.jsx`](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/AnalyzeJob.jsx) (Job submission), [`app/frontend/src/pages/Results.jsx`](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx) (Results view), [`app/frontend/src/App.jsx`](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/App.jsx) (Page router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_app["Page router<br/>[App.jsx]"]
  node_home["Home page<br/>[Home.jsx]"]
  node_analyze["Job submission<br/>[AnalyzeJob.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_results["Results view<br/>[Results.jsx]"]
  node_chart["Probability chart<br/>[Results.jsx]"]
  node_risk["Risk indicators<br/>[Results.jsx]"]
end

subgraph group_inference["Prediction service"]
  node_backend["Flask API<br/>[app.py]"]
  node_predictor["Prediction pipeline<br/>[predictor.py]"]
end

subgraph group_ml["Model development"]
  node_cleaning["Data preparation<br/>[preprocessing.py]"]
  node_engineering["Feature engineering"]
  node_training["Model training<br/>[smote_training.py]"]
  node_selection["Model selection"]
  node_evaluation["Model evaluation"]
  node_explainability["SHAP analysis<br/>[shap_analysis.py]"]
end

subgraph group_artifacts["Model artifacts"]
  node_artifacts[("Feature and model files")]
end

node_user(("Job seeker"))
node_api_service["Prediction API"]

node_user -->|"opens"| node_home
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_analyze
node_app -->|"routes to"| node_results
node_home -->|"navigates to"| node_analyze
node_user -->|"enters job"| node_analyze
node_analyze -->|"submits"| node_api
node_api -->|"POSTs prediction"| node_api_service
node_api_service -->|"routes to"| node_backend
node_backend -->|"calls prediction"| node_predictor
node_predictor -.->|"loads artifacts"| node_artifacts
node_analyze -.->|"stores result"| node_results
node_results -->|"renders"| node_chart
node_results -->|"renders"| node_risk
node_cleaning -.->|"prepares data"| node_engineering
node_engineering -->|"saves features"| node_artifacts
node_training -.->|"saves models"| node_artifacts
node_selection -.->|"selects model"| node_artifacts
node_evaluation -.->|"writes metrics"| node_artifacts
node_explainability -->|"writes explanations"| node_artifacts

click node_app "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/App.jsx"
click node_home "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Home.jsx"
click node_analyze "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/AnalyzeJob.jsx"
click node_api "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/services/api.js"
click node_results "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx"
click node_backend "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/backend/app.py"
click node_predictor "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/backend/predictor.py"
click node_chart "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx"
click node_risk "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx"
click node_cleaning "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/preprocessing.py"
click node_engineering "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/feature_engineering.py"
click node_training "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/smote_training.py"
click node_selection "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/select_final_model.py"
click node_evaluation "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/final_evaluation.py"
click node_explainability "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/shap_analysis.py"
click node_artifacts "https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/tree/main/dataset/processed"

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_home,node_analyze,node_api,node_results,node_chart,node_risk toneBlue
class node_backend,node_predictor toneAmber
class node_cleaning,node_engineering,node_training,node_selection,node_evaluation,node_explainability,node_api_service toneMint
class node_artifacts toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [Page router](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/App.jsx): `app/frontend/src/App.jsx`
- [Home page](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Home.jsx): `app/frontend/src/pages/Home.jsx`
- [Job submission](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/AnalyzeJob.jsx): `app/frontend/src/pages/AnalyzeJob.jsx`
- [API client](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/services/api.js): `app/frontend/src/services/api.js`
- [Results view](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx): `app/frontend/src/pages/Results.jsx`
- [Probability chart](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx): `app/frontend/src/pages/Results.jsx`
- [Risk indicators](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/frontend/src/pages/Results.jsx): `app/frontend/src/pages/Results.jsx`

### Prediction service

- [Flask API](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/backend/app.py): `app/backend/app.py`
- [Prediction pipeline](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/app/backend/predictor.py): `app/backend/predictor.py`

### Model development

- [Data preparation](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/preprocessing.py): `preprocessing.py`
- [Feature engineering](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/feature_engineering.py): `feature_engineering.py`
- [Model training](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/smote_training.py): `smote_training.py`
- [Model selection](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/select_final_model.py): `select_final_model.py`
- [Model evaluation](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/final_evaluation.py): `final_evaluation.py`
- [SHAP analysis](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/blob/main/shap_analysis.py): `shap_analysis.py`

### Model artifacts

- [Feature and model files](https://github.com/aishwaryaprabhu24/online-recruitment-fraud-detection/tree/main/dataset/processed): `dataset/processed`

### Other components

- **Job seeker**
- **Prediction API**

## Connections

- Job seeker → Home page: opens (evidence: `app/frontend/src/pages/Home.jsx`)
- Page router → Home page: routes to (evidence: `app/frontend/src/App.jsx`)
- Page router → Job submission: routes to (evidence: `app/frontend/src/App.jsx`)
- Page router → Results view: routes to (evidence: `app/frontend/src/App.jsx`)
- Home page → Job submission: navigates to (evidence: `app/frontend/src/pages/Home.jsx`)
- Job seeker → Job submission: enters job (evidence: `app/frontend/src/pages/AnalyzeJob.jsx`)
- Job submission → API client: submits (evidence: `app/frontend/src/pages/AnalyzeJob.jsx`)
- API client → Prediction API: POSTs prediction (evidence: `app/frontend/src/services/api.js`)
- Prediction API → Flask API: routes to (evidence: `app/backend/app.py`)
- Flask API → Prediction pipeline: calls prediction (evidence: `app/backend/app.py`)
- Prediction pipeline → Feature and model files: loads artifacts
- Job submission → Results view: stores result
- Results view → Probability chart: renders (evidence: `app/frontend/src/pages/Results.jsx`)
- Results view → Risk indicators: renders (evidence: `app/frontend/src/pages/Results.jsx`)
- Data preparation → Feature engineering: prepares data
- Feature engineering → Feature and model files: saves features (evidence: `feature_engineering.py`)
- Model training → Feature and model files: saves models
- Model selection → Feature and model files: selects model
- Model evaluation → Feature and model files: writes metrics
- SHAP analysis → Feature and model files: writes explanations (evidence: `shap_analysis.py`)
