# rayanrayanhussain9-coder/jobsheild architecture

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

- Interactive diagram: https://gitdiagram.com/rayanrayanhussain9-coder/jobsheild
- Repository: https://github.com/rayanrayanhussain9-coder/jobsheild

## Overview

JobShield is a local Streamlit application for screening job advertisements. A user submits an ad through the interface; the predictor gates inadequate text, combines deterministic warnings with a calibrated model result, and produces explanations and missing-information observations. The interface also supports comparison, performance views, and audit-report downloads. The repository includes a separate data-preparation and model-training workflow. Source excerpts establish key inference calls; some UI wiring and artifact relationships are supported only by README statements.

Main entry points: [`app.py`](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/app.py) (Streamlit application), [`src/predictor.py`](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/predictor.py) (Screening orchestrator), [`src/data_processor.py`](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/data_processor.py) (Dataset preparation), [`src/train.py`](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/train.py) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Screening interface"]
  node_app["Streamlit application<br/>[app.py]"]
  node_about["About experience<br/>[home.py]"]
  node_particle["Landing experience<br/>[particle_home.py]"]
end

subgraph group_inference["Inference and analysis"]
  node_predictor["Screening orchestrator<br/>[predictor.py]"]
  node_cleaner["Text adequacy<br/>[text_cleaner.py]"]
  node_rules["Rule screening<br/>[rules_engine.py]"]
  node_explainer["Feature attribution<br/>[explainer.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
end

subgraph group_model["Model lifecycle"]
  node_model_artifact["Trained pipeline<br/>[model.joblib]"]
  node_data_processor["Dataset preparation<br/>[data_processor.py]"]
  node_training["Model training<br/>[train.py]"]
  node_splits["Prepared partitions"]
end

subgraph group_reporting["Reporting and metrics"]
  node_report["Audit reports"]
  node_metrics["Evaluation artifacts"]
end

node_user(("Job seeker"))

node_user -->|"submits ad"| node_app
node_app -->|"screens ad"| node_predictor
node_app -->|"renders"| node_about
node_app -->|"renders"| node_particle
node_predictor -->|"checks adequacy"| node_cleaner
node_predictor -->|"screens text"| node_rules
node_predictor -->|"explains result"| node_explainer
node_predictor -->|"loads pipeline"| node_model_artifact
node_predictor -->|"uses thresholds"| node_config
node_data_processor -->|"normalizes text"| node_cleaner
node_data_processor -->|"uses paths"| node_config
node_data_processor -->|"writes partitions"| node_splits
node_training -->|"trains on"| node_splits
node_training -->|"exports model"| node_model_artifact
node_training -->|"exports evaluation"| node_metrics
node_app -->|"exports reports"| node_report
node_app -->|"shows metrics"| node_metrics

click node_app "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/app.py"
click node_about "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/home.py"
click node_particle "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/particle_home.py"
click node_predictor "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/predictor.py"
click node_cleaner "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/text_cleaner.py"
click node_rules "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/rules_engine.py"
click node_explainer "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/explainer.py"
click node_config "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/config.py"
click node_model_artifact "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/artifacts/model.joblib"
click node_data_processor "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/data_processor.py"
click node_training "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/train.py"
click node_splits "https://github.com/rayanrayanhussain9-coder/jobsheild/tree/main/data/processed"
click node_report "https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/report_generator.py"
click node_metrics "https://github.com/rayanrayanhussain9-coder/jobsheild/tree/main/artifacts"

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_about,node_particle toneBlue
class node_predictor,node_cleaner,node_rules,node_explainer,node_config toneAmber
class node_model_artifact,node_data_processor,node_training,node_splits toneMint
class node_report,node_metrics toneRose
class node_user toneIndigo
```

## Components

### Screening interface

- [Streamlit application](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/app.py): `app.py`
- [About experience](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/home.py): `src/home.py`
- [Landing experience](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/particle_home.py): `src/particle_home.py`

### Inference and analysis

- [Screening orchestrator](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/predictor.py): `src/predictor.py`
- [Text adequacy](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/text_cleaner.py): `src/text_cleaner.py`
- [Rule screening](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/rules_engine.py): `src/rules_engine.py`
- [Feature attribution](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/explainer.py): `src/explainer.py`
- [Runtime configuration](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/config.py): `src/config.py`

### Model lifecycle

- [Trained pipeline](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/artifacts/model.joblib): `artifacts/model.joblib`
- [Dataset preparation](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/data_processor.py): `src/data_processor.py`
- [Model training](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/train.py): `src/train.py`
- [Prepared partitions](https://github.com/rayanrayanhussain9-coder/jobsheild/tree/main/data/processed): `data/processed`

### Reporting and metrics

- [Audit reports](https://github.com/rayanrayanhussain9-coder/jobsheild/blob/main/src/report_generator.py): `src/report_generator.py`
- [Evaluation artifacts](https://github.com/rayanrayanhussain9-coder/jobsheild/tree/main/artifacts): `artifacts`

### Other components

- **Job seeker**

## Connections

- Job seeker → Streamlit application: submits ad (evidence: `README.md`)
- Streamlit application → Screening orchestrator: screens ad (evidence: `README.md`)
- Streamlit application → About experience: renders (evidence: `app.py`)
- Streamlit application → Landing experience: renders (evidence: `app.py`)
- Screening orchestrator → Text adequacy: checks adequacy (evidence: `src/predictor.py`)
- Screening orchestrator → Rule screening: screens text (evidence: `src/predictor.py`)
- Screening orchestrator → Feature attribution: explains result (evidence: `src/predictor.py`)
- Screening orchestrator → Trained pipeline: loads pipeline (evidence: `src/predictor.py`)
- Screening orchestrator → Runtime configuration: uses thresholds (evidence: `src/predictor.py`)
- Dataset preparation → Text adequacy: normalizes text (evidence: `src/data_processor.py`)
- Dataset preparation → Runtime configuration: uses paths (evidence: `src/data_processor.py`)
- Dataset preparation → Prepared partitions: writes partitions (evidence: `README.md`)
- Model training → Prepared partitions: trains on (evidence: `README.md`)
- Model training → Trained pipeline: exports model (evidence: `README.md`)
- Model training → Evaluation artifacts: exports evaluation (evidence: `README.md`)
- Streamlit application → Audit reports: exports reports (evidence: `README.md`)
- Streamlit application → Evaluation artifacts: shows metrics (evidence: `README.md`)
