# razabangi/laravel-filament architecture

> Architecture diagram of the GitHub repository razabangi/laravel-filament, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/razabangi/laravel-filament
- Repository: https://github.com/razabangi/laravel-filament

## Overview

#### Purpose and Entry Points
This is a Laravel PHP application centered on an authenticated Filament administrative panel for managing customers and drivers. The HTTP entry point is `public/index.php`; framework bootstrapping and request middleware begin in `bootstrap/app.php` and `app/Http/Kernel.php`. CLI/scheduled execution enters through `artisan` and `app/Console/Kernel.php`.

#### Application Shell and Admin Panel
Filament is the primary UI/application layer rather than custom controllers or Blade flows. The panel is registered and configured through `app/Providers/Filament/AdminPanelProvider.php`. It exposes resource-driven CRUD screens and a dashboard metric widget; bundled Filament browser assets are served from `public/css/filament/filament/app.css` and `public/js/filament/filament/app.js`.

#### Domain Persistence
The modeled business entities are customers and drivers, represented by Eloquent models at `app/Models/Customer.php` and `app/Models/Driver.php`. Their database schema boundaries are defined in `database/migrations/2024_07_22_060802_create_customers_table.php` and `database/migrations/2024_07_22_070732_create_drivers_table.php`. No relationship, dispatch, routing, or service-layer code is visible in the tree; the system's current domain scope appears to be record administration.

#### Customer Management Flow
Filament maps customer form submissions and table operations to the Customer Eloquent model through `app/Filament/Resources/CustomerResource.php`. Its list, create, and edit page stages are separated at `app/Filament/Resources/CustomerResource/Pages/ListCustomers.php`, `app/Filament/Resources/CustomerResource/Pages/CreateCustomer.php`, and `app/Filament/Resources/CustomerResource/Pages/EditCustomer.php`. The resource/UI-to-ORM boundary is the main write path to the customers table.

#### Driver Management Flow
Driver CRUD follows the same resource architecture: `app/Filament/Resources/DriverResource.php` binds UI schema/table behavior to `app/Models/Driver.php`, while page controllers live in `app/Filament/Resources/DriverResource/Pages/CreateDriver.php` and `app/Filament/Resources/DriverResource/Pages/EditDriver.php`. This creates an independent admin-managed persistence flow for driver records.

#### Authentication and Request Boundary
Laravel user authentication is based on `app/Models/User.php`, with auth policy/provider wiring in `config/auth.php` and `app/Providers/AuthServiceProvider.php`. Requests pass Laravel's standard middleware pipeline, including authentication, sessions/cookies, CSRF protection, proxy handling, and maintenance protection from `app/Http/Kernel.php` and `app/Http/Middleware/Authenticate.php`. API, web, channel, and console route registries exist at `routes/api.php`, `routes/web.php`, `routes/channels.php`, and `routes/console.php`, though the admin panel likely supplies its own registered routes.

#### Runtime and Infrastructure
The runtime is PHP/Laravel with Composer dependencies (`composer.json`) and a Vite-managed frontend asset setup (`package.json`, `vite.config.js`). Persistence, session, cache, queue, mail, filesystem, broadcasting, logging, and external-service adapters are Laravel-configurable through `config/database.php`, `config/queue.php`, `config/services.php`, and related configuration. Concrete external providers or non-default infrastructure integrations are not identifiable from the supplied tree.

