# sbsawane/resumeaipro architecture

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

- Interactive diagram: https://gitdiagram.com/sbsawane/resumeaipro
- Repository: https://github.com/sbsawane/resumeaipro

## Overview

##### Project Type and Purpose
- This is a single-page front-end application (SPA) built with React, TypeScript, Vite, and Tailwind CSS.
- From the component names and utils, it’s a resume-building and ATS (Applicant Tracking System) analysis tool (“ResumeAiPro”) that allows users to input job descriptions, upload or build resumes, run ATS keyword analysis, preview the formatted resume, and export it (e.g., as PDF).

##### Top-Level File–Structure Analysis
- Configuration & Build:
- package.json / package-lock.json – npm dependencies
- vite.config.ts – build/hot-reload setup
- tsconfig*.json, eslint.config.js, postcss.config.js, tailwind.config.js – TypeScript, linting, CSS toolchain
- Public Entry:
- index.html – SPA host page
- Source Code (src/):
- main.tsx & App.tsx – React entrypoint & root component
- components/ – UI panels (ATSAnalysisPanel, ExportPanel, JobDescriptionInput, ResumeForm, ResumePreview)
- utils/ – pure functions for ATS analysis (atsAnalyzer.ts) and export (exportUtils.ts)
- types/ – TypeScript definitions (resume.ts)

##### Key Roles & Interactions
- Browser (Client) loads the bundled SPA via index.html → main.tsx → App.tsx.
- App.tsx manages application state (job description text, resume data, analysis results).
- JobDescriptionInput component captures JD text → passes to atsAnalyzer util → produces keyword analysis.
- ResumeForm component captures resume fields or file upload → validated against types/resume.ts.
- ResumePreview renders a live view of the resume based on state.
- ATSAnalysisPanel displays keyword‐matching insights.
- ExportPanel invokes exportUtils to generate an export format (PDF/Download).

1. User → JobDescriptionInput / ResumeForm
2. Component state updates in App.tsx
3. State → atsAnalyzer (utils) → analysis results
4. State → ResumePreview for live rendering
5. State & types → exportUtils → download/ PDF
6. (Optional) atkAnalyzer ↔ External API

##### Architectural Patterns & Principles
- Component-based UI (React)
- Unidirectional data flow (lifting state to App.tsx)
- Separation of concerns: UI vs. pure logic (utils) vs. types
- Static site deployment (no backend in repo)

## Diagram (Mermaid)

```mermaid
graph TD
    Actor["User"]:::external

    subgraph "Browser / Client"
        SPA["React App (Vite bundle)"]:::entry
        click SPA "https://github.com/sbsawane/resumeaipro/blob/main/src/main.tsx"
        subgraph "React App"
            App["App.tsx"]:::entry
            click App "https://github.com/sbsawane/resumeaipro/blob/main/src/App.tsx"
            subgraph "UI Components"
                JD["JobDescriptionInput"]:::ui
                click JD "https://github.com/sbsawane/resumeaipro/blob/main/src/components/JobDescriptionInput.tsx"
                RF["ResumeForm"]:::ui
                click RF "https://github.com/sbsawane/resumeaipro/blob/main/src/components/ResumeForm.tsx"
                RP["ResumePreview"]:::ui
                click RP "https://github.com/sbsawane/resumeaipro/blob/main/src/components/ResumePreview.tsx"
                ATSP["ATSAnalysisPanel"]:::ui
                click ATSP "https://github.com/sbsawane/resumeaipro/blob/main/src/components/ATSAnalysisPanel.tsx"
                EP["ExportPanel"]:::ui
                click EP "https://github.com/sbsawane/resumeaipro/blob/main/src/components/ExportPanel.tsx"
            end
            subgraph "Utility Modules"
                Analyzer["atsAnalyzer"]:::utils
                click Analyzer "https://github.com/sbsawane/resumeaipro/blob/main/src/utils/atsAnalyzer.ts"
                ExportU["exportUtils"]:::utils
                click ExportU "https://github.com/sbsawane/resumeaipro/blob/main/src/utils/exportUtils.ts"
            end
            Types["resume.ts"]:::types
            click Types "https://github.com/sbsawane/resumeaipro/blob/main/src/types/resume.ts"
        end
    end

    subgraph "Build & Config"
        HTML["index.html"]:::config
        click HTML "https://github.com/sbsawane/resumeaipro/blob/main/index.html"
        VITE["vite.config.ts"]:::config
        click VITE "https://github.com/sbsawane/resumeaipro/blob/main/vite.config.ts"
        TAIL["tailwind.config.js"]:::config
        click TAIL "https://github.com/sbsawane/resumeaipro/blob/main/tailwind.config.js"
        POSTCSS["postcss.config.js"]:::config
        click POSTCSS "https://github.com/sbsawane/resumeaipro/blob/main/postcss.config.js"
        TS1["tsconfig.json"]:::config
        click TS1 "https://github.com/sbsawane/resumeaipro/blob/main/tsconfig.json"
        TS2["tsconfig.app.json"]:::config
        click TS2 "https://github.com/sbsawane/resumeaipro/blob/main/tsconfig.app.json"
        TS3["tsconfig.node.json"]:::config
        click TS3 "https://github.com/sbsawane/resumeaipro/blob/main/tsconfig.node.json"
        ESL["eslint.config.js"]:::config
        click ESL "https://github.com/sbsawane/resumeaipro/blob/main/eslint.config.js"
        PKG["package.json"]:::config
        click PKG "https://github.com/sbsawane/resumeaipro/blob/main/package.json"
        LOCK["package-lock.json"]:::config
        click LOCK "https://github.com/sbsawane/resumeaipro/blob/main/package-lock.json"
    end

    External["External ATS/AI Service"]:::external

    Actor -->|"1.enter JD / resume"| JD
    Actor -->|"1.enter JD / resume"| RF
    JD -->|"2.lift state"| App
    RF -->|"2.lift state"| App
    App -->|"3.runAnalysis()"| Analyzer
    Analyzer -->|"optional.callAPI()"| External
    External -->|"analysis.results"| Analyzer
    App -->|"4.state for preview"| RP
    App -->|"5.generatePDF()"| ExportU
    ExportU -->|"download PDF"| Actor

    classDef ui fill:#E0F7FA,stroke:#006064,stroke-width:1px
    classDef utils fill:#E8F5E9,stroke:#2E7D32,stroke-width:1px
    classDef config fill:#F5F5F5,stroke:#9E9E9E,stroke-width:1px
    classDef external fill:#FFF3E0,stroke:#FB8C00,stroke-width:1px
    classDef entry fill:#EDE7F6,stroke:#5E35B1,stroke-width:1px
    classDef types fill:#F3E5F5,stroke:#8E24AA,stroke-width:1px
```
