# vineoy/resumebuilderapp architecture

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

- Interactive diagram: https://gitdiagram.com/vineoy/resumebuilderapp
- Repository: https://github.com/vineoy/resumebuilderapp

## Overview

##### Main Components
- Frontend:
- Built in React.js with clear separation into pages (e.g., Home, About, Contact, GenerateResume, Resume, LandingPage, etc.) and reusable components (e.g., Navbar).
- Utilizes Tailwind CSS and DaisyUI for styling.
- Uses React Router for client-side navigation.
- Communicates with the backend using Axios.
- Manages assets like CSS (App.css, index.css) and static files (index.html).
- Backend:
- Implemented in Spring Boot (as a separate repo, per the README).
- Contains REST API endpoints (e.g., GET /api/resumes, POST /api/resumes/generate, etc.).
- Integrates with the Ollama local AI model for generating resumes.
- Uses JSON file storage for data persistence.
- Handles PDF generation utilizing PDF.js, which is called from the frontend.
- External Services and Libraries:
- Ollama local AI model for resume generation.
- PDF.js for converting resume templates to downloadable PDFs.
- Axios for API communications.
- Other build/configuration tools (Vite, ESLint, PostCSS, Tailwind, and DaisyUI).

##### Relationships and Interactions
- The frontend (React.js) and backend (Spring Boot) interact through well-defined REST endpoints.
- User interactions on the frontend trigger API calls (using Axios) to the backend.
- The backend processes resume requests by invoking the Ollama local AI model, stores results in JSON files, and provides data back to the frontend.
- The frontend then displays the resume and offers options for editing and downloading (using PDF.js).

##### Architectural Patterns and Design Principles
- Separation of Concerns: Clean division between the frontend and backend components.
- RESTful API Design: The backend communicates using REST, with endpoints dedicated to resume creation, retrieval, and deletion.
- Client-Side Routing: Managed using React Router to navigate between different pages without a full page reload.
- Modular Design: Both the frontend (with its pages and components structure) and backend are organized for maintainability and scalability.

##### Technologies and Frameworks
- Frontend: React.js, Tailwind CSS, DaisyUI, React Router, Axios, Vite.
- Backend: Spring Boot, Spring Web.
- Additional: Ollama local AI model, JSON file based storage, and PDF.js.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        F1["React.js Frontend"]:::frontend
        subgraph "Pages"
            F2["Home Page"]:::frontend
            F3["About Page"]:::frontend
            F4["Contact Page"]:::frontend
            F5["Generate Resume Page"]:::frontend
            F6["Resume Display Page"]:::frontend
            F7["Landing Page"]:::frontend
            F8["Root Page"]:::frontend
            F9["Services Page"]:::frontend
        end
        subgraph "Reusable Components"
            F10["Navigation Bar"]:::frontend
            F11["Resume Component"]:::frontend
        end
        F12["API Layer (Axios)"]:::frontend
        subgraph "Styling & Assets"
            F13["App.css"]:::frontend
            F14["index.css"]:::frontend
            F15["tailwind.config.js"]:::frontend
            F16["postcss.config.js"]:::frontend
        end
        F17["PDF.js for PDF Generation"]:::external
    end

    %% Backend Layer
    subgraph "Backend Layer"
        B1["Spring Boot Backend"]:::backend
        B2["Resume API (REST)"]:::backend
        B3["Ollama AI Model"]:::external
        B4["JSON File Storage"]:::backend
    end

    %% Interactions
    F1 -->|"contains"| F2
    F1 -->|"contains"| F3
    F1 -->|"contains"| F4
    F1 -->|"contains"| F5
    F1 -->|"contains"| F6
    F1 -->|"contains"| F7
    F1 -->|"contains"| F8
    F1 -->|"contains"| F9
    F1 -->|"integrates"| F10
    F1 -->|"integrates"| F11
    F1 -->|"calls_API_via"| F12
    F12 -->|"API_Call"| B2
    F2 ---|"triggers_request"| F12
    F5 ---|"Submit_Resume_Request"| F12
    F6 ---|"Get_Resume_Data"| F12
    B2 -->|"Generate_Resume"| B3
    B2 -->|"Store_and_Retrieve"| B4
    F11 -->|"Download_PDF"| F17
    F1 -->|"renders_with"| F13
    F1 -->|"renders_with"| F14
    F1 -->|"configured_by"| F15
    F1 -->|"configured_by"| F16

    %% Click Events for Frontend
    click F1 "https://github.com/vineoy/resumebuilderapp/blob/master/src/main.jsx"
    click F2 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/Home.jsx"
    click F3 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/About.jsx"
    click F4 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/Contact.jsx"
    click F5 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/GenerateResume.jsx"
    click F6 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/Resume.jsx"
    click F7 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/LandingPage.jsx"
    click F8 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/Root.jsx"
    click F9 "https://github.com/vineoy/resumebuilderapp/blob/master/src/pages/Services.jsx"
    click F10 "https://github.com/vineoy/resumebuilderapp/blob/master/src/components/Navbar.jsx"
    click F11 "https://github.com/vineoy/resumebuilderapp/blob/master/src/components/Resume.jsx"
    click F12 "https://github.com/vineoy/resumebuilderapp/blob/master/src/api/ResumeService.js"
    click F13 "https://github.com/vineoy/resumebuilderapp/blob/master/src/App.css"
    click F14 "https://github.com/vineoy/resumebuilderapp/blob/master/src/index.css"
    click F15 "https://github.com/vineoy/resumebuilderapp/blob/master/tailwind.config.js"
    click F16 "https://github.com/vineoy/resumebuilderapp/blob/master/postcss.config.js"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef backend fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef external fill:#fff3cd,stroke:#856404,stroke-width:2px;
```
