# excid3/jumpstart architecture

> Architecture diagram of the GitHub repository excid3/jumpstart, 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/excid3/jumpstart
- Repository: https://github.com/excid3/jumpstart

## Overview

##### Connection Flows

- External API calls (dash-dot lines)

##### Key Elements to Highlight

a) Security Layer:
- Devise authentication flow
- OAuth integration points
- Credentials management

b) Development Environment:
- Foreman process management
- Asset compilation pipeline
- Development server setup

##### Specific Components

**[Web Client] ←→ [Load Balancer/Reverse Proxy]**
- ↓
**[Rails Application]**
- Assets Pipeline (JavaScript/CSS)
- Action Cable (WebSockets)
- Controllers (MVC)
- Views (ERB Templates)
- Models
- Admin Panel (Madmin)
- ↓
**[Services Layer]**
- PostgreSQL
- Redis
- OAuth Providers
- Storage (ActiveStorage)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client["Client Layer"]
        Browser["Web Browser"]:::client
        JS["JavaScript/Stimulus"]:::client
        Assets["Asset Pipeline"]:::client
        Layout["Application Layout"]:::client
        Views["View Templates"]:::client
    end

    subgraph App["Application Layer"]
        WebServer["Rails Server"]:::app
        Auth["Authentication (Devise)"]:::app
        Admin["Admin Panel (Madmin)"]:::app
        Social["Social Auth (OmniAuth)"]:::app
        Cable["Action Cable"]:::app
        AppController["Application Controller"]:::app
        User["User Model"]:::app
        Notif["Notification System"]:::app
    end

    subgraph Services["Service Layer"]
        Jobs["Background Jobs"]:::service
        Mailers["Devise Mailers"]:::service
        ExtServices["External Services"]:::service
        CI["Continuous Integration"]:::service
    end

    subgraph Data["Data Layer"]
        DB[(PostgreSQL)]:::data
        Redis[(Redis)]:::data
        Storage[(Active Storage)]:::data
    end

    Browser --> JS
    Browser --> Assets
    Browser --> Layout
    Layout --> Views
    Browser <--> Cable
    Browser --> WebServer
    WebServer --> Auth
    Auth --> DB
    Auth --> Redis
    WebServer --> Admin
    WebServer --> Social
    Social --> ExtServices
    WebServer --> AppController
    AppController --> User
    User --> DB
    WebServer --> Notif
    Notif --> DB
    Jobs --> DB
    Mailers --> DB
    Cable --> Redis
    Storage --> DB

    %% Click Events
    click JS "https://github.com/excid3/jumpstart/tree/master/app/javascript/controllers"
    click Assets "https://github.com/excid3/jumpstart/tree/master/app/assets"
    click Auth "https://github.com/excid3/jumpstart/tree/master/app/views/devise"
    click Admin "https://github.com/excid3/jumpstart/tree/master/app/controllers/madmin"
    click Social "https://github.com/excid3/jumpstart/blob/master/app/controllers/users/omniauth_callbacks_controller.rb"
    click Cable "https://github.com/excid3/jumpstart/tree/master/app/channels/application_cable"
    click Mailers "https://github.com/excid3/jumpstart/tree/master/app/views/devise/mailer"
    click ExtServices "https://github.com/excid3/jumpstart/blob/master/app/models/service.rb"
    click Layout "https://github.com/excid3/jumpstart/blob/master/app/views/layouts/application.html.erb"
    click AppController "https://github.com/excid3/jumpstart/blob/master/app/controllers/application_controller.rb"
    click User "https://github.com/excid3/jumpstart/blob/master/app/models/user.rb"
    click Notif "https://github.com/excid3/jumpstart/blob/master/app/controllers/notifications_controller.rb"
    click Views "https://github.com/excid3/jumpstart/tree/master/app/views"
    click CI "https://github.com/excid3/jumpstart/blob/master/.github/workflows/ci.yml"

    %% Styles
    classDef client fill:#3498db,stroke:#2980b9,color:white
    classDef app fill:#2ecc71,stroke:#27ae60,color:white
    classDef service fill:#f1c40f,stroke:#f39c12,color:black
    classDef data fill:#e74c3c,stroke:#c0392b,color:white

    %% Legend
    subgraph Legend
        Client_L[Client Components]:::client
        App_L[Application Components]:::app
        Service_L[Service Components]:::service
        Data_L[Data Stores]:::data
    end
```
