# yp9435/hiremeow-lt architecture

> Architecture diagram of the GitHub repository yp9435/hiremeow-lt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yp9435/hiremeow-lt
- Repository: https://github.com/yp9435/hiremeow-lt

## Overview

##### Project type and purpose
- From the README and file tree, Hiremeow is a small full-stack Python application with a Streamlit frontend and ML-driven backend.
- Purpose: upload a resume, categorize it, extract skills/education/experience, and match to job listings with a compatibility score.

##### File structure
- Top-level:
- app.py (Streamlit entry point / UI)
- job_utils.py (business logic for matching and scoring)
- nlp_utils.py (text-processing logic: NER, regex)
- models/ (pre-trained Random Forest model + TF-IDF vectorizer)
- jobs.json (static data store of job listings)
- notebooks (analysis / prototyping in .ipynb files)
- No separate “backend” folder—frontend and backend run in the same Python process under Streamlit.
- Dependencies on external ML libraries: spaCy, SentenceTransformer, scikit-learn.

##### Pull additional insights from the README
- Frontend is served by Streamlit (no separate web server).
- ML Models (RF classifier + TF-IDF) are serialized under models/.
- The matching algorithm reads jobs.json in real time.
- Extraction uses spaCy for NER, custom regex for details.

##### Main components
a. User Interface (Streamlit app)
b. Business Logic Layer
- Classification Module (loads vectorizer + RF)
- Extraction Module (spaCy NER + regex pipelines)
- Matching Module (job_utils.py reading jobs.json)
c. Data Stores
- Serialized ML Models (models/)
- Static Job Listings (jobs.json)
d. External Services/Libraries
- spaCy language models
- SentenceTransformer embeddings
- scikit-learn classifier
e. User (browser) acting as the source of resume file uploads

##### Relationships and data flow
- User → Streamlit UI (app.py) →
- calls Classification Module → loads vectorizer & RF model → returns category
- calls Extraction Module → spaCy + regex → returns parsed fields
- calls Matching Module → compares parsed skills vs. jobs.json → returns scores
- Streamlit UI composes results and displays recommendations back to User.
- All modules share the same Python runtime but logically form separate layers.

##### Architectural patterns and design principles
- Layered Architecture: UI layer (Streamlit) → Service layer (business logic) → Data layer (models + JSON).
- Separation of Concerns:
- classification logic kept in its own module
- parsing logic isolated in nlp_utils.py
- matching and scoring in job_utils.py
- Reusability/Extensibility: new models or data sources can be plugged into their respective modules.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User
    User["User (Browser)"]:::user
    click User "https://github.com/yp9435/hiremeow-lt/blob/main/app.py"

    %% Frontend Layer
    subgraph "Frontend Layer"
        UI["Streamlit UI<br/>app.py"]:::frontend
    end
    click UI "https://github.com/yp9435/hiremeow-lt/blob/main/app.py"

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        ClassMod["Classification Module<br/>models/tfidf_vectorizer_categorization.pkl<br/>models/rf_classifier_categorization.pkl"]:::logic
        ExtractMod["Extraction Module<br/>nlp_utils.py"]:::logic
        MatchMod["Matching Module<br/>job_utils.py"]:::logic
    end
    click ClassMod "https://github.com/yp9435/hiremeow-lt/blob/main/models/tfidf_vectorizer_categorization.pkl"
    click ClassMod "https://github.com/yp9435/hiremeow-lt/blob/main/models/rf_classifier_categorization.pkl"
    click ExtractMod "https://github.com/yp9435/hiremeow-lt/blob/main/nlp_utils.py"
    click MatchMod "https://github.com/yp9435/hiremeow-lt/blob/main/job_utils.py"

    %% Data Layer
    subgraph "Data Layer"
        Models["Serialized ML Models"]:::data
        JobStore["Static Job Listings<br/>jobs.json"]:::data
    end
    click JobStore "https://github.com/yp9435/hiremeow-lt/blob/main/jobs.json"

    %% External Libraries
    subgraph "External Libraries"
        spaCy["spaCy Language Models"]:::external
        SentenceTrans["SentenceTransformer Embeddings"]:::external
        Sklearn["scikit-learn Classifier"]:::external
    end

    %% Documentation
    subgraph "Documentation & Prototypes"
        Notebook1["Resume Cat Prediction.ipynb"]:::doc
        Notebook2["Text Extraction.ipynb"]:::doc
        README["README.md"]:::doc
    end
    click Notebook1 "https://github.com/yp9435/hiremeow-lt/blob/main/notebooks/Resume Cat Prediction.ipynb"
    click Notebook2 "https://github.com/yp9435/hiremeow-lt/blob/main/notebooks/Text Extraction.ipynb"
    click README "https://github.com/yp9435/hiremeow-lt/blob/main/README.md"

    %% Data Flows
    User -->|"Upload resume"| UI
    UI -->|"classify()"| ClassMod
    ClassMod -->|"load vectorizer & RF"| Models
    UI -->|"extract()"| ExtractMod
    ExtractMod -->|"use NER & regex"| spaCy
    ExtractMod -->|"use embeddings"| SentenceTrans
    UI -->|"match()"| MatchMod
    MatchMod -->|"read listings"| JobStore
    MatchMod -->|"score via scikit-learn"| Sklearn
    UI -->|"display results"| User

    %% Styles
    classDef user fill:#AEDFF7,stroke:#036C9A,color:#036C9A;
    classDef frontend fill:#D0E6A5,stroke:#6E9A00,color:#6E9A00;
    classDef logic fill:#A4DEF9,stroke:#1B75BB,color:#1B75BB;
    classDef data fill:#FFE66D,stroke:#FFB400,color:#A66400;
    classDef external fill:#E2E2E2,stroke:#A0A0A0,color:#505050;
    classDef doc fill:#F9C5D1,stroke:#E64560,color:#A6001D;
```
