# darshanchaudharii/xeepl_erp architecture

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

- Interactive diagram: https://gitdiagram.com/darshanchaudharii/xeepl_erp
- Repository: https://github.com/darshanchaudharii/xeepl_erp

## Overview

##### Project type and purpose
- XEEPL ERP is a full-stack, production-oriented ERP system with two main deliverables:
- A React/Vite-based single-page app (frontend)
- A Spring Boot REST API (backend) backed by JPA/MySQL and a file‐system upload directory for catalogs
- Its core use case is to manage users, sections, contents, items, raw materials, catalogs and quotations (with nested lines and PDF export).

##### File structure
Top‐level layout:
- “XEEPL ERP Backend” – Spring Boot project (Maven)
– src/main/java/com/xeepl/erp/controller → REST controllers
– src/main/java/com/xeepl/erp/service → business services
– src/main/java/com/xeepl/erp/repository → JPA repositories
– src/main/java/com/xeepl/erp/entity → domain entities
– src/main/java/com/xeepl/erp/dto → data-transfer objects
– config, filter, exception, util packages
– application.properties for DB and file-upload config
– uploads/… (catalog PDFs, images, profiles)
– tests under src/test
- “xeepl-erp-frontend” – Vite + React app
– src/components → UI components organized by feature (auth, catalogs, quotations, etc.)
– src/services → JS modules for HTTP calls to REST API
– src/utils, src/hooks → shared utilities
– public/index.html + vite.config.js + dev proxy to /api → localhost:8080
– Cypress E2E test suite
- package-lock.json, readme.md at root (workspace-level metadata)

##### README for additional insights
- Architecture section already summarizes:
Browser (React @5173) ← REST → Spring Boot API @8080 ← JDBC → MySQL
+ File system (uploads/) for catalogs
+ Client-side PDF renderer

##### Detail is key—capture all essential elements
- Do not omit the JWT authentication filter between incoming requests and controllers.
- Client-side PDF utility as part of the UI layer to reflect that PDF export matches web view.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Frontend Layer
    subgraph "Frontend (Browser · React App)" 
        direction TB
        Browser["React App"]:::frontend
        HTTPServices["API Client Services"]:::frontend
        PDFGenerator["PDF Generator Utility"]:::frontend
        ViteProxy["Vite Dev Server / Proxy (5173)"]:::frontend
    end

    %% Backend Layer
    subgraph "Spring Boot API" 
        direction TB
        JwtFilter["JwtAuthenticationFilter"]:::filter
        SecurityCfg["SecurityConfig"]:::backend
        WebCfg["WebConfig"]:::backend
        Controllers["REST Controllers"]:::backend
        Services["Business Services"]:::backend
        Repos["JPA Repositories"]:::backend
        Entities["Domain Entities"]:::backend
        DTOs["Data Transfer Objects"]:::backend
        Mappers["Mapper Classes"]:::backend
        FileUtil["FileUploadUtil"]:::backend
        AppMain["XeeplErpBackendApplication"]:::backend
        AppProps["application.properties"]:::config
    end

    %% Persistence
    MySQL["MySQL (xeepl_erp)"]:::db
    FileStore["Uploads Directory"]:::storage

    %% Connections
    Browser -->|click elements| HTTPServices
    Browser -->|renders PDF| PDFGenerator
    HTTPServices -->|HTTP →| ViteProxy
    ViteProxy -->|/api/* →| JwtFilter
    JwtFilter -->|Authenticated →| Controllers
    Controllers -->|calls| Services
    Services -->|CRUD via JPA| Repos
    Repos -->|JDBC →| MySQL
    Services -->|read/write| FileUtil
    FileUtil -->|stores files→| FileStore

    %% Config and Utils connections
    Controllers -->|uses| DTOs
    Controllers -->|maps| Mappers
    Services -->|uses| Entities
    JwtFilter ---|references| SecurityCfg
    JwtFilter ---|references| WebCfg
    AppMain -->|boots with| AppProps

    %% Port Annotations
    ViteProxy -.->|Proxy to 8080| Controllers
    MySQL -.->|Port 3306| Repos

    %% Click Events
    click Browser "https://github.com/darshanchaudharii/xeepl_erp/tree/main/xeepl-erp-frontend/src/components"
    click HTTPServices "https://github.com/darshanchaudharii/xeepl_erp/blob/main/xeepl-erp-frontend/src/services/api.js"
    click HTTPServices "https://github.com/darshanchaudharii/xeepl_erp/tree/main/xeepl-erp-frontend/src/services"
    click PDFGenerator "https://github.com/darshanchaudharii/xeepl_erp/blob/main/xeepl-erp-frontend/src/utils/pdfGenerator.jsx"
    click ViteProxy "https://github.com/darshanchaudharii/xeepl_erp/blob/main/xeepl-erp-frontend/vite.config.js"
    click JwtFilter "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/filter/JwtAuthenticationFilter.java"
    click Controllers "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/controller/*.java"
    click Services "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/service/*.java"
    click Repos "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/repository/*.java"
    click Entities "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/entity/*.java"
    click DTOs "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/dto/*.java"
    click Mappers "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/mapper/*.java"
    click SecurityCfg "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/config/SecurityConfig.java"
    click WebCfg "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/config/WebConfig.java"
    click FileUtil "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/util/FileUploadUtil.java"
    click AppMain "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/java/com/xeepl/erp/XeeplErpBackendApplication.java"
    click AppProps "https://github.com/darshanchaudharii/xeepl_erp/blob/main/XEEPL ERP Backend/src/main/resources/application.properties"
    click FileStore "https://github.com/darshanchaudharii/xeepl_erp/tree/main/XEEPL ERP Backend/uploads"

    %% Styles
    classDef frontend fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1
    classDef backend fill:#C8E6C9,stroke:#1B5E20,color:#1B5E20
    classDef filter fill:#FFECB3,stroke:#FF6F00,color:#BF360C
    classDef db fill:#FFE0B2,stroke:#E65100,color:#E65100
    classDef storage fill:#CFD8DC,stroke:#455A64,color:#455A64
    classDef config fill:#E1BEE7,stroke:#4A148C,color:#4A148C
```