Main entry points: [`app/Filament/Resources/CustomerResource.php`](https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/CustomerResource.php) (Customer resource), [`app/Filament/Resources/DriverResource.php`](https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/DriverResource.php) (Driver resource), [`app/Http/Kernel.php`](https://github.com/razabangi/laravel-filament/blob/master/app/Http/Kernel.php) (HTTP middleware pipeline), [`app/Providers/Filament/AdminPanelProvider.php`](https://github.com/razabangi/laravel-filament/blob/master/app/Providers/Filament/AdminPanelProvider.php) (Admin panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Laravel Runtime"]
  node_http(("HTTP entry<br/>PHP entry point<br/>[index.php]"))
  node_bootstrap["Application bootstrap<br/>Laravel bootstrap<br/>[app.php]"]
  node_kernel["HTTP middleware pipeline<br/>Laravel kernel<br/>[Kernel.php]"]
  node_authenticate["Authentication middleware<br/>[Authenticate.php]"]
  node_auth["User authentication<br/>auth provider"]
  node_user["User<br/>Eloquent model<br/>[User.php]"]
  node_artisan(("CLI entry<br/>Artisan command"))
  node_console["Console scheduler<br/>Laravel console kernel<br/>[Kernel.php]"]
end

subgraph group_admin["Filament Admin"]
  node_panel["Admin panel<br/>Filament panel provider"]
  node_customer_resource["Customer resource<br/>Filament resource"]
  node_customer_pages["Customer CRUD pages<br/>Filament pages<br/>[ListCustomers.php]"]
  node_driver_resource["Driver resource<br/>Filament resource<br/>[DriverResource.php]"]
  node_driver_pages["Driver CRUD pages<br/>Filament pages<br/>[CreateDriver.php]"]
end

subgraph group_domain["Record Administration"]
  node_customer["Customer<br/>Eloquent model<br/>[Customer.php]"]
  node_customers_table[("Customers table<br/>database schema")]
  node_driver["Driver<br/>Eloquent model<br/>[Driver.php]"]
  node_drivers_table[("Drivers table<br/>database schema")]
end

node_http -->|"boots"| node_bootstrap
node_bootstrap -->|"builds"| node_kernel
node_kernel -->|"runs"| node_authenticate
node_authenticate -->|"resolves user"| node_auth
node_auth -->|"uses"| node_user
node_kernel -->|"serves authenticated panel"| node_panel
node_panel -->|"registers"| node_customer_resource
node_panel -->|"registers"| node_driver_resource
node_customer_resource -->|"routes CRUD screens"| node_customer_pages
node_customer_pages -->|"submits operations"| node_customer_resource
node_customer_resource -->|"binds CRUD"| node_customer
node_customer -->|"persists"| node_customers_table
node_driver_resource -->|"routes CRUD screens"| node_driver_pages
node_driver_pages -->|"submits operations"| node_driver_resource
node_driver_resource -->|"binds CRUD"| node_driver
node_driver -->|"persists"| node_drivers_table
node_artisan -->|"boots"| node_console

click node_http "https://github.com/razabangi/laravel-filament/blob/master/public/index.php"
click node_bootstrap "https://github.com/razabangi/laravel-filament/blob/master/bootstrap/app.php"
click node_kernel "https://github.com/razabangi/laravel-filament/blob/master/app/Http/Kernel.php"
click node_authenticate "https://github.com/razabangi/laravel-filament/blob/master/app/Http/Middleware/Authenticate.php"
click node_auth "https://github.com/razabangi/laravel-filament/blob/master/app/Providers/AuthServiceProvider.php"
click node_user "https://github.com/razabangi/laravel-filament/blob/master/app/Models/User.php"
click node_artisan "https://github.com/razabangi/laravel-filament/blob/master/artisan"
click node_console "https://github.com/razabangi/laravel-filament/blob/master/app/Console/Kernel.php"
click node_panel "https://github.com/razabangi/laravel-filament/blob/master/app/Providers/Filament/AdminPanelProvider.php"
click node_customer_resource "https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/CustomerResource.php"
click node_customer_pages "https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/CustomerResource/Pages/ListCustomers.php"
click node_driver_resource "https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/DriverResource.php"
click node_driver_pages "https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/DriverResource/Pages/CreateDriver.php"
click node_customer "https://github.com/razabangi/laravel-filament/blob/master/app/Models/Customer.php"
click node_customers_table "https://github.com/razabangi/laravel-filament/blob/master/database/migrations/2024_07_22_060802_create_customers_table.php"
click node_driver "https://github.com/razabangi/laravel-filament/blob/master/app/Models/Driver.php"
click node_drivers_table "https://github.com/razabangi/laravel-filament/blob/master/database/migrations/2024_07_22_070732_create_drivers_table.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_http,node_bootstrap,node_kernel,node_authenticate,node_auth,node_user,node_artisan,node_console toneBlue
class node_panel,node_customer_resource,node_customer_pages,node_driver_resource,node_driver_pages toneAmber
class node_customer,node_customers_table,node_driver,node_drivers_table toneMint
```

## Components

### Laravel Runtime

- [HTTP entry](https://github.com/razabangi/laravel-filament/blob/master/public/index.php): PHP entry point · `public/index.php`
- [Application bootstrap](https://github.com/razabangi/laravel-filament/blob/master/bootstrap/app.php): Laravel bootstrap · `bootstrap/app.php`
- [HTTP middleware pipeline](https://github.com/razabangi/laravel-filament/blob/master/app/Http/Kernel.php): Laravel kernel · Applies sessions, CSRF, authentication, and standard request middleware. · `app/Http/Kernel.php`
- [Authentication middleware](https://github.com/razabangi/laravel-filament/blob/master/app/Http/Middleware/Authenticate.php): middleware · `app/Http/Middleware/Authenticate.php`
- [User authentication](https://github.com/razabangi/laravel-filament/blob/master/app/Providers/AuthServiceProvider.php): auth provider · `app/Providers/AuthServiceProvider.php`
- [User](https://github.com/razabangi/laravel-filament/blob/master/app/Models/User.php): Eloquent model · `app/Models/User.php`
- [CLI entry](https://github.com/razabangi/laravel-filament/blob/master/artisan): Artisan command · `artisan`
- [Console scheduler](https://github.com/razabangi/laravel-filament/blob/master/app/Console/Kernel.php): Laravel console kernel · `app/Console/Kernel.php`

### Filament Admin

- [Admin panel](https://github.com/razabangi/laravel-filament/blob/master/app/Providers/Filament/AdminPanelProvider.php): Filament panel provider · Primary authenticated application UI and resource registry. · `app/Providers/Filament/AdminPanelProvider.php`
- [Customer resource](https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/CustomerResource.php): Filament resource · Defines customer forms, tables, and CRUD binding. · `app/Filament/Resources/CustomerResource.php`
- [Customer CRUD pages](https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/CustomerResource/Pages/ListCustomers.php): Filament pages · List, create, and edit customer screens. · `app/Filament/Resources/CustomerResource/Pages/ListCustomers.php`
- [Driver resource](https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/DriverResource.php): Filament resource · Defines driver forms, tables, and CRUD binding. · `app/Filament/Resources/DriverResource.php`
- [Driver CRUD pages](https://github.com/razabangi/laravel-filament/blob/master/app/Filament/Resources/DriverResource/Pages/CreateDriver.php): Filament pages · Create and edit driver screens. · `app/Filament/Resources/DriverResource/Pages/CreateDriver.php`

### Record Administration

- [Customer](https://github.com/razabangi/laravel-filament/blob/master/app/Models/Customer.php): Eloquent model · `app/Models/Customer.php`
- [Customers table](https://github.com/razabangi/laravel-filament/blob/master/database/migrations/2024_07_22_060802_create_customers_table.php): database schema · `database/migrations/2024_07_22_060802_create_customers_table.php`
- [Driver](https://github.com/razabangi/laravel-filament/blob/master/app/Models/Driver.php): Eloquent model · `app/Models/Driver.php`
- [Drivers table](https://github.com/razabangi/laravel-filament/blob/master/database/migrations/2024_07_22_070732_create_drivers_table.php): database schema · `database/migrations/2024_07_22_070732_create_drivers_table.php`

## Connections

- HTTP entry → Application bootstrap: boots
- Application bootstrap → HTTP middleware pipeline: builds
- HTTP middleware pipeline → Authentication middleware: runs
- Authentication middleware → User authentication: resolves user
- User authentication → User: uses
- HTTP middleware pipeline → Admin panel: serves authenticated panel
- Admin panel → Customer resource: registers
- Admin panel → Driver resource: registers
- Customer resource → Customer CRUD pages: routes CRUD screens
- Customer CRUD pages → Customer resource: submits operations
- Customer resource → Customer: binds CRUD
- Customer → Customers table: persists
- Driver resource → Driver CRUD pages: routes CRUD screens
- Driver CRUD pages → Driver resource: submits operations
- Driver resource → Driver: binds CRUD
- Driver → Drivers table: persists
- CLI entry → Console scheduler: boots
