# thedevdojo/wave architecture

> Architecture diagram of the GitHub repository thedevdojo/wave, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thedevdojo/wave
- Repository: https://github.com/thedevdojo/wave

## Overview

##### Main System Components

a) Client Layer:
- Web Interface (Themes system)
- Admin Panel (Filament-based)
- API Consumers

b) Application Layer:
- Authentication System
- Billing System (Paddle/Stripe integration)
- User Management
- Subscription Management
- Content Management (Blog/Pages)
- Plugin System
- Theme System
- Notification System

c) Infrastructure Layer:
- Database
- File Storage
- Cache
- Queue System
- Email Service

##### Component Relationships

a) Data Flow:
- Client requests → Application Layer
- Authentication flow
- Subscription/billing workflow
- API communication paths
- Plugin integration points
- Theme rendering pipeline

b) Service Integration:
- Payment gateway connections
- Email service integration
- Storage service connections

##### Specific Architectural Elements

Specialized components:

**[Client Layer]**
- ↓
**[HTTP/API Layer]**
- ↓
**[Middleware Layer] → Authentication, Subscriptions, Admin Access**
- ↓
**[Core Services]**
- User Service
- Billing Service
- Content Service
- Plugin Manager
- Theme Manager
- Notification Service
- ↓
**[Data Layer]**
- Database
- Cache
- File Storage

##### Important Details

- Authentication flows
- Billing integration points
- Plugin extension points
- Theme system architecture
- API endpoints
- Admin panel integration
- Database relationships
- Cache layers
- Queue system

##### Specific Implementation Notes

Highlight:
- Laravel-specific components (Filament, Livewire)
- SaaS-specific features (subscription management, user roles)
- Extension mechanisms (plugins, themes)
- Security boundaries
- Scalability points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        WI[Web Interface]
        AP[Admin Panel]:::admin
        AC[API Consumers]
    end

    subgraph Application
        AL[API Layer]:::api
        
        subgraph Security
            AS[Authentication System]:::auth
            SM[Subscription Management]:::billing
            BS[Billing System]:::billing
        end
        
        subgraph Core
            UM[User Management]:::core
            CM[Content Management]:::core
            PS[Plugin System]:::plugin
            TS[Theme System]:::theme
            NS[Notification System]:::notify
        end
    end

    subgraph Infrastructure
        DB[(Database)]:::infra
        FS[File Storage]:::infra
        CS[Cache System]:::infra
        QS[Queue System]:::infra
        ES[Email Service]:::infra
    end

    %% Client Layer Connections
    WI --> AL
    AP --> AL
    AC --> AL

    %% Application Layer Connections
    AL --> AS
    AL --> SM
    AL --> BS
    
    AS --> UM
    SM --> UM
    BS --> SM

    %% Core Service Connections
    UM --> CM
    UM --> NS
    CM --> PS
    CM --> TS
    PS --> TS

    %% Infrastructure Connections
    UM --> DB
    CM --> DB
    SM --> DB
    BS --> DB
    
    CM --> FS
    PS --> FS
    TS --> FS
    
    AS --> CS
    SM --> CS
    
    NS --> QS
    NS --> ES

    %% Click Events
    click AP "https://github.com/thedevdojo/wave/tree/main/app/Filament"
    click AS "https://github.com/thedevdojo/wave/tree/main/app/Http/Controllers/Auth"
    click BS "https://github.com/thedevdojo/wave/tree/main/wave/src/Http/Controllers/Billing"
    click UM "https://github.com/thedevdojo/wave/tree/main/app/Filament/Resources/UserResource"
    click SM "https://github.com/thedevdojo/wave/tree/main/wave/src/Http/Controllers/SubscriptionController"
    click CM "https://github.com/thedevdojo/wave/tree/main/app/Filament/Resources/PostResource"
    click PS "https://github.com/thedevdojo/wave/tree/main/wave/src/Plugins"
    click TS "https://github.com/thedevdojo/wave/tree/main/resources/themes"
    click NS "https://github.com/thedevdojo/wave/tree/main/app/Notifications"
    click AL "https://github.com/thedevdojo/wave/tree/main/app/Http/Controllers/Api"
    click DB "https://github.com/thedevdojo/wave/tree/main/database/migrations"
    click CS "https://github.com/thedevdojo/wave/blob/main/config/cache.php"
    click QS "https://github.com/thedevdojo/wave/blob/main/config/queue.php"
    click ES "https://github.com/thedevdojo/wave/blob/main/config/mail.php"
    click FS "https://github.com/thedevdojo/wave/blob/main/config/filesystems.php"

    %% Styling
    classDef core fill:#2563eb,color:#fff
    classDef auth fill:#f97316,color:#fff
    classDef billing fill:#ea580c,color:#fff
    classDef plugin fill:#9333ea,color:#fff
    classDef theme fill:#a855f7,color:#fff
    classDef notify fill:#6366f1,color:#fff
    classDef infra fill:#4b5563,color:#fff
    classDef api fill:#0891b2,color:#fff
    classDef admin fill:#0d9488,color:#fff
```
