# oomrcookieoo/laravel-vue-inertia-starterkit architecture

> Architecture diagram of the GitHub repository oomrcookieoo/laravel-vue-inertia-starterkit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oomrcookieoo/laravel-vue-inertia-starterkit
- Repository: https://github.com/oomrcookieoo/laravel-vue-inertia-starterkit

## Overview

##### Project Type Analysis
This is a full-stack web application that serves as a starter kit/admin panel, built with Laravel (backend), Vue.js (frontend), and Inertia.js (connecting layer).

##### Main Components

A. Frontend Layer:
- Vue.js Components (resources/js/Components)
- Pages (resources/js/Pages)
- Layouts (resources/js/Layouts)
- UI Components (resources/js/Components/ui)

B. Middleware Layer:
- Inertia.js Bridge
- Authentication Middleware
- Request Handlers

C. Backend Layer:
- Controllers (app/Http/Controllers)
- Models (app/Models)
- Services (app/Services)
- Database

**[Client Browser]**
- ↕
**[Frontend Layer]**
- Vue Components
- UI Components (Shadcn Vue)
- Layouts
- Pages
- ↕
**[Inertia.js Bridge]**
- ↕
**[Backend Layer]**
- Controllers
- Models
- Services
- ↕
**[Database]**

##### Key Relationships to Highlight

A. Authentication Flow:
- Auth Controllers ↔ Frontend Auth Pages
- Role Management System
- Permission System (Spatie)

B. Data Flow:
- API Requests/Responses through Inertia
- Database Interactions
- Form Submissions

##### Key Features to Emphasize
- User Authentication System
- Role & Permission Management
- Dashboard Components
- UI Component Library Integration
- Form Handling
- Navigation System

##### Technical Stack Indicators
- Laravel 10.x
- Vue 3
- Inertia.js
- TailwindCSS
- ShadcnVue Components

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Client
        Browser[Client Browser]
    end

    subgraph FrontendLayer["Frontend Layer"]
        direction TB
        VueComponents["Vue Components"]:::frontend
        UILib["UI Components Library"]:::frontend
        Pages["Pages"]:::frontend
        Layouts["Layouts"]:::frontend
        DashboardComps["Dashboard Components"]:::frontend
        AuthPages["Authentication Pages"]:::frontend
        RolePages["Role Management Pages"]:::frontend
        ProfilePages["Profile Pages"]:::frontend
        Utils["Frontend Utils"]:::frontend
        AppEntry["Application Entry"]:::frontend
    end

    subgraph MiddlewareLayer["Middleware Layer"]
        direction TB
        InertiaBridge["Inertia.js Bridge"]:::middleware
        AuthMiddleware["Authentication Middleware"]:::middleware
        RequestHandlers["Request Handlers"]:::middleware
    end

    subgraph BackendLayer["Backend Layer"]
        direction TB
        Controllers["Controllers"]:::backend
        AuthControllers["Authentication Controllers"]:::backend
        RoleController["Role Management Controller"]:::backend
        ProfileController["Profile Controller"]:::backend
        Models["Models"]:::backend
        Services["Services Layer"]:::backend
        BackendUtils["Backend Utils"]:::backend
        PermConfig["Permission Configuration"]:::backend
    end

    subgraph Storage["Storage Layer"]
        Database[(Database)]:::storage
        Migrations["Database Migrations"]:::storage
    end

    %% Connections
    Browser <--> VueComponents
    VueComponents --> Pages
    VueComponents --> Layouts
    VueComponents --> UILib
    VueComponents --> DashboardComps
    Pages --> AuthPages
    Pages --> RolePages
    Pages --> ProfilePages
    
    VueComponents <--> InertiaBridge
    InertiaBridge <--> Controllers
    AuthMiddleware <--> Controllers
    RequestHandlers <--> Controllers
    
    Controllers --> AuthControllers
    Controllers --> RoleController
    Controllers --> ProfileController
    Controllers --> Models
    Controllers --> Services
    
    Models <--> Database
    Migrations --> Database

    %% Click Events
    click VueComponents "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Components"
    click UILib "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Components/ui"
    click Pages "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Pages"
    click Layouts "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Layouts"
    click DashboardComps "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Components/Dashboard"
    click AuthControllers "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/app/Http/Controllers/Auth"
    click AuthPages "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Pages/Auth"
    click RoleController "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/app/Http/Controllers/RoleController.php"
    click RolePages "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Pages/Role"
    click InertiaBridge "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/app/Http/Middleware/HandleInertiaRequests.php"
    click Models "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/app/Models"
    click Services "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/app/Services"
    click RequestHandlers "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/app/Http/Requests"
    click Migrations "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/database/migrations"
    click PermConfig "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/config/permission.php"
    click AppEntry "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/resources/js/app.ts"
    click Utils "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/resources/js/lib/utils.ts"
    click BackendUtils "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/app/Services/Utils.php"
    click ProfilePages "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/tree/main/resources/js/Pages/Profile"
    click ProfileController "https://github.com/oOMrCookieOo/Laravel-Vue-Inertia-StarterKit/blob/main/app/Http/Controllers/ProfileController.php"

    %% Styles
    classDef frontend fill:#3b82f6,color:white
    classDef middleware fill:#22c55e,color:white
    classDef backend fill:#f97316,color:white
    classDef storage fill:#a855f7,color:white
    classDef default fill:#ffffff,color:black

    %% Legend
    subgraph Legend
        Frontend["Frontend Components"]:::frontend
        Middleware["Middleware Components"]:::middleware
        Backend["Backend Components"]:::backend
        Storage["Storage Components"]:::storage
    end
```
