# sajixinc/intellimatch-ai-ats architecture

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

- Interactive diagram: https://gitdiagram.com/sajixinc/intellimatch-ai-ats
- Repository: https://github.com/sajixinc/intellimatch-ai-ats

## Overview

##### Project Type and Purpose
- IntelliMatch-AI-ATS is a full-stack, AI-driven, Streamlit web application (“front-end” + light “back-end” logic in Python) whose primary goal is to help job applicants optimize their resumes by matching them to job descriptions via Google Gemini Pro LLM and to manage email/OTP subscriptions for personalized notifications.

##### File Structure
- Top-Level Files:
- app.py      → main Streamlit entrypoint for resume-matching and all UI flows
- main.py     → Streamlit entrypoint for email/OTP subscription features
- final_app.py, email_login.py, email_subscription.py, otp_subscription.py → logical modules encapsulating specific functionality
- assets/     → images used by the UI
- styles/     → CSS overrides (main.css)
- requirements.txt, Procfile, .env (user-created) → environment and deployment config
- No in-project database code; relies on external OTP microservice via HTTP.

##### README for Insights
- Confirms two big feature groups:
A) Resume-to-Job-Description Matching (PDF processing, LLM calls)
B) Email Subscription & OTP Verification (calls out to external endpoints)
- Lists key libraries: streamlit, PyPDF2, Pillow, python-dotenv, requests.

##### Main Components
a. User Interface (Streamlit Layer)
– Sub-areas: Resume Upload & Job Description Input; Email/OTP Forms
b. Business Logic Layer (Python Modules)
– Resume Parsing & Matching Service (PyPDF2 + Google Gemini Pro API)
– Keyword Extraction & Suggestions Engine
– Email Subscription Module (email_subscription.py)
– OTP Handling Module (otp_subscription.py)
c. External Services
– Google Gemini Pro API (Generative AI LLM)
– OTP Microservice
- Endpoint1: Otpgenerate (/SubscribeAndFeedback/Otpgenerate/)
- Endpoint2: OtpVerification (/SubscribeAndFeedback/OtpVerfication/)
– Email Delivery Service (inside OTP Microservice)
d. Static Assets
– assets/ (images), styles/main.css

##### Relationships and Data Flows
- User → Streamlit UI →
- For Resume Matching: calls Resume Parsing → calls Google Gemini Pro → returns analysis → UI displays “Match %,” “Missing Keywords,” “Interview Q&A.”
- For Subscription: posts email to Email Subscription Module → HTTP POST to external Otpgenerate → OTP → user inputs OTP → OTP Handling Module → HTTP POST to OtpVerification → success/failure → UI updates.
[User Browser] → [Streamlit UI] → [Resume Service] → [Google Gemini API]
↘
→ [Email Subscription Module] → [OTP Microservice]

##### Architectural Patterns
- Layered architecture: UI layer, domain Logic layer, integration layer
- Separation of concerns: each Python module has single responsibility
- External microservice integration rather than in-app database for OTP

##### Technologies & Frameworks
- Python 3.7+, Streamlit
- PyPDF2 (PDF parsing), Pillow (image handling)
- python-dotenv (.env config), pybase64 (image encoding)
- requests (REST calls to external services)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Streamlit UI Layer
    subgraph "Streamlit UI Layer"
        direction TB
        ResumeUI["Resume Upload & Job Description UI"]:::ui
        EmailUI["Email/OTP Subscription UI"]:::ui
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        direction TB
        ResumeService["Resume Parsing & Matching Service"]:::logic
        KeywordEngine["Keyword Extraction & Suggestions Engine"]:::logic
        EmailSub["Email Subscription Module"]:::logic
        OTPModule["OTP Handling Module"]:::logic
        EmailLogin["Email Login UI Helper"]:::logic
    end

    %% Assets & Styles
    subgraph "Static Assets & Styles"
        direction TB
        Assets["Images (assets/)"]:::assets
        Styles["CSS Overrides (styles/main.css)"]:::assets
    end

    %% External Services
    subgraph "External Services"
        direction TB
        GeminiAPI["Google Gemini Pro API"]:::external
        OTPService["OTP Microservice"]:::external
        EmailService["Email Delivery Service"]:::external
    end

    %% Deployment & Config
    Deploy["Procfile & requirements.txt"]:::assets

    %% Data Flows
    ResumeUI -->|"upload PDF & job desc"| ResumeService
    ResumeService -->|"call Google Gemini Pro API"| GeminiAPI
    GeminiAPI -->|"analysis response"| ResumeService
    ResumeService -->|"matches & suggestions"| KeywordEngine
    KeywordEngine -->|"results"| ResumeUI

    EmailUI -->|"enter email"| EmailSub
    EmailSub -->|"POST /SubscribeAndFeedback/Otpgenerate/ "| OTPService
    OTPService -->|"send OTP"| EmailService
    EmailLogin -->|"prompt OTP input"| EmailUI
    EmailUI -->|"submit OTP"| OTPModule
    OTPModule -->|"POST /SubscribeAndFeedback/OtpVerfication/ "| OTPService
    OTPService -->|"verification response"| OTPModule
    OTPModule -->|"status"| EmailUI

    %% Layer Connections
    ResumeUI --> EmailLogin
    EmailLogin --> EmailSub

    %% Click Events
    click ResumeUI "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/app.py"
    click EmailUI "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/main.py"
    click ResumeService "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/final_app.py"
    click KeywordEngine "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/final_app.py"
    click EmailSub "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/email_subscription.py"
    click OTPModule "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/otp_subscription.py"
    click EmailLogin "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/email_login.py"
    click Assets "https://github.com/sajixinc/intellimatch-ai-ats/tree/main/assets/"
    click Styles "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/styles/main.css"
    click Deploy "https://github.com/sajixinc/intellimatch-ai-ats/tree/main/Procfile"
    click Deploy "https://github.com/sajixinc/intellimatch-ai-ats/blob/main/requirements.txt"

    %% Styles
    classDef ui fill:#D6EAF8,stroke:#1B4F72,color:#1B2631
    classDef logic fill:#D5F5E3,stroke:#196F3D,color:#1B2631
    classDef external fill:#FAD7A0,stroke:#B9770E,color:#1B2631
    classDef assets fill:#E5E7E9,stroke:#566573,color:#1B2631
```
