# jumpering/fanaticupsfront architecture

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

- Interactive diagram: https://gitdiagram.com/jumpering/fanaticupsfront
- Repository: https://github.com/jumpering/fanaticupsfront

## Overview

##### Main Components
- Backend – Spring Boot: Even though its source isn’t in this repo, the README indicates that this layer is responsible for handling business logic and API endpoints.
- Authentication & Storage: Google Firebase plays a dual role here by managing authentication (for both anonymous and registered users) and storage (possibly for media assets or user data).
- Database: MySQL is used to store the persistent data for the application.

##### Relationships and Data Flow
- That the Spring Boot backend communicates with the MySQL database for data persistence.
- A component for deployment that encapsulates how containerization (via Docker) and Google Cloud are used to host the entire application.

##### Architectural Patterns and Principles
- Modular Design: Emphasize that the Angular application is well-organized into modules (Auth, Cup, Category, etc.). This separation of concerns can be visually represented by grouping similar modules together.
- API Layer: Clearly indicate the separation between client (Angular) and server (Spring Boot).

##### Specific Elements
- Grouping related modules of the Angular application (Auth, Chat, Cup, Category) within a “Frontend Modules” boundary.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global entities
    User["User (Browser)"]:::frontend -->|"Uses"| Angular["Angular Frontend (SPA)"]:::frontend
    Angular -->|"Calls_API"| SpringBoot["Spring Boot API"]:::backend
    Angular -->|"Uses_Auth&Storage"| Firebase["Firebase Auth & Storage"]:::external
    SpringBoot -->|"Data_Persistence"| MySQL["MySQL Database"]:::database

    %% Angular Frontend Modules
    subgraph "Frontend Modules"
        direction TB
        AuthMod["Auth Module"]:::frontend
        CupMod["Cup Module"]:::frontend
        CatMod["Category Module"]:::frontend
        ChatMod["Chat Module"]:::frontend
        WebMod["Website Module"]:::frontend
        SharedMod["Shared Components"]:::frontend
    end

    %% Connect Angular Frontend to its Modules
    Angular --> AuthMod
    Angular --> CupMod
    Angular --> CatMod
    Angular --> ChatMod
    Angular --> WebMod
    Angular --> SharedMod

    %% Deployment & Containerization
    subgraph "Container & Deployment"
        direction TB
        Docker["Docker Container"]:::deployment
        Cloud["Google Cloud Deployment"]:::deployment
    end

    %% Link backend and frontend to containerization
    SpringBoot --> Docker
    Angular --> Docker
    Docker --> Cloud

    %% Click Events
    click Angular "https://github.com/jumpering/fanaticupsfront/tree/master/src/app"
    click AuthMod "https://github.com/jumpering/fanaticupsfront/tree/master/src/app/auth"
    click CupMod "https://github.com/jumpering/fanaticupsfront/tree/master/src/app/cup"
    click CatMod "https://github.com/jumpering/fanaticupsfront/tree/master/src/app/category"
    click ChatMod "https://github.com/jumpering/fanaticupsfront/tree/master/src/app/chat"
    click WebMod "https://github.com/jumpering/fanaticupsfront/tree/master/src/app/website"
    click SharedMod "https://github.com/jumpering/fanaticupsfront/tree/master/src/app/shared"
    click Docker "https://github.com/jumpering/fanaticupsfront/tree/master/Dockerfile"

    %% Styles
    classDef frontend fill:#AED6F1,stroke:#3498DB,stroke-width:2px;
    classDef backend fill:#A9DFBF,stroke:#27AE60,stroke-width:2px;
    classDef external fill:#F9E79F,stroke:#F1C40F,stroke-width:2px;
    classDef database fill:#FADBD8,stroke:#E74C3C,stroke-width:2px;
    classDef deployment fill:#F5CBA7,stroke:#E67E22,stroke-width:2px;
```
