# mediarayek-me/smmbooster architecture

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

- Interactive diagram: https://gitdiagram.com/mediarayek-me/smmbooster
- Repository: https://github.com/mediarayek-me/smmbooster

## Overview

##### Project type and purpose
- This is a full-stack monolithic web application (“smmbooster”) built on Laravel 8.
- It exposes two main user interfaces (Admin panel & User panel via Blade + Vue.js), plus a JSON API for external/mobile clients.
- Core purpose: let users place social-media marketing orders; let admins manage services, categories, API providers and payments.

##### File structure to infer architecture
- Top-level:
- app/Http/Controllers splits into Admin, Web (user), API and Auth controllers → logical module boundaries
- resources/views (Blade templates) for UI; resources/js/components & pages (Vue.js) for dynamic interactivity
- routes/{web.php, admin.php, api.php} define separate entry points
- app/Models, migrations and seeders → ORM & relational schema (MySQL)
- app/Events, Listeners, Observers → event-driven patterns for decoupling
- queue config in config/queue.php; Console/Kernel.php for scheduled tasks
- config/services.php + paypal.php + stripe integration
- public/ serves static assets (CSS, JS, images)

##### README for additional insights
- Third-party integrations: multiple SMM panel APIs, PayPal, Stripe, email notifications.
- Dynamic installer endpoint under public/installer for one-time setup.
- Emphasis on MVC, service providers, API driven fetch of remote services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Clients
    subgraph "Clients" 
        direction TB
        Browser["Browser (Admin & User UI)"]:::frontend
        Mobile["External API Clients (Mobile Apps)"]:::frontend
    end

    %% Edge Layer
    subgraph "Edge Layer"
        direction TB
        LB["Load Balancer"]:::infra
        WebServer["Web Server (Nginx/Apache)"]:::infra
        Index["public/index.php"]:::backend
        click Index "https://github.com/mediarayek-me/smmbooster/blob/master/public/index.php"
    end

    %% Application Layer
    subgraph "Application Layer (Laravel)"
        direction TB
        Kernel["HTTP Kernel & Middleware"]:::backend
        subgraph "Controllers"
            direction TB
            AdminCtrl["Admin Controllers"]:::backend
            click AdminCtrl "https://github.com/mediarayek-me/smmbooster/tree/master/app/Http/Controllers/Admin/"
            WebCtrl["Web Controllers"]:::backend
            click WebCtrl "https://github.com/mediarayek-me/smmbooster/tree/master/app/Http/Controllers/Web/"
            AuthCtrl["Auth Controllers"]:::backend
            click AuthCtrl "https://github.com/mediarayek-me/smmbooster/tree/master/app/Http/Controllers/Auth/"
            APICtrl["API Controllers"]:::backend
            click APICtrl "https://github.com/mediarayek-me/smmbooster/tree/master/app/Http/Controllers/Api/"
        end
        subgraph "Views & Frontend"
            direction TB
            BladeAdmin["Blade Templates (Admin UI)"]:::frontend
            click BladeAdmin "https://github.com/mediarayek-me/smmbooster/tree/master/resources/views/admin/"
            BladeWeb["Blade Templates (User UI)"]:::frontend
            click BladeWeb "https://github.com/mediarayek-me/smmbooster/tree/master/resources/views/web/"
            SharedLayouts["Shared Layouts"]:::frontend
            click SharedLayouts "https://github.com/mediarayek-me/smmbooster/tree/master/resources/views/layouts/"
            VueSrc["Vue.js Source"]:::frontend
            click VueSrc "https://github.com/mediarayek-me/smmbooster/tree/master/resources/js/components/"
            VuePages["Vue.js Pages"]:::frontend
            click VuePages "https://github.com/mediarayek-me/smmbooster/tree/master/resources/js/pages/"
            VueApp["Vue Entry (app.js)"]:::frontend
            click VueApp "https://github.com/mediarayek-me/smmbooster/blob/master/resources/js/app.js"
            VueBuild["Compiled JS"]:::frontend
            click VueBuild "https://github.com/mediarayek-me/smmbooster/tree/master/public/js/"
        end
        subgraph "Domain & Data"
            direction TB
            Models["Eloquent Models"]:::backend
            click Models "https://github.com/mediarayek-me/smmbooster/tree/master/app/Models/"
            Migrations["Migrations"]:::db
            click Migrations "https://github.com/mediarayek-me/smmbooster/tree/master/database/migrations/"
            Seeders["Seeders"]:::db
            click Seeders "https://github.com/mediarayek-me/smmbooster/tree/master/database/seeders/"
        end
        subgraph "Supporting Services"
            direction TB
            Events["Event Bus: Events"]:::backend
            click Events "https://github.com/mediarayek-me/smmbooster/tree/master/app/Events/"
            Listeners["Listeners"]:::backend
            click Listeners "https://github.com/mediarayek-me/smmbooster/tree/master/app/Listeners/"
            Observers["Model Observers"]:::backend
            click Observers "https://github.com/mediarayek-me/smmbooster/tree/master/app/Observers/"
            Providers["Service Providers"]:::backend
            click Providers "https://github.com/mediarayek-me/smmbooster/tree/master/app/Providers/"
            Helpers["Helpers & Traits"]:::backend
            click Helpers "https://github.com/mediarayek-me/smmbooster/blob/master/app/Helpers/Helper.php"
            click Helpers "https://github.com/mediarayek-me/smmbooster/tree/master/app/Traits/"
        end
        subgraph "Queue & Scheduler"
            direction TB
            QueueCfg["Queue Configuration"]:::backend
            click QueueCfg "https://github.com/mediarayek-me/smmbooster/blob/master/config/queue.php"
            KernelConsole["Console Kernel"]:::backend
            click KernelConsole "https://github.com/mediarayek-me/smmbooster/blob/master/app/Console/Kernel.php"
            Commands["Console Commands"]:::backend
            click Commands "https://github.com/mediarayek-me/smmbooster/tree/master/app/Console/"
        end
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        MySQL["MySQL Database"]:::db
        Cache["Cache Store (Redis)"]:::cache
        Session["Session Store"]:::cache
        Filesystem["Filesystem (Local/Cloud)"]:::cache
    end

    %% External Integrations
    subgraph "External Integrations"
        direction TB
        SMM["SMM API Providers"]:::cloud
        click SMM "https://github.com/mediarayek-me/smmbooster/blob/master/app/Models/ApiProvider.php"
        click SMM "https://github.com/mediarayek-me/smmbooster/blob/master/app/Http/Controllers/Admin/ApiProviderController.php"
        click SMM "https://github.com/mediarayek-me/smmbooster/blob/master/app/Observers/ApiProviderObserver.php"
        PayPal["PayPal"]:::cloud
        Stripe["Stripe"]:::cloud
        EmailSvc["Email SMTP/Mail Service"]:::cloud
    end

    %% Installer
    Installer["One-Time Installer"]:::infra
    click Installer "https://github.com/mediarayek-me/smmbooster/tree/master/public/installer/"
    click Installer "https://github.com/mediarayek-me/smmbooster/blob/master/config/installer.php"
    click Installer "https://github.com/mediarayek-me/smmbooster/blob/master/app/Http/Middleware/Installer.php"

    %% Routes
    subgraph "Routes"
        direction TB
        WebRoutes["routes/web.php"]:::backend
        click WebRoutes "https://github.com/mediarayek-me/smmbooster/blob/master/routes/web.php"
        AdminRoutes["routes/admin.php"]:::backend
        click AdminRoutes "https://github.com/mediarayek-me/smmbooster/blob/master/routes/admin.php"
        APIRoutes["routes/api.php"]:::backend
        click APIRoutes "https://github.com/mediarayek-me/smmbooster/blob/master/routes/api.php"
        ConsoleRoutes["routes/console.php"]:::backend
        click ConsoleRoutes "https://github.com/mediarayek-me/smmbooster/blob/master/routes/console.php"
    end

    %% Payments
    subgraph "Payment Integration"
        direction TB
        PayCfg["config/paypal.php"]:::backend
        click PayCfg "https://github.com/mediarayek-me/smmbooster/blob/master/config/paypal.php"
        SvcCfg["config/services.php"]:::backend
        click SvcCfg "https://github.com/mediarayek-me/smmbooster/blob/master/config/services.php"
        AdminPayCtrl["PaymentController"]:::backend
        click AdminPayCtrl "https://github.com/mediarayek-me/smmbooster/blob/master/app/Http/Controllers/Admin/PaymentController.php"
    end

    %% Email Notifications
    EmailListener["SendEmailNotification Listener"]:::backend
    click EmailListener "https://github.com/mediarayek-me/smmbooster/blob/master/app/Listeners/SendEmailNotification.php"
    click MailCfg "https://github.com/mediarayek-me/smmbooster/blob/master/config/mail.php"

    %% Connections
    Browser -->|HTTP/HTTPS| LB --> WebServer --> Index --> Kernel --> WebRoutes --> WebCtrl --> Models --> MySQL
    Browser -->|HTTP/HTTPS| LB --> WebServer --> Index --> Kernel --> AdminRoutes --> AdminCtrl --> Models --> MySQL
    Mobile -->|JSON API| LB --> WebServer --> Index --> Kernel --> APIRoutes --> APICtrl --> Models --> MySQL

    WebCtrl -->|renders| BladeWeb
    AdminCtrl -->|renders| BladeAdmin
    WebCtrl -->|provides| VueApp
    APICtrl -->|dispatches| Events
    Events --> Listeners
    Models --> Observers --> Events

    APICtrl -->|push job| QueueCfg --> Commands -->|execute| SMM
    APICtrl -->|redirect or server-call| PayPal
    APICtrl -->|redirect or server-call| Stripe
    PayPal --> APICtrl
    Stripe --> APICtrl

    KernelConsole -->|schedule:run| Commands
    Commands -->|dispatch| QueueCfg
    Commands -->|operate| SMM
    Commands -->|send| EmailSvc

    MySQL -->|cache read/write| Cache
    MySQL -->|session read/write| Session
    Filesystem -->|store uploads| public_index[(public/index.php)]

    Installer -->|one-time setup| Filesystem
    Installer -->|configures| MySQL

    %% Styles
    classDef frontend fill:#f9f,stroke:#333,stroke-width:1px
    classDef backend fill:#bbf,stroke:#333,stroke-width:1px
    classDef db fill:#ffe599,stroke:#333,stroke-width:1px
    classDef cache fill:#d5a6bd,stroke:#333,stroke-width:1px
    classDef cloud fill:#a4c2f4,stroke:#333,stroke-width:1px
    classDef infra fill:#b6d7a8,stroke:#333,stroke-width:1px
```
