# danminn10/mont7 architecture

> Architecture diagram of the GitHub repository danminn10/mont7, 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/danminn10/mont7
- Repository: https://github.com/danminn10/mont7

## Overview

##### Project Type and Purpose
- This project is a multi-module full-stack Java application that appears to be built on Spring Boot, managed via Maven.
- It is divided into at least two main services: an “admin-service” and a “home-service.”
- The admin-service module provides administrative functionality (including user, booking, product, and customer management) along with security features (Spring Security configuration, custom user details, etc.), while the home-service module handles the front-end user interactions like browsing products, bookings, and general site content.

##### Analyzing the File Structure
- Two top-level modules (“admin-service” and “home-service”) each contain their own pom.xml and Maven wrapper files, suggesting they can be built and deployed as separate services.
- Within each module, the typical Spring Boot directory structure is visible: a “src/main/java” portion, with controllers, entities, services (and for the admin-service, DAO and security packages) and a “src/main/resources” section for configuration, static assets (CSS, JS, images), and templates (Thymeleaf HTML templates).
- The admin-service further breaks down its features: controllers for various domains (booking, product, customer, etc.), a DAO layer to handle persistence, and a dedicated security package that implies robust authorization and authentication mechanisms.
- The home-service focuses on user-facing endpoints with controllers for bookings and homepage interactions, along with front-end static content and HTML templates for design.

##### Emphasize
- Being very detailed will help in capturing all critical architectural elements.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Clients
    subgraph "External Clients"
        Browser("Web Browser"):::external
    end

    %% Admin Service Module
    subgraph "Admin Service"
        direction TB
        A_Mod("Admin Service"):::admin
        A_App("Admin Application Entry Point"):::admin
        A_Controller("Admin Controllers"):::admin
        A_Service("Admin Service Layer"):::admin
        A_DAO("Admin DAO Layer"):::admin
        A_Entity("Admin Entities"):::admin
        A_Security("Admin Security Module"):::admin
        A_FrontStatic("Admin Frontend: Static Assets"):::admin
        A_FrontTemplates("Admin Frontend: Templates"):::admin
    end

    %% Home Service Module
    subgraph "Home Service"
        direction TB
        H_Mod("Home Service"):::home
        H_App("Home Application Entry Point"):::home
        H_Controller("Home Controllers"):::home
        H_Service("Home Business Logic"):::home
        H_Entity("Home Entities"):::home
        H_FrontStatic("Home Frontend: Static Assets"):::home
        H_FrontTemplates("Home Frontend: Templates"):::home
    end

    %% Shared Database
    Database(("Database")):::db

    %% Connections from External Clients to Services
    Browser -->|"HTTP_Request"| A_Controller
    Browser -->|"HTTP_Request"| H_Controller

    %% Admin Service Internal Flow
    A_Mod --> A_App
    A_App --> A_Controller
    A_Controller -->|"process_request"| A_Service
    A_Service -->|"data_access"| A_DAO
    A_DAO -->|"persist_data"| A_Entity
    A_Entity -->|"database_interaction"| Database
    A_Controller -->|"secured_by"| A_Security
    A_Controller -->|"renders_view"| A_FrontTemplates
    A_FrontStatic -->|"serves_assets"| A_Controller

    %% Home Service Internal Flow
    H_Mod --> H_App
    H_App --> H_Controller
    H_Controller -->|"process_request"| H_Service
    H_Service -->|"domain_logic"| H_Entity
    H_Entity -->|"database_interaction"| Database
    H_Controller -->|"renders_view"| H_FrontTemplates
    H_FrontStatic -->|"serves_assets"| H_Controller

    %% Click Events for Admin Service Components
    click A_Mod "https://github.com/danminn10/mont7/tree/main/admin-service/"
    click A_App "https://github.com/danminn10/mont7/blob/main/admin-service/src/main/java/com/example/admin_service/AdminServiceApplication.java"
    click A_Controller "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/java/com/example/admin_service/controller/"
    click A_Service "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/java/com/example/admin_service/service/"
    click A_DAO "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/java/com/example/admin_service/dao/"
    click A_Entity "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/java/com/example/admin_service/entity/"
    click A_Security "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/java/com/example/admin_service/security/"
    click A_FrontStatic "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/resources/static/"
    click A_FrontTemplates "https://github.com/danminn10/mont7/tree/main/admin-service/src/main/resources/templates/"

    %% Click Events for Home Service Components
    click H_Mod "https://github.com/danminn10/mont7/tree/main/home-service/"
    click H_App "https://github.com/danminn10/mont7/blob/main/home-service/src/main/java/com/example/home_service/HomeServiceApplication.java"
    click H_Controller "https://github.com/danminn10/mont7/tree/main/home-service/src/main/java/com/example/home_service/controller/"
    click H_Service "https://github.com/danminn10/mont7/tree/main/home-service/src/main/java/com/example/home_service/service/"
    click H_Entity "https://github.com/danminn10/mont7/tree/main/home-service/src/main/java/com/example/home_service/entity/"
    click H_FrontStatic "https://github.com/danminn10/mont7/tree/main/home-service/src/main/resources/static/"
    click H_FrontTemplates "https://github.com/danminn10/mont7/tree/main/home-service/src/main/resources/templates/"

    %% Styles
    classDef admin fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef home fill:#AED6F1,stroke:#2874A6,stroke-width:2px;
    classDef db fill:#D5F5E3,stroke:#28B463,stroke-width:2px, shape: cylinder;
    classDef external fill:#F9E79F,stroke:#F4D03F,stroke-width:2px;
```
