# ramgopal-reddy/resume_compare architecture

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

- Interactive diagram: https://gitdiagram.com/ramgopal-reddy/resume_compare
- Repository: https://github.com/ramgopal-reddy/resume_compare

## Overview

##### Project type and purpose
- Resume Compare is a full-stack web application for side-by-side AI-powered comparison of two PDF resumes.
- Frontend: React + Vite + Tailwind CSS UI that runs in the browser
- Backend: FastAPI Python service that parses PDFs, invokes Google Gemini 2.0 Flash, and returns structured results

##### File structure
- Top level:
- index.html, package.json, vite.config.js, src/ → Client-side React app
- Backend/ (main.py, requirements.txt) → Server-side FastAPI app
- README.md, vercel.json → Project description & deployment
- src/Components/: Reusable UI components
- Backend/main.py: Defines HTTP endpoints, CORS, file upload handling, PDF parsing (PyPDF2), and AI call (google-generativeai SDK)

##### README for additional insights
- No persistent database—files are processed in memory and discarded
- Core intelligence via Google Gemini 2.0 Flash
- Responsive, dark-mode UI, fast, secure (no file storage)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Side
    subgraph "Client Side"
        classDef client fill:#ccffcc,stroke:#333,stroke-width:1px;
        Browser["User's Browser"]:::client

        subgraph "React Application"
            ReactApp["React + Vite + Tailwind UI"]:::client
            Index["index.html"]:::client
            Pkg["package.json"]:::client
            Vite["vite.config.js"]:::client
            SrcDir["src/"]:::client

            subgraph "UI Components"
                Comp1["Comparer.jsx"]:::client
                Comp2["HrLine.jsx"]:::client
                Comp3["SkeletonText.jsx"]:::client
                Comp4["TestCompo.jsx"]:::client
            end

            EntryMain["main.jsx"]:::client
            AppJS["App.jsx"]:::client
            AppCSS["App.css"]:::client
            IndexCSS["index.css"]:::client
        end
    end

    %% Server Side
    subgraph "Server Side"
        classDef server fill:#cce5ff,stroke:#333,stroke-width:1px;
        subgraph "FastAPI Service"
            Main["main.py"]:::server
            ReqTxt["requirements.txt"]:::server
            Parser["PDF Parser Module"]:::server
            AIInt["AI Integration Module"]:::server
        end
    end

    %% External Service
    External["Google Gemini 2.0 Flash API"]:::external
    classDef external fill:#ffe5b4,stroke:#333,stroke-width:1px;

    %% Deployment Configuration
    subgraph "Deployment Config"
        classDef infra fill:#f0f0f0,stroke:#333,stroke-width:1px;
        Readme["README.md"]:::infra
        Vercel["vercel.json"]:::infra
    end

    %% Connections
    Browser -->|"loads UI"| ReactApp
    ReactApp -->|"POST /compare (Axios over HTTPS)"| Main
    Main -->|"parse PDFs (PDF)"| Parser
    Main -->|"build prompt"| AIInt
    AIInt -->|"invoke API"| External
    External -->|"JSON response"| AIInt
    Main -->|"return JSON result"| ReactApp

    %% Click Events
    click Index "https://github.com/ramgopal-reddy/resume_compare/blob/main/index.html"
    click Pkg "https://github.com/ramgopal-reddy/resume_compare/blob/main/package.json"
    click Vite "https://github.com/ramgopal-reddy/resume_compare/blob/main/vite.config.js"
    click SrcDir "https://github.com/ramgopal-reddy/resume_compare/tree/main/src/"
    click Comp1 "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/Components/Comparer.jsx"
    click Comp2 "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/Components/HrLine.jsx"
    click Comp3 "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/Components/SkeletonText.jsx"
    click Comp4 "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/Components/TestCompo.jsx"
    click EntryMain "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/main.jsx"
    click AppJS "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/App.jsx"
    click AppCSS "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/App.css"
    click IndexCSS "https://github.com/ramgopal-reddy/resume_compare/blob/main/src/index.css"
    click Main "https://github.com/ramgopal-reddy/resume_compare/blob/main/Backend/main.py"
    click ReqTxt "https://github.com/ramgopal-reddy/resume_compare/blob/main/Backend/requirements.txt"
    click Readme "https://github.com/ramgopal-reddy/resume_compare/blob/main/README.md"
    click Vercel "https://github.com/ramgopal-reddy/resume_compare/blob/main/vercel.json"
```
