# ashthecoder918/job-fraud architecture

> Architecture diagram of the GitHub repository ashthecoder918/job-fraud, 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/ashthecoder918/job-fraud
- Repository: https://github.com/ashthecoder918/job-fraud

## Overview

JobFraud is a web-based job-posting fraud classifier. The principal runtime path is a user entering 12 structured features in the HTML frontend, which sends a prediction request to FastAPI; the backend validates and scales the inputs, runs the saved neural network, and returns a fraud/legitimate class and score for display. The repository also documents data analysis, feature selection, model comparison, training, evaluation, and deployment, but the tree contains no implementation source for those workflows. The graph focuses on evidenced runtime links and preserves the documented model-development capability without implying unseen code relationships.

Main entry points: [`Backend/main.py`](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/main.py) (FastAPI service), [`Frontend/index.html`](https://github.com/ashthecoder918/job-fraud/blob/main/Frontend/index.html) (Job form), [`Backend/trained_model/scaler.pkl`](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/trained_model/scaler.pkl) (Saved scaler), [`Backend/trained_model/fraud_detection_model.pt`](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/trained_model/fraud_detection_model.pt) (Saved classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user_ui["User interface"]
  node_frontend["Job form<br/>[index.html]"]
end

subgraph group_api["Prediction API"]
  node_backend["FastAPI service<br/>[main.py]"]
  node_result["Prediction result<br/>[main.py]"]
end

subgraph group_inference["Inference"]
  node_validation["Input validation<br/>[provider.py]"]
  node_scaler["Saved scaler<br/>[scaler.pkl]"]
  node_model["Saved classifier"]
  node_classifier["Neural network<br/>[provider.py]"]
end

node_user(("Job seeker"))
node_model_workflow["Model development<br/>[README.md]"]

node_user -->|"enters features"| node_frontend
node_frontend -->|"posts features"| node_backend
node_backend -->|"validates with"| node_validation
node_backend -->|"loads at startup"| node_scaler
node_backend -->|"loads weights"| node_model
node_backend -->|"instantiates and runs"| node_classifier
node_backend -->|"transforms input"| node_scaler
node_backend -->|"returns class and score"| node_result
node_result -->|"displays result"| node_frontend
node_model_workflow -->|"produces artifacts"| node_model

click node_frontend "https://github.com/ashthecoder918/job-fraud/blob/main/Frontend/index.html"
click node_backend "https://github.com/ashthecoder918/job-fraud/blob/main/Backend/main.py"
click node_validation "https://github.com/ashthecoder918/job-fraud/blob/main/Backend/structure_validation/provider.py"
click node_scaler "https://github.com/ashthecoder918/job-fraud/blob/main/Backend/trained_model/scaler.pkl"
click node_model "https://github.com/ashthecoder918/job-fraud/blob/main/Backend/trained_model/fraud_detection_model.pt"
click node_classifier "https://github.com/ashthecoder918/job-fraud/blob/main/Backend/structure_validation/provider.py"
click node_result "https://github.com/ashthecoder918/job-fraud/blob/main/Backend/main.py"
click node_model_workflow "https://github.com/ashthecoder918/job-fraud/blob/main/README.md"

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_frontend toneBlue
class node_backend,node_result toneAmber
class node_validation,node_scaler,node_model,node_classifier toneMint
class node_user,node_model_workflow toneIndigo
```

## Components

### User interface

- [Job form](https://github.com/ashthecoder918/job-fraud/blob/main/Frontend/index.html): `Frontend/index.html`

### Prediction API

- [FastAPI service](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/main.py): `Backend/main.py`
- [Prediction result](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/main.py): `Backend/main.py`

### Inference

- [Input validation](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/structure_validation/provider.py): `Backend/structure_validation/provider.py`
- [Saved scaler](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/trained_model/scaler.pkl): `Backend/trained_model/scaler.pkl`
- [Saved classifier](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/trained_model/fraud_detection_model.pt): `Backend/trained_model/fraud_detection_model.pt`
- [Neural network](https://github.com/ashthecoder918/job-fraud/blob/main/Backend/structure_validation/provider.py): `Backend/structure_validation/provider.py`

### Other components

- **Job seeker**
- [Model development](https://github.com/ashthecoder918/job-fraud/blob/main/README.md): `README.md`

## Connections

- Job seeker → Job form: enters features (evidence: `README.md`)
- Job form → FastAPI service: posts features (evidence: `README.md`)
- FastAPI service → Input validation: validates with (evidence: `Backend/main.py`)
- FastAPI service → Saved scaler: loads at startup (evidence: `Backend/main.py`)
- FastAPI service → Saved classifier: loads weights (evidence: `Backend/main.py`)
- FastAPI service → Neural network: instantiates and runs (evidence: `Backend/main.py`)
- FastAPI service → Saved scaler: transforms input (evidence: `Backend/main.py`)
- FastAPI service → Prediction result: returns class and score (evidence: `Backend/main.py`)
- Prediction result → Job form: displays result (evidence: `README.md`)
- Model development → Saved classifier: produces artifacts (evidence: `README.md`)
