# galletaoreo98/exo-machinepills architecture

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

- Interactive diagram: https://gitdiagram.com/galletaoreo98/exo-machinepills
- Repository: https://github.com/galletaoreo98/exo-machinepills

## Overview

##### Major Components
- Angular Core & Configuration: At the very center, include the Angular framework (Angular CLI, TypeScript, Angular modules). Also note configuration files such as angular.json, tsconfig files, and configuration files like app.config.ts.
- Root Application Layer: The app component (app.component.ts, .html, .css) serves as the central hub. This component loads the routing logic (app.routes.ts) and integrates the main UI regions.
- Feature/Pages Modules:
- Cyberia Module: Under src/app/cyberia, you have pages (e.g., “cyberia” page and “lain-test” page) complete with their specific components (e.g., minigame components, product components) and services.
- Home Module: The home page and its sub-components like the “my-info-card.”
- Error Page: A dedicated error-page component.
- Layers/Visual Modules: The layers directory hosts several specific thematic UI modules like aurora, connection, crypt, essence, ether, immersion, and wadom. Each layer comes with its dedicated components, templates, and sometimes even nested sub-components (e.g., “modal-basic” in aurora).
- Shared Resources:
- Layers Shared: Contains shared components (img-card, img-text-card, separator, etc.), data representations (layers-data files with specific JSON or TS definitions), and models.

##### Relationships and Data Flow
- The Angular Router (configured in the app.routes.ts files inside subdirectories) controls navigation between pages (Home, Cyberia pages, Error Page, Layers).
- The Root AppComponent orchestrates the data flow, passing configurations to sub-components.
- Each feature module (e.g., Cyberia, Layers, Home) encapsulates its own logic and UI, while shared components/services help maintain consistency (e.g., components in layers/shared).
- Assets act as supporting static resources that are loaded and used by various components.
- Interactions among components are handled via Angular’s dependency injection and event binding (e.g., tools like app.config.ts that may globally configure the app).

##### Architectural Patterns and Design Principles
- Component-Based Architecture: Each UI segment is a self-contained component with its own HTML, CSS, and TypeScript logic.
- Modular Design: The separation into feature “pages” (cyberia, home, error-page) and “layers” facilitates scalability and reuse.
- Routing & Lazy Loading (if implemented): The app’s navigation is driven by Angular’s Router, which may also use lazy loading to improve speed.
- Shared Modules: The layers/shared folder suggests a design that promotes reusability of common UI patterns across different pages.

##### Relevant Technologies and Frameworks
- Angular Framework (using Angular CLI v17.0.3)
- TypeScript as the main programming language.
- Angular Router for navigation.
- Asset management for static content (images, audio, etc.).
- Testing frameworks indicated by Karma for unit tests and e2e test setups.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Configuration & Build Tools
    subgraph "Configuration & Build Tools"
        Conf["Angular Core & Configuration"]:::config
    end

    %% Root Application Layer
    subgraph "Root Application Layer"
        App["Angular Core / AppComponent"]:::app
    end

    %% Feature Modules
    subgraph "Feature Modules"
        Cyberia["Cyberia Module"]:::feature
        Home["Home Module"]:::feature
        ErrorPage["Error Page"]:::feature
        Layers["Layers Module"]:::feature
    end

    %% Assets (Static Resources)
    Assets["Assets"]:::assets

    %% Cyberia Module Details
    subgraph "Cyberia Module Details"
        CyberiaPage["Cyberia Page"]:::feature
        LainTest["Lain-Test Page"]:::feature
    end

    %% Home Module Details
    subgraph "Home Module Details"
        MyInfoCard["My Info Card"]:::feature
    end

    %% Layers Module Details
    subgraph "Layers Details"
        Aurora["Aurora"]:::layers
        ModalBasic["Modal-Basic"]:::layers
        Connection["Connection"]:::layers
        Crypt["Crypt"]:::layers
        Essence["Essence"]:::layers
        Ether["Ether"]:::layers
        Immersion["Immersion"]:::layers
        Wadom["Wadom"]:::layers
        LayersShared["Layers Shared"]:::layers
    end

    %% Connections among major components
    Conf -->|"supports"| App
    App -->|"loads"| Cyberia
    App -->|"loads"| Home
    App -->|"loads"| ErrorPage
    App -->|"loads"| Layers

    Assets -->|"supports"| App
    Assets -->|"supports"| Cyberia
    Assets -->|"supports"| Home
    Assets -->|"supports"| ErrorPage
    Assets -->|"supports"| Layers

    %% Connections within Cyberia Module
    Cyberia -->|"navigates"| CyberiaPage
    Cyberia -->|"navigates"| LainTest

    %% Connections within Home Module
    Home -->|"includes"| MyInfoCard

    %% Connections within Layers Module
    Layers -->|"contains"| Aurora
    Aurora -->|"has"| ModalBasic
    Layers -->|"contains"| Connection
    Layers -->|"contains"| Crypt
    Layers -->|"contains"| Essence
    Layers -->|"contains"| Ether
    Layers -->|"contains"| Immersion
    Layers -->|"contains"| Wadom
    Layers -->|"shares"| LayersShared

    %% Click Events
    click Conf "https://github.com/galletaoreo98/exo-machinepills/blob/main/angular.json"
    click App "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/app.component.ts"
    click Cyberia "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/app/cyberia"
    click Home "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/app/home"
    click ErrorPage "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/error-page/error-page.component.ts"
    click Layers "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/app/layers"
    click Assets "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/assets"
    click CyberiaPage "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/cyberia/pages/cyberia/cyberia.component.ts"
    click LainTest "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/app/cyberia/pages/laintest"
    click MyInfoCard "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/home/my-info-card/my-info-card.component.ts"
    click Aurora "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/app/layers/aurora"
    click ModalBasic "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/aurora/modal-basic/modal-basic.component.ts"
    click Connection "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/connection/connection.component.ts"
    click Crypt "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/crypt/crypt.component.ts"
    click Essence "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/essence/essence.component.ts"
    click Ether "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/ether/ether.component.ts"
    click Immersion "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/immersion/immersion.component.ts"
    click Wadom "https://github.com/galletaoreo98/exo-machinepills/blob/main/src/app/layers/wadom/wadom.component.ts"
    click LayersShared "https://github.com/galletaoreo98/exo-machinepills/tree/main/src/app/layers/shared"

    %% Styles
    classDef config fill:#ffcccc,stroke:#cc0000,stroke-width:2px;
    classDef app fill:#ccffcc,stroke:#009900,stroke-width:2px;
    classDef feature fill:#cce6ff,stroke:#0073e6,stroke-width:2px;
    classDef layers fill:#ffe6cc,stroke:#ff9900,stroke-width:2px;
    classDef assets fill:#e6ccff,stroke:#800080,stroke-width:2px;
```
