# rajasegar/awesome-micro-frontends architecture

> Architecture diagram of the GitHub repository rajasegar/awesome-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/rajasegar/awesome-micro-frontends
- Repository: https://github.com/rajasegar/awesome-micro-frontends

## Overview

##### Key Components

a. Main Architectural Components:
- Frontend Layer (Micro-Frontends)
- Integration Layer
- Backend Services
- Shared Resources

b. Common Patterns (based on the collected resources):
- Module Federation Pattern
- Composition Pattern
- Routing Pattern
- Communication Pattern

**┌─────────────────────────────────────────────────────────┐**
- Client Browser Layer                    │
- ┘
- ↓
**┌─────────────────────────────────────────────────────────┐**
- Micro-Frontend Layer                      │
- ┬───────────┬───────────┬───────────┬────────┤
- MF App 1 │  MF App 2 │  MF App 3 │  MF App 4 │  ...   │
- ┴───────────┴───────────┴───────────┴────────┘
- ↓
**┌─────────────────────────────────────────────────────────┐**
- Integration Layer                       │
- ┬───────────┬───────────┬───────────┬────────┤
- Router   │Orchestrator│  Shared   │  Event    │        │
- State    │   Bus     │        │
- ┴───────────┴───────────┴───────────┴────────┘
- ↓
**┌─────────────────────────────────────────────────────────┐**
- Backend Services                       │
- ┘

##### Important Elements to Highlight

a. Integration Patterns:
- Different composition strategies (Build-time, Run-time, Server-side)
- Communication patterns between micro-frontends

b. Cross-Cutting Concerns:
- Authentication/Authorization
- Shared styling
- State management
- Asset loading

##### Implementation Details

- Container Application structure
- Micro-frontend boundaries
- Shared dependencies
- Communication protocols
- Loading strategies
- State management approach

## Diagram (Mermaid)

```mermaid
graph TB
    %% Client Layer
    subgraph Client
        Browser["Web Browser"]
    end

    %% Micro-Frontend Layer
    subgraph MFLayer["Micro-Frontend Layer"]
        MF1["MF App 1"]:::frontend
        MF2["MF App 2"]:::frontend
        MF3["MF App 3"]:::frontend
        MF4["MF App 4"]:::frontend
    end

    %% Integration Layer
    subgraph Integration["Integration Layer"]
        Router["Router"]:::integration
        Orchestrator["Orchestrator"]:::integration
        SharedState["Shared State"]:::integration
        EventBus["Event Bus"]:::integration
    end

    %% Backend Layer
    subgraph Backend["Backend Services"]
        API["API Services"]:::backend
        Auth["Authentication"]:::backend
        Data["Data Services"]:::backend
    end

    %% Cross-cutting Components
    subgraph Shared["Shared Resources"]
        Documentation["Documentation"]:::shared
        Guidelines["Contribution Guidelines"]:::shared
        Conduct["Code of Conduct"]:::shared
        CI["CI/CD Pipeline"]:::shared
        License["License"]:::shared
    end

    %% Relationships
    Browser --> MFLayer
    MFLayer --> Integration
    Integration --> Backend
    
    %% Component Interactions
    MF1 <--> EventBus
    MF2 <--> EventBus
    MF3 <--> EventBus
    MF4 <--> EventBus
    
    Router --> Orchestrator
    Orchestrator --> SharedState
    
    %% Click Events
    click Documentation "https://github.com/rajasegar/awesome-micro-frontends/blob/master/README.md"
    click Guidelines "https://github.com/rajasegar/awesome-micro-frontends/blob/master/CONTRIBUTING.md"
    click Conduct "https://github.com/rajasegar/awesome-micro-frontends/blob/master/CODE-OF-CONDUCT.md"
    click CI "https://github.com/rajasegar/awesome-micro-frontends/blob/master/.github/workflows/main.yml"
    click License "https://github.com/rajasegar/awesome-micro-frontends/tree/master/LICENSE"

    %% Styling
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef integration fill:#2ecc71,stroke:#27ae60,color:white
    classDef backend fill:#e67e22,stroke:#d35400,color:white
    classDef shared fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        Frontend["Frontend Component"]:::frontend
        IntegrationComp["Integration Component"]:::integration
        BackendComp["Backend Component"]:::backend
        SharedComp["Shared Component"]:::shared
    end
```
