# boostercloud/booster architecture

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

- Interactive diagram: https://gitdiagram.com/boostercloud/booster
- Repository: https://github.com/boostercloud/booster

## Overview

##### Main Components

a) Core Framework Layer:
- Command Handling System
- Event Processing System
- Entity Management
- Read Model System
- GraphQL API Layer
- Authentication/Authorization System
- Health Monitoring System

b) Provider Infrastructure Layer:
- AWS Implementation
- Azure Implementation
- Local Development Implementation

c) CLI and Development Tools:
- Project Generation
- Code Generation
- Deployment Management

##### Key Relationships

a) Data Flow:
- Command → Event → Entity → Read Model pipeline
- GraphQL query/mutation/subscription flows
- Event sourcing and CQRS pattern implementation

b) Infrastructure Integration:
- Provider-specific service mappings
- Serverless function deployment paths
- Database and storage connections

**[User/Client Layer]**

- ▼
**[GraphQL API Layer]**

- ┬─────────────────────┐
- ▼                     ▼                     ▼
**[Command Handler]    [Query Handler]    [Subscription Handler]**

- ▼                     │                     │
**[Event Processing]        │                     │**

- ▼                     │                     │
**[Entity Store] ──────────►│                     │**

- ► [Read Models] ◄───────┘

- ▼
**[Infrastructure Layer (AWS/Azure/Local)]**

##### Important Details

a) Framework Features:
- Event sourcing mechanism
- CQRS implementation
- Authentication/Authorization flow
- Health monitoring system
- Rocket extensions system

b) Infrastructure Elements:
- Serverless functions
- Database systems
- Message queues
- API gateways
- Storage services

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User/Client Layer"
        Client[Client Applications]
    end

    subgraph "GraphQL API Layer"
        GraphQL["GraphQL API"]:::api
        click GraphQL "https://github.com/boostercloud/booster/tree/main/packages/framework-core/src/services/graphql/"
    end

    subgraph "Core Processing Layer"
        CommandHandler["Command Handler"]:::core
        QueryHandler["Query Handler"]:::core
        SubscriptionHandler["Subscription Handler"]:::core
        EventProcessor["Event Processor"]:::core
        EntityManager["Entity Manager"]:::core
        ReadModels["Read Models"]:::core
        Auth["Authorization System"]:::core
        Health["Health Monitoring"]:::core

        click CommandHandler "https://github.com/boostercloud/booster/blob/main/packages/framework-core/src/booster-command-dispatcher.ts"
        click EventProcessor "https://github.com/boostercloud/booster/blob/main/packages/framework-core/src/booster-event-processor.ts"
        click EntityManager "https://github.com/boostercloud/booster/tree/main/packages/framework-core/src/core-concepts/entity/"
        click ReadModels "https://github.com/boostercloud/booster/blob/main/packages/framework-core/src/services/read-model-store.ts"
        click Auth "https://github.com/boostercloud/booster/blob/main/packages/framework-core/src/booster-authorizer.ts"
        click Health "https://github.com/boostercloud/booster/tree/main/packages/framework-core/src/sensor/health/"
    end

    subgraph "Infrastructure Layer"
        AWS["AWS Provider"]:::provider
        Azure["Azure Provider"]:::provider
        Local["Local Provider"]:::provider

        click AWS "https://github.com/boostercloud/booster/tree/main/packages/framework-provider-aws/"
        click Azure "https://github.com/boostercloud/booster/tree/main/packages/framework-provider-azure/"
        click Local "https://github.com/boostercloud/booster/tree/main/packages/framework-provider-local/"
    end

    subgraph "Development Tools"
        CLI["CLI Core"]:::tools
        ProjectGen["Project Generator"]:::tools
        CodeGen["Code Generator"]:::tools
        Deploy["Deployment Manager"]:::tools

        click CLI "https://github.com/boostercloud/booster/tree/main/packages/cli/src/"
        click ProjectGen "https://github.com/boostercloud/booster/tree/main/packages/cli/src/commands/new/"
        click CodeGen "https://github.com/boostercloud/booster/tree/main/packages/cli/src/services/generator/"
        click Deploy "https://github.com/boostercloud/booster/blob/main/packages/cli/src/commands/deploy.ts"
    end

    Client --> GraphQL
    GraphQL --> CommandHandler
    GraphQL --> QueryHandler
    GraphQL --> SubscriptionHandler

    CommandHandler --> EventProcessor
    EventProcessor --> EntityManager
    EntityManager --> ReadModels
    QueryHandler --> ReadModels
    SubscriptionHandler --> ReadModels

    Auth -.-> CommandHandler
    Auth -.-> QueryHandler
    Auth -.-> SubscriptionHandler

    Health -.-> CommandHandler
    Health -.-> EventProcessor
    Health -.-> ReadModels

    EntityManager --> AWS
    EntityManager --> Azure
    EntityManager --> Local
    ReadModels --> AWS
    ReadModels --> Azure
    ReadModels --> Local

    CLI --> ProjectGen
    CLI --> CodeGen
    CLI --> Deploy

    classDef core fill:#2374ab,stroke:#2374ab,color:#fff
    classDef provider fill:#4caf50,stroke:#4caf50,color:#fff
    classDef tools fill:#ff9800,stroke:#ff9800,color:#fff
    classDef api fill:#9c27b0,stroke:#9c27b0,color:#fff

    %% Legend
    subgraph Legend
        CoreComp["Core Components"]:::core
        ProviderComp["Provider Components"]:::provider
        ToolComp["Development Tools"]:::tools
        APIComp["API Layer"]:::api
    end
```
