# hkkiat/job-recommendation-system architecture

> Architecture diagram of the GitHub repository hkkiat/job-recommendation-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hkkiat/job-recommendation-system
- Repository: https://github.com/hkkiat/job-recommendation-system

## Overview

##### Main Components
- Data Sources: Represent the raw CSV survey data in the “Data” folder and their copies under “streamlit/Data.” These are the input feeds for both model training and on-the-fly data visualisations.
- Model Training & Storage: Include a component for the model training process from “Code for model generation.ipynb” (along with its associated checkpoints) that generates artifacts like “logreg_model.joblib” and “Oh_encoder.joblib.” This process encapsulates the preprocessing, feature selection, and model tuning for the recommendation engine.
- Helper/Library Module: Represent the “streamlit/helper” folder as a set of utility components that provide common functions (data processing, Google Colab integrations, etc.) supporting both the EDA and recommendation functionalities.
- EDA Frontend Pages: Illustrate the multipage structure under “streamlit/pages” (e.g., “Data Processing.py,” “Milestone 1 Statistic.py,” “Milestone 1 Trend Over Time.py”) that offer visualizations and dynamic analysis of trends over time and statistical insights.
- Recommendation Engine UI: Use the “Milestone 2 Job Recommendation.py” page as the user interface for receiving applicant profiles, passing them to the pre-trained model, and displaying the recommended job roles.
- Streamlit Application Container: Overall, frame the “streamlit” folder as your integrated web application that ties together the UI, helper utilities, and pre-trained model with the necessary configurations (as listed in “requirement.txt”).

##### Relationships & Interactions
- Connections between the Helper Modules and both the EDA pages and Recommendation UI to indicate shared utilities and preprocessing logic.
- Streamlit UI to the underlying components (EDA modules and recommendation functionality), showing the flow of user interactions into data processing and model inference.

##### Architectural Patterns & Technologies
- This design separates concerns between model training (offline, using Jupyter Notebooks) and model serving (online in the Streamlit app).
- The multipage design of Streamlit is a key design principle—each page handles a specific function, whether data visualization or recommendation processing.
- Use separate submodules to encapsulate data preprocessing (common_helper, data_helper, and data_google_colab) reflecting a modular design that is easy to extend.
- That you’re using pre-trained machine learning models built with scikit-learn (as indicated by “joblib” files) and the Streamlit Python framework for the frontend.

- That the saved models (joblib files) and helper modules are clearly shown as shared resources for the recommendation system.
- Finally, include configuration details if needed (reference to “requirement.txt” for package dependencies).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    subgraph "Data Sources"
        DS1("Data Source (CSV Files) - Data"):::data
        DS2("Data Source (CSV Files) - streamlit Data"):::data
    end

    %% Offline Processing (Model Training & Artifacts)
    subgraph "Offline Processing"
        MT("Model Training (Jupyter Notebook)"):::processing
        CP("Checkpoints (.ipynb_checkpoints)"):::processing
        M1("Pre-trained Model (logreg_model.joblib)"):::processing
        M2("Pre-trained Model (Oh_encoder.joblib)"):::processing
    end

    %% Helper Modules
    subgraph "Helper Modules"
        HM("Helper Modules"):::processing
        H1("common_helper.py"):::processing
        H2("data_google_colab.py"):::processing
        H3("data_helper.py"):::processing
    end

    %% EDA Frontend Pages
    subgraph "EDA Frontend Pages"
        E1("Data Processing.py"):::ui
        E2("Milestone 1 Statistic.py"):::ui
        E3("Milestone 1 Trend Over Time.py"):::ui
    end

    %% Recommendation Engine UI
    REC("Recommendation Engine UI (Milestone 2 Job Recommendation.py)"):::ui

    %% Streamlit Application Container
    UI("Streamlit Application Container"):::ui

    %% Connections from Data Sources
    DS1 --> MT
    DS2 --> MT
    DS1 --> E1
    DS2 --> E1

    %% Offline Processing Flow
    MT --> CP
    CP --> M1
    CP --> M2
    M1 --> REC
    M2 --> REC

    %% Helper Modules connectivity
    HM --> E1
    HM --> E2
    HM --> E3
    HM --> REC

    %% Integration into Streamlit App Container
    E1 --> UI
    E2 --> UI
    E3 --> UI
    REC --> UI

    %% Click Events
    click DS1 "https://github.com/hkkiat/job-recommendation-system/tree/main/Data/"
    click DS2 "https://github.com/hkkiat/job-recommendation-system/tree/main/streamlit/Data/"
    click MT "https://github.com/hkkiat/job-recommendation-system/blob/main/Code for model generation.ipynb"
    click CP "https://github.com/hkkiat/job-recommendation-system/tree/main/.ipynb_checkpoints/"
    click M1 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/logreg_model.joblib"
    click M2 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/Oh_encoder.joblib"
    click HM "https://github.com/hkkiat/job-recommendation-system/tree/main/streamlit/helper/"
    click H1 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/helper/common_helper.py"
    click H2 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/helper/data_google_colab.py"
    click H3 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/helper/data_helper.py"
    click E1 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/pages/Data Processing.py"
    click E2 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/pages/Milestone 1 Statistic.py"
    click E3 "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/pages/Milestone 1 Trend Over Time.py"
    click REC "https://github.com/hkkiat/job-recommendation-system/blob/main/streamlit/pages/Milestone 2 Job Recommendation.py"
    click UI "https://github.com/hkkiat/job-recommendation-system/tree/main/streamlit/"

    %% Styles
    classDef data fill:#ffcccc,stroke:#333,stroke-width:2px;
    classDef processing fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef ui fill:#cce5ff,stroke:#333,stroke-width:2px;
```
