# ri-100/resumexpert architecture

> Architecture diagram of the GitHub repository ri-100/resumexpert, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ri-100/resumexpert
- Repository: https://github.com/ri-100/resumexpert

## Overview

##### Main Components

a) User Interface Layer:
- Streamlit Web Application (represented by app/main.py)
- Input Components: Job Description Upload
- Output Components: Resume Match Results, ATS Score, Cold Email

b) Application Layer:
- Core Application Logic (app/app.py)
- Portfolio Management (app/portfolio.py)
- LangChain Integration (app/chains.py)
- Utility Functions (app/utils.py)

c) Data Storage Layer:
- ChromaDB Vector Store (vectorstore directory)
- Resume Portfolio Storage (app/resource/my_portfolio.csv)

d) External Services:
- LangChain Services
- Language Models (likely OpenAI, based on the tech stack)

##### Application Logic → Cold Email Generation → User Interface

**[User] → [Streamlit Interface]**
- ↓
**[Application Core]**
- ↙     ↓     ↘
**[Portfolio] [Chains] [Utils]**
- ↓         ↓
**[ChromaDB] [Language Model]**

##### Key Architectural Patterns to Highlight

- Vector-based Document Matching Architecture
- Service-Oriented Integration with LangChain
- MVC-like pattern with Streamlit as View, app.py as Controller, and portfolio.py as Model

##### Technical Details

- ChromaDB vector store configuration
- LangChain integration points
- Resume processing pipeline
- ATS scoring mechanism
- Email generation workflow

##### Implementation Notes

- The separation between the web interface and core logic
- The vector store's role in resume matching
- The integration with LangChain for NLP tasks
- The data flow for ATS score calculation
- The cold email generation pipeline

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef storage fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#9b59b6,stroke:#8e44ad,color:white
    
    %% User Interface Layer
    subgraph UI
        User(("👤 User"))
        WebUI["Streamlit Interface"]:::ui
        InputComp["Job Description Upload"]:::ui
        OutputComp["Results Display"]:::ui
    end

    %% Application Layer
    subgraph AppLayer
        AppCore["Application Core"]:::core
        Portfolio["Portfolio Manager"]:::core
        Chains["LangChain Integration"]:::core
        Utils["Utility Functions"]:::core
    end

    %% Storage Layer
    subgraph Storage
        ChromaDB[(ChromaDB Vector Store)]:::storage
        ResumeCSV[(Resume Portfolio CSV)]:::storage
    end

    %% External Services
    subgraph External
        LangChain["LangChain Services"]:::external
        LLM["Language Models"]:::external
    end

    %% Relationships
    User --> WebUI
    WebUI --> InputComp
    WebUI --> OutputComp
    InputComp --> AppCore
    AppCore --> Portfolio
    AppCore --> Chains
    AppCore --> Utils
    Portfolio --> ChromaDB
    Portfolio --> ResumeCSV
    Chains --> LangChain
    LangChain --> LLM
    AppCore --> OutputComp

    %% Click events
    click WebUI "https://github.com/Ri-100/ResumeXpert/blob/main/app/main.py"
    click AppCore "https://github.com/Ri-100/ResumeXpert/blob/main/app/app.py"
    click Portfolio "https://github.com/Ri-100/ResumeXpert/blob/main/app/portfolio.py"
    click Chains "https://github.com/Ri-100/ResumeXpert/blob/main/app/chains.py"
    click Utils "https://github.com/Ri-100/ResumeXpert/blob/main/app/utils.py"
    click ChromaDB "https://github.com/Ri-100/ResumeXpert/blob/main/vectorstore/chroma.sqlite3"
    click ResumeCSV "https://github.com/Ri-100/ResumeXpert/blob/main/app/resource/my_portfolio.csv"

    %% Legend
    subgraph Legend
        L1["UI Components"]:::ui
        L2["Core Components"]:::core
        L3["Storage Components"]:::storage
        L4["External Services"]:::external
    end
```
