# hardikjp7/resumematcher-ats architecture

> Architecture diagram of the GitHub repository hardikjp7/resumematcher-ats, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hardikjp7/resumematcher-ats
- Repository: https://github.com/hardikjp7/resumematcher-ats

## Overview

##### Project type and purpose
- This is a single-page AI-powered web application built with Streamlit (“app.py”) that lets users paste a job description, upload a PDF resume, and receive structured AI feedback on how well the resume matches the JD.
- There is no database or microservices—just a simple monolithic Python app that interfaces with an external AI service (Google Generative AI).

##### File structure
- Top level:
- .env → stores environment variables (e.g., GOOGLE_API_KEY)
- app.py → the entire Streamlit UI and business logic
- requirements.txt → Python dependencies (Streamlit, PDF parser, HTTP client, etc.)
- README.md, LICENSE
- No subdirectories—structure implies a single deployable component.

##### Key insights from the README
- Core workflow:
1. User provides job description (text area)
2. User uploads PDF resume
3. App extracts text from PDF
4. App constructs a JSON prompt (JD + resume text)
5. App calls Google Generative AI REST API
6. App parses the JSON response and renders: “JD Match %,” “Missing Keywords,” “Profile Summary”
- Relies on a valid Google API key in .env.

##### Components
a. Main components
- User’s Web Browser
- Streamlit Server (app.py)
– UI Module (text input, file uploader, result display)
– PDF Parser Module (e.g., PyPDF2 or similar)
– Prompt Builder Module
– API Client Module (HTTP client to Google AI)
- External Service: Google Generative AI API
- Configuration Store (.env)
b. Relationships & data flows
1. Browser ←→ Streamlit Server over HTTP/WS (UI interactions)
2. File upload stream to PDF Parser → extracted plain text
3. Prompt Builder aggregates JD + resume text → JSON payload
4. API Client Module → HTTPS call to Google AI → JSON response
5. UI Module ← parsed response → rendered in browser
c. Architectural patterns/design principles
- Monolithic single-process application
- Clear separation of concerns in code: UI vs. parsing vs. API integration
- Externalize secrets/config in .env
d. Technologies & frameworks
- Streamlit (UI & server)
- Python libraries: PyPDF2 (or pdfplumber), requests (or google-cloud SDK)
- Google Generative AI REST endpoint
- dotenv or os.environ for config

##### Detail level
- Even though the app is small, break it into at least five components: UI, PDF parsing, prompt construction, API client, external AI.
- Flow of data (resume PDF → text → JSON prompt → AI → JSON response → rendered view).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Browser["User Web Browser"]:::external

    subgraph "Streamlit App"
        direction TB
        UI["UI Module"]:::internal
        PDF["PDF Parser Module"]:::internal
        Prompt["Prompt Builder Module"]:::internal
        APIClient["API Client Module"]:::internal

        UI --> PDF
        PDF --> Prompt
        Prompt --> APIClient
    end

    Browser -->|"UI Interaction"| UI

    APIClient -->|"HTTPS Request/Response"| GoogleAI

    subgraph "External Services"
        direction TB
        GoogleAI["Google Generative AI API"]:::externalService
    end

    Config[".env (Config Store)"]:::config
    Config -->|"Reads API Key"| APIClient

    subgraph "Project Resources"
        direction TB
        Entry["Application Entry Point (app.py)"]:::doc
        Deps["requirements.txt"]:::doc
        Docs["README.md"]:::doc
        Lic["LICENSE"]:::doc
    end

    classDef internal fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef external fill:#CCFFCC,stroke:#000,stroke-width:1px
    classDef externalService fill:#90EE90,stroke:#000,stroke-width:1px
    classDef config fill:#FFFF99,stroke:#000,stroke-width:1px
    classDef doc fill:#D3D3D3,stroke:#000,stroke-width:1px

    click UI "https://github.com/hardikjp7/resumematcher-ats/blob/main/app.py"
    click PDF "https://github.com/hardikjp7/resumematcher-ats/blob/main/app.py"
    click Prompt "https://github.com/hardikjp7/resumematcher-ats/blob/main/app.py"
    click APIClient "https://github.com/hardikjp7/resumematcher-ats/blob/main/app.py"
    click Config "https://github.com/hardikjp7/resumematcher-ats/blob/main/.env"
    click Entry "https://github.com/hardikjp7/resumematcher-ats/blob/main/app.py"
    click Deps "https://github.com/hardikjp7/resumematcher-ats/blob/main/requirements.txt"
    click Docs "https://github.com/hardikjp7/resumematcher-ats/blob/main/README.md"
    click Lic "https://github.com/hardikjp7/resumematcher-ats/tree/main/LICENSE"
```
