# manageiq/manageiq-ui-service architecture

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

- Interactive diagram: https://gitdiagram.com/manageiq/manageiq-ui-service
- Repository: https://github.com/manageiq/manageiq-ui-service

## Overview

##### Main Components

a. Frontend Architecture (Primary Focus)
- Core Module
- Authentication/Authorization
- Session Management
- API Communication
- Event Notifications
- Navigation
- RBAC Service
- Shopping Cart
- Language Service

b. Feature Modules
- Services Module
- Orders Module
- Catalogs Module
- States (Routing) Module
- Shared Components Module

c. External Integrations
- ManageIQ Backend API
- Authentication Services
- Language/Localization Services

**┌─────────────────────────────────────────────────────────────┐**
- Browser/Client                          │
- ┘
- ↓
**┌─────────────────────────────────────────────────────────────┐**
- Angular Application                       │
- ┬─────────────┬────────────────┬───────────────┤
- Core       │  Feature    │    Shared      │    States     │
- Module     │  Modules    │  Components    │    Router     │
- ┴─────────────┴────────────────┴───────────────┘
- ↓
**┌─────────────────────────────────────────────────────────────┐**
- API Services Layer                       │
- ┘
- ↓
**┌─────────────────────────────────────────────────────────────┐**
- ManageIQ Backend                         │
- ┘

##### Key Relationships to Highlight

- Core module's relationship with API services
- Feature modules' dependencies on core services
- Shared components usage across feature modules
- State management and routing relationships
- Authentication flow
- Internationalization system

##### Important Details

a. Core Services:
- Collections API Factory
- Authentication API
- Event Notifications
- RBAC Service
- Shopping Cart
- Language Service

b. Feature Modules:
- Services (service-explorer, service-details)
- Orders (order-explorer, process-order)
- Catalogs (catalog-explorer)

c. Shared Components:
- Custom Dropdowns
- Pagination
- Tagging
- Timeline
- Action Buttons

##### Implementation Notes

- Maintain consistent spacing and alignment
- Related components together
- Use clear, readable fonts
- Version information
- Brief descriptions for major components

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser/Client"]
    end

    subgraph Angular
        Core["Core Module"]:::core
        Features["Feature Modules"]:::feature
        Shared["Shared Components"]:::shared
        States["States Router"]:::core
    end

    subgraph CoreServices
        Auth["Authentication/Authorization"]:::core
        Session["Session Management"]:::core
        API["API Communication"]:::core
        Events["Event Notifications"]:::core
        Nav["Navigation"]:::core
        RBAC["RBAC Service"]:::core
        Cart["Shopping Cart"]:::core
        Lang["Language Service"]:::core
    end

    subgraph FeatureModules
        Services["Services Module"]:::feature
        Orders["Orders Module"]:::feature
        Catalogs["Catalogs Module"]:::feature
    end

    subgraph SharedComponents
        Dropdowns["Custom Dropdowns"]:::shared
        Pagination["Pagination"]:::shared
        Tagging["Tagging"]:::shared
        Timeline["Timeline"]:::shared
        ActionBtns["Action Buttons"]:::shared
    end

    subgraph External
        Backend["ManageIQ Backend"]:::external
        AuthService["Authentication Services"]:::external
        I18n["Language/Localization Services"]:::external
    end

    %% Relationships
    Browser --> Core
    Core --> CoreServices
    Core --> API
    Features --> CoreServices
    Features --> Shared
    States --> Features

    CoreServices --> Backend
    Auth --> AuthService
    Lang --> I18n

    %% Click events
    click Auth "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/authentication-api.factory.js"
    click Session "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/session.service.js"
    click API "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/collections-api.factory.js"
    click Events "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/event-notifications.service.js"
    click Nav "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/navigation.service.js"
    click RBAC "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/rbac.service.js"
    click Cart "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/shopping-cart/shopping-cart.component.js"
    click Lang "https://github.com/ManageIQ/manageiq-ui-service/blob/master/client/app/core/language.service.js"
    click Services "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/services/"
    click Orders "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/orders/"
    click Catalogs "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/catalogs/"
    click States "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/states/"
    click Shared "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/shared/"
    click Pagination "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/shared/pagination/"
    click Tagging "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/shared/tagging/"
    click Timeline "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/shared/timeline/"
    click ActionBtns "https://github.com/ManageIQ/manageiq-ui-service/tree/master/client/app/shared/action-button-group/"

    %% Styles
    classDef core fill:#2196F3,color:white
    classDef feature fill:#4CAF50,color:white
    classDef shared fill:#FF9800,color:white
    classDef external fill:#9C27B0,color:white

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Feature Modules"]:::feature
        L3["Shared Components"]:::shared
        L4["External Services"]:::external
    end
```
