# hoangluu18/pbl5 architecture

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

- Interactive diagram: https://gitdiagram.com/hoangluu18/pbl5
- Repository: https://github.com/hoangluu18/pbl5

## Overview

##### Project Type and Purpose
- This is a full‐stack application with both backend (Java, Maven based) and frontend (Typescript/Vite based) components.
- The backend appears to support e-commerce-like operations (with entities like Customer, Order, CartItems, Product, Review, etc.) and is segmented into a “Common” module plus two separate modules (BE_Admin and BE_Client) for administrative and client operations.
- The front end is similarly split into FE_Admin and FE_Client, likely corresponding to separate user interfaces for admins and regular users.
- Additionally, the “Api” directory contains API documentation (e.g., ShippingCostAPI.md, VietnamGeographicAPI.md) which suggests external or internal API integrations.

##### Analyzing the File Structure
- Top-level directories clearly separate concerns: BE for back end, FE for front end, and an “Api” folder for API documentation.
- Under BE, the “Common” project contains shared entities and configurations that are used across the BE modules. It includes key domain models (Address, Order, Product, etc.) and resources (such as application.properties).
- The BE/WebParent folder is organized into two main submodules: BE_Admin (for admin-specific controllers and endpoints) and BE_Client (for end-user/client-specific functionality). Each of these modules has its own pom.xml, source code, tests, and configuration.
- The FE directory mirrors the BE split by having two separate front-end projects for admin and client sides. Each uses a modern stack with TypeScript, Vite, and possibly ESLint configuration.
- Build, configuration, and dependency management files (like pom.xml, package.json, tsconfig files, etc.) are scattered in their respective modules, indicating modular design.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Frontend Layer"
        FE_Admin["FE_Admin: Admin UI"]:::frontend
        FE_Client["FE_Client: Client UI"]:::frontend
    end

    subgraph "Backend Layer"
        BE_Admin["BE_Admin: Admin Backend"]:::backend
        BE_Client["BE_Client: Client Backend"]:::backend
        BE_Common["BE_Common: Shared Domain & Config"]:::backend
    end

    subgraph "API Integration"
        API["API Docs: ShippingCost & VietnamGeographic"]:::api
    end

    FE_Admin -->|"REST_Call"| BE_Admin
    FE_Client -->|"REST_Call"| BE_Client
    BE_Admin -->|"uses_common"| BE_Common
    BE_Client -->|"uses_common"| BE_Common
    BE_Admin -->|"integrates"| API
    BE_Client -->|"integrates"| API

    click FE_Admin "https://github.com/hoangluu18/pbl5/tree/main/FE/FE_Admin"
    click FE_Client "https://github.com/hoangluu18/pbl5/tree/main/FE/FE_Client"
    click BE_Common "https://github.com/hoangluu18/pbl5/tree/main/BE/Common"
    click BE_Admin "https://github.com/hoangluu18/pbl5/tree/main/BE/WebParent/BE_Admin"
    click BE_Client "https://github.com/hoangluu18/pbl5/tree/main/BE/WebParent/BE_Client"
    click API "https://github.com/hoangluu18/pbl5/tree/main/Api"

    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px;
    classDef backend fill:#C1FFC1,stroke:#000,stroke-width:1px;
    classDef api fill:#FFFACD,stroke:#000,stroke-width:1px;
```
