# manfredsteyer/multi-framework-micro-frontend architecture

> Architecture diagram of the GitHub repository manfredsteyer/multi-framework-micro-frontend, 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/manfredsteyer/multi-framework-micro-frontend
- Repository: https://github.com/manfredsteyer/multi-framework-micro-frontend

## Overview

##### Main Components

a. Shell Application (Host)
- As the central component
- Routing configuration
- Module Federation configuration

b. Micro Frontends
- 5 MFEs (mfe1, mfe2, mfe3, mfe4-react, shell)
- Their key components (A and B components for Angular MFEs)

##### Architectural Layers

a. Client Browser Layer
- How the shell application is loaded first
- Dynamic loading of MFEs

b. Module Federation Layer
- Webpack configuration connections
- Remote/host relationship
- Shared dependencies

c. Component Layer
- Web Components wrapper
- Routing relationships

##### Key Elements to Highlight

a. Runtime Integration
- Dynamic module loading paths
- Lazy loading boundaries
- Shared module boundaries

b. Communication Patterns
- Inter-MFE communication
- Event broadcasting channels
- Shared state management if any

**[Browser]**

- ▼
**[Shell Application (Host)] ←→ [Module Federation Plugin]**

- ┬─────────┼─────────┬──────────┐
- ▼               ▼          ▼         ▼          ▼
**[MFE1 Angular] [MFE2 Angular] [MFE3 Angular] [MFE4 React] [Other MFEs]**

- ▼               ▼          ▼         ▼
**[Components]    [Components] [Components] [Components]**

##### Additional Details

- Webpack configuration relationships
- Shared library space
- Routing configuration
- Component registry
- Development ports (4200 for shell, etc.)
- Build/deployment pipeline

##### Technical Specifications to Note

- Angular versions and configurations
- React integration points
- Web Components boundary
- Module Federation plugin configuration
- Shared dependencies management

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef browser fill:#f9f9f9,stroke:#333
    classDef shell fill:#2b5797,stroke:#fff,color:#fff
    classDef angular fill:#dd1b16,stroke:#fff,color:#fff
    classDef react fill:#61dafb,stroke:#333
    classDef config fill:#ffd700,stroke:#333
    classDef component fill:#98fb98,stroke:#333
    classDef registry fill:#dda0dd,stroke:#333
    classDef wrapper fill:#87ceeb,stroke:#333

    %% Browser Layer
    Browser["Client Browser"]:::browser

    %% Shell Application Layer
    ShellApp["Shell Application (Host)"]:::shell
    ModFedConfig["Module Federation Plugin"]:::config
    CompRegistry["Component Registry"]:::registry
    Wrapper["Web Components Wrapper"]:::wrapper
    Router["Router Configuration"]:::config

    %% MFE Layer
    MFE1["MFE1 (Angular)"]:::angular
    MFE2["MFE2 (Angular)"]:::angular
    MFE3["MFE3 (Angular)"]:::angular
    MFE4["MFE4 (React)"]:::react

    %% Component Layer
    MFE1CompA["MFE1 Component A"]:::component
    MFE1CompB["MFE1 Component B"]:::component
    MFE2CompA["MFE2 Component A"]:::component
    MFE2CompB["MFE2 Component B"]:::component
    MFE3CompA["MFE3 Component A"]:::component
    MFE3CompB["MFE3 Component B"]:::component
    MFE4Comp["React Components"]:::component

    %% Relationships
    Browser --> ShellApp
    ShellApp --- ModFedConfig
    ShellApp --- CompRegistry
    ShellApp --- Wrapper
    ShellApp --- Router

    ModFedConfig -.-> MFE1
    ModFedConfig -.-> MFE2
    ModFedConfig -.-> MFE3
    ModFedConfig -.-> MFE4

    MFE1 --> MFE1CompA & MFE1CompB
    MFE2 --> MFE2CompA & MFE2CompB
    MFE3 --> MFE3CompA & MFE3CompB
    MFE4 --> MFE4Comp

    %% Click Events
    click ShellApp "https://github.com/manfredsteyer/multi-framework-micro-frontend/tree/main/shell/src/app"
    click ModFedConfig "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/shell/webpack.config.js"
    click Wrapper "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/shell/src/app/wrapper/wrapper.component.ts"
    click Router "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/shell/src/app/router.utils.ts"
    click CompRegistry "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/shell/src/app/registry.ts"
    click MFE1 "https://github.com/manfredsteyer/multi-framework-micro-frontend/tree/main/mfe1/src/app"
    click MFE2 "https://github.com/manfredsteyer/multi-framework-micro-frontend/tree/main/mfe2/src/app"
    click MFE3 "https://github.com/manfredsteyer/multi-framework-micro-frontend/tree/main/mfe3/src/app"
    click MFE4 "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe4-react/app.js"
    click MFE1CompA "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe1/src/app/a/a.component.ts"
    click MFE1CompB "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe1/src/app/b/b.component.ts"
    click MFE2CompA "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe2/src/app/a/a.component.ts"
    click MFE2CompB "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe2/src/app/b/b.component.ts"
    click MFE3CompA "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe3/src/app/a/a.component.ts"
    click MFE3CompB "https://github.com/manfredsteyer/multi-framework-micro-frontend/blob/main/mfe3/src/app/b/b.component.ts"

    %% Legend
    subgraph Legend
        L1["Angular MFE"]:::angular
        L2["React MFE"]:::react
        L3["Configuration"]:::config
        L4["Component"]:::component
        L5["Registry"]:::registry
    end
```
