# comoser/clothes-store-micro-frontends architecture

> Architecture diagram of the GitHub repository comoser/clothes-store-micro-frontends, 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/comoser/clothes-store-micro-frontends
- Repository: https://github.com/comoser/clothes-store-micro-frontends

## Overview

##### Main Components

a. Micro-Frontend Applications (MFEs):
- App Shell (Host Application)
- Blog MFE
- Checkout MFE
- Items MFE
- Shared MFE (Common Components)

##### Detailed Component Breakdown

For each MFE, create a sub-section showing:

App Shell:
- Navbar component
- Global State management
- Notification system
- Async Loading capability

Blog MFE:
- Blog Post List
- Blog Post Details
- Routes

Checkout MFE:
- Checkout Cart
- Checkout Details
- Checkout Item
- Routes

Items MFE:
- Item List
- Item Details
- Item List Item
- Routes

Shared MFE:
- Common UI components (Button, Card Container, Header, Body, Wrapper)
- Utils
- Constants

##### Technical Details

Technical annotations showing:
- Webpack Module Federation configuration
- React as the primary framework
- Babel configuration presence
- Asset handling capabilities
- Routing system

##### Additional Elements

Include:
- Version/build information
- Development vs Production flow differences
- Load-time vs Runtime dependencies

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef host fill:#b3d1ff,stroke:#333
    classDef mfe fill:#90EE90,stroke:#333
    classDef shared fill:#FFE5B4,stroke:#333
    classDef component fill:#fff,stroke:#333
    classDef tech fill:#f0f0f0,stroke:#333

    %% App Shell
    AppShell["App Shell (Host)"]:::host
    click AppShell "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/app_shell"
    
    subgraph AppShellComponents["App Shell Components"]
        Navbar["Navbar"]:::component
        GlobalState["Global State"]:::component
        Notification["Notification System"]:::component
        AsyncLoader["Async Loading"]:::component
    end
    click Navbar "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/app_shell/src/components/navbar"
    click GlobalState "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/app_shell/src/components/global_state"
    click Notification "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/app_shell/src/components/notification"
    click AsyncLoader "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/app_shell/src/components/async_loader"

    %% MFEs
    Blog["Blog MFE"]:::mfe
    Checkout["Checkout MFE"]:::mfe
    Items["Items MFE"]:::mfe
    click Blog "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/blog"
    click Checkout "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/checkout"
    click Items "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/items"

    %% Blog Components
    subgraph BlogComponents["Blog Components"]
        BlogList["Blog Post List"]:::component
        BlogDetails["Blog Post Details"]:::component
        BlogListItem["Blog Post List Item"]:::component
        BlogRoutes["Routes"]:::component
    end
    click BlogList "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/blog/src/components/blog_post_list"
    click BlogDetails "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/blog/src/components/blog_post_details"
    click BlogListItem "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/blog/src/components/blog_post_list_item"
    click BlogRoutes "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/blog/src/components/routes"

    %% Checkout Components
    subgraph CheckoutComponents["Checkout Components"]
        CheckoutCart["Checkout Cart"]:::component
        CheckoutDetails["Checkout Details"]:::component
        CheckoutItem["Checkout Item"]:::component
        CheckoutRoutes["Routes"]:::component
    end
    click CheckoutCart "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/checkout/src/components/checkout_cart"
    click CheckoutDetails "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/checkout/src/components/checkout_details"
    click CheckoutItem "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/checkout/src/components/checkout_item"
    click CheckoutRoutes "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/checkout/src/components/routes"

    %% Items Components
    subgraph ItemsComponents["Items Components"]
        ItemList["Item List"]:::component
        ItemDetails["Item Details"]:::component
        ItemListItem["Item List Item"]:::component
        ItemRoutes["Routes"]:::component
    end
    click ItemList "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/items/src/components/item_list"
    click ItemDetails "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/items/src/components/item_details"
    click ItemListItem "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/items/src/components/item_list_item"
    click ItemRoutes "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/items/src/components/routes"

    %% Shared MFE
    Shared["Shared MFE"]:::shared
    click Shared "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared"

    subgraph SharedComponents["Shared Components"]
        Button["Button"]:::component
        CardContainer["Card Container"]:::component
        Header["Header"]:::component
        Body["Body"]:::component
        Wrapper["Wrapper"]:::component
        Utils["Utils"]:::component
        Constants["Constants"]:::component
    end
    click Button "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/components/button"
    click CardContainer "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/components/card_container"
    click Header "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/components/header"
    click Body "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/components/body"
    click Wrapper "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/components/wrapper"
    click Utils "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/utils"
    click Constants "https://github.com/comoser/clothes-store-micro-frontends/tree/master/products/shared/src/constants"

    %% Relationships
    AppShell --> Blog
    AppShell --> Checkout
    AppShell --> Items
    AppShell --> AppShellComponents
    Blog --> BlogComponents
    Checkout --> CheckoutComponents
    Items --> ItemsComponents
    Shared --> SharedComponents
    
    %% Shared Dependencies
    Shared -.-> Blog
    Shared -.-> Checkout
    Shared -.-> Items
    Shared -.-> AppShell

    %% Legend
    subgraph Legend
        HostLegend["Host Application"]:::host
        MFELegend["Micro Frontend"]:::mfe
        SharedLegend["Shared Components"]:::shared
        CompLegend["Component"]:::component
    end
```
