# aish-am22/ai-resume-analyzer architecture

> Architecture diagram of the GitHub repository aish-am22/ai-resume-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aish-am22/ai-resume-analyzer
- Repository: https://github.com/aish-am22/ai-resume-analyzer

## Overview

##### Project type and purpose
- This is a full-stack React application using React Router for routing and server-side rendering (SSR).
- Purpose: users upload resumes (PDFs), the server converts them to images (via `app/lib/pdf2img.ts`), processes/scoring them (`app/lib/puter.ts`), and returns results back to the client.

##### File structure
- Top-level files: Dockerfile, tsconfig.json, package.json, Vite config, and editor configs.
- `app/` folder: contains both client and server code.
- `app/root.tsx` – root React component and SSR entry.
- `app/routes/*.tsx` – route modules implementing page loaders, actions, and React components for each path (`home`, `upload`, `resume`, `auth`, `wipe`).
- `app/components/` – reusable UI components (Navbar, FileUploader, ResumeCard, ScoreBadge, etc.).
- `app/lib/` – server-side utilities (PDF→image conversion, scoring engine).
- `constants/` and `types/` – shared TypeScript types and constants.

##### README for additional insights
- Confirms SSR, HMR, bundling via Vite, Tailwind CSS, TypeScript, Docker support, and deployment instructions.
- No external database; state is handled in memory or ephemeral file storage.

##### Elements
- Clear labels for each component/layer
- HTTP requests (browser → server)
- Data flow (upload → processing → response)
- Asset requests (browser → static assets)
- Client (e.g., blue)
- Server/API (e.g., green)
- Processing modules (e.g., orange)
- Static assets (e.g., gray)
- Deployment/infra (e.g., purple)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        direction TB
        Browser["Browser (React Client)"]:::client
        ClientApp["Root Component"]:::client
        subgraph "Route Modules (app/routes)"
            direction TB
            Home["Home"]:::client
            UploadRoute["Upload"]:::client
            ResumeRoute["Resume"]:::client
            AuthRoute["Auth"]:::client
            WipeRoute["Wipe"]:::client
        end
        subgraph "UI Components (app/components)"
            direction TB
            Navbar["Navbar"]:::client
            FileUploader["FileUploader"]:::client
            ResumeCard["ResumeCard"]:::client
            ScoreBadge["ScoreBadge"]:::client
            ScoreCircle["ScoreCircle"]:::client
            ScoreGuage["ScoreGuage"]:::client
            Accordion["Accordion"]:::client
            Details["Details"]:::client
            Summary["Summary"]:::client
            ATSPreview["ATS Preview"]:::client
        end
    end

    %% Server Layer
    subgraph "Server Layer"
        direction TB
        SSR["SSR Server<br/>(Node.js + Vite)"]:::server
        RoutesConfig["Routing Config"]:::server
    end

    %% Processing Layer
    subgraph "Processing Layer"
        direction TB
        PDF2Img["PDF→Image Converter"]:::processing
        Puter["Scoring Engine"]:::processing
    end

    %% Static Asset Layer
    subgraph "Static Assets"
        direction TB
        Icons["Icons"]:::static
        Images["Images"]:::static
    end

    %% Shared Types & Constants
    subgraph "Shared Types & Constants"
        direction TB
        ConstantsNode["Constants"]:::infra
        TypesIndex["Type Definitions"]:::infra
        PuterTypes["Puter Types"]:::infra
    end

    %% Build & Deployment
    subgraph "Build & Deployment"
        direction TB
        ViteConfig["Vite Config"]:::infra
        RouterConfig["React Router Config"]:::infra
        DockerfileNode["Dockerfile"]:::infra
    end

    %% Connections
    Browser -->ClientApp
    ClientApp -->Home
    ClientApp -->UploadRoute
    ClientApp -->ResumeRoute
    ClientApp -->AuthRoute
    ClientApp -->WipeRoute
    ClientApp -->Navbar
    ClientApp -->FileUploader
    ClientApp -->ResumeCard
    ClientApp -->ScoreBadge
    ClientApp -->ScoreCircle
    ClientApp -->ScoreGuage
    ClientApp -->Accordion
    ClientApp -->Details
    ClientApp -->Summary
    ClientApp -->ATSPreview

    Browser -->SSR
    SSR -->|renders HTML| Browser
    Browser -->Icons
    Browser -->Images

    SSR -->RoutesConfig
    SSR -->PDF2Img
    SSR -->Puter
    PDF2Img -->Puter
    Puter -->SSR

    ViteConfig -->SSR
    RouterConfig -->SSR
    DockerfileNode -->ViteConfig
    DockerfileNode -->SSR

    ConstantsNode -->SSR
    TypesIndex -->SSR
    PuterTypes -->SSR

    %% Click Events
    click ClientApp "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/root.tsx"
    click Home "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/routes/home.tsx"
    click UploadRoute "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/routes/upload.tsx"
    click ResumeRoute "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/routes/resume.tsx"
    click AuthRoute "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/routes/auth.tsx"
    click WipeRoute "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/routes/wipe.tsx"
    click Navbar "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/Navbar.tsx"
    click FileUploader "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/FileUploader.tsx"
    click ResumeCard "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/ResumeCard.tsx"
    click ScoreBadge "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/ScoreBadge.tsx"
    click ScoreCircle "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/ScoreCircle.tsx"
    click ScoreGuage "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/ScoreGuage.tsx"
    click Accordion "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/Accordion.tsx"
    click Details "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/Details.tsx"
    click Summary "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/Summary.tsx"
    click ATSPreview "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/components/ATS.tsx"
    click RoutesConfig "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/routes.ts"
    click PDF2Img "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/lib/pdf2img.ts"
    click Puter "https://github.com/aish-am22/ai-resume-analyzer/blob/master/app/lib/puter.ts"
    click Icons "https://github.com/aish-am22/ai-resume-analyzer/tree/master/public/icons/"
    click Images "https://github.com/aish-am22/ai-resume-analyzer/tree/master/public/images/"
    click ConstantsNode "https://github.com/aish-am22/ai-resume-analyzer/blob/master/constants/index.ts"
    click TypesIndex "https://github.com/aish-am22/ai-resume-analyzer/blob/master/types/index.d.ts"
    click PuterTypes "https://github.com/aish-am22/ai-resume-analyzer/blob/master/types/puter.d.ts"
    click ViteConfig "https://github.com/aish-am22/ai-resume-analyzer/blob/master/vite.config.ts"
    click RouterConfig "https://github.com/aish-am22/ai-resume-analyzer/blob/master/react-router.config.ts"
    click DockerfileNode "https://github.com/aish-am22/ai-resume-analyzer/tree/master/Dockerfile"

    %% Styles
    classDef client fill:#D0E8FF,stroke:#0366d6,color:#0366d6;
    classDef server fill:#D0FFD8,stroke:#028A0F,color:#028A0F;
    classDef processing fill:#FFE5B4,stroke:#E08D00,color:#E08D00;
    classDef static fill:#F0F0F0,stroke:#888888,color:#555555;
    classDef infra fill:#EAD4FF,stroke:#7D3F98,color:#7D3F98;
```
