# rparvz700/admin360 architecture

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

- Interactive diagram: https://gitdiagram.com/rparvz700/admin360
- Repository: https://github.com/rparvz700/admin360

## Overview

1. This is a single Laravel 11 monolith: HTTP requests enter through `routes/web.php` and `routes/auth.php`, are handled by feature controllers in `app/Http/Controllers`, persisted through Eloquent models in `app/Models`, and rendered as Blade views in `resources/views`.

2. The application is organized by business domain rather than by technical layer. Major subsystems include Admin, Facilities Management, Vehicle Management, Ticket Management, Invoice Management, Generic Document Management, and Vehicle Maintenance Management. Each domain has its own controller folder, model set, and view subtree.

3. Authentication and user lifecycle are a first-class subsystem. The repo includes the standard Laravel auth flow plus custom controllers for login, registration, password reset, email verification, profile editing, and session confirmation. These screens live under `resources/views/auth` and `resources/views/profile`, with request validation in `app/Http/Requests/Auth` and `ProfileUpdateRequest`.

4. Authorization is built around Spatie Roles & Permissions. The `config/permission.php` config, the `create_permission_tables` migration, and the `RoleSeeder`, `PermissionSeeder`, and `SuperAdminSeeder` indicate a database-backed RBAC layer that gates access across admin and module controllers.

5. The Admin subsystem manages core master data: users, roles, departments, and subcenters. Its controllers and request classes follow a standard CRUD pattern with dedicated create/edit/index/show views and validation requests for store/update operations.

6. Facilities Management is a large domain covering buildings, floors, agreements, rent, security deposits, assets, asset categories, and asset attributes. The domain uses separate models for property and rental entities, suggesting a relational model where buildings contain floors, agreements drive rent and deposits, and assets have extensible attributes/values.

7. Vehicle Management is another major domain with vehicles, drivers, vehicle types, document categories, document attributes, and document records. The presence of document attribute/value models shows a configurable metadata pattern similar to the generic document and asset modules.

8. Vehicle Maintenance Management expands the vehicle domain with maintenance records, operational logs, parts, vendors, and reports. The views include reporting screens such as service due, vendor cost, vehicle cost, monthly expenses, and parts history, so this subsystem is not just CRUD; it also produces operational analytics.

9. Ticket Management provides a workflow around tickets, ticket updates, attachments, and vehicle assignment. Separate admin ticket controllers and admin-specific views suggest role-based triage or oversight distinct from regular ticket submission and viewing.

10. Generic Document Management is a reusable document metadata system. It has categories, attributes, documents, and attribute values, plus a client-side field generator in `public/js/generic-document-attribute-fields.js`, indicating dynamic forms that adapt to selected document schema.

11. The UI is server-rendered Blade with reusable layouts and components. Shared structure lives in `resources/views/layouts`, `resources/views/Partials`, and `resources/views/components`, while domain pages are composed from those common building blocks. Front-end behavior is added with static assets in `public/js` and compiled assets in `resources/js` / `resources/css` via Vite.

12. Persistence is conventional relational MySQL/PostgreSQL-style Laravel storage: feature-specific migrations define tables for each module, factories and seeders populate baseline data, and the `storage` directory handles cached views, sessions, logs, and public/private file storage. There is no separate service layer or external API architecture visible in the tree.

13. The test suite is focused on framework and auth behavior rather than domain logic. Feature tests cover registration, authentication, password reset/update, email verification, and profile flows, which matches the repo’s emphasis on secure access control and CRUD-driven internal workflows.

Main entry points: [`routes/web.php`](https://github.com/rparvz700/admin360/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Auth`](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/Auth) (Auth flow), [`app/Http/Controllers/Admin`](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/Admin) (Admin CRUD), [`database/migrations`](https://github.com/rparvz700/admin360/tree/main/database/migrations) (Migrations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_routing["Routing & UI"]
  node_routes_web["Web routes<br/>laravel routes<br/>[web.php]"]
  node_views_layouts["Layouts"]
  node_views_components["Components"]
end

subgraph group_group_access["Auth & Access"]
  node_routes_auth["Auth routes<br/>laravel routes<br/>[auth.php]"]
  node_auth_controllers["Auth flow<br/>auth controllers"]
  node_auth_requests["Auth requests<br/>form requests"]
  node_rbac_config["RBAC config<br/>permission config<br/>[permission.php]"]
  node_rbac_seeders["RBAC seeders"]
end

subgraph group_group_admin["Admin"]
  node_admin_controllers["Admin CRUD<br/>admin controllers"]
  node_admin_requests["Admin requests<br/>form requests"]
  node_admin_models["Admin models<br/>domain models"]
end

subgraph group_group_facilities["Facilities"]
  node_facilities_controllers["Facilities<br/>domain controllers"]
  node_facilities_models["Facility models<br/>domain models"]
end

subgraph group_group_vehicles["Vehicles"]
  node_vehicle_controllers["Vehicles<br/>domain controllers"]
  node_vehicle_maintenance["Maintenance"]
  node_vehicle_models["Vehicle models<br/>domain models"]
end

subgraph group_group_documents["Documents"]
  node_document_controllers["Document mgmt<br/>document controllers"]
  node_document_models["Document models"]
end

subgraph group_group_workflows["Workflows"]
  node_ticket_controllers["Tickets<br/>workflow controllers"]
  node_invoice_controller["Invoices<br/>invoice controller"]
end

subgraph group_group_platform["Platform"]
  node_storage_assets[("Storage & assets<br/>runtime assets")]
  node_migrations["Migrations"]
  node_tests_auth["Auth tests<br/>feature tests"]
end

node_routes_web -->|"dispatches"| node_auth_controllers
node_routes_auth -->|"dispatches"| node_auth_controllers
node_routes_web -->|"dispatches"| node_admin_controllers
node_routes_web -->|"dispatches"| node_facilities_controllers
node_routes_web -->|"dispatches"| node_vehicle_controllers
node_routes_web -->|"dispatches"| node_vehicle_maintenance
node_routes_web -->|"dispatches"| node_document_controllers
node_routes_web -->|"dispatches"| node_ticket_controllers
node_routes_web -->|"dispatches"| node_invoice_controller
node_auth_controllers -->|"validates with"| node_auth_requests
node_auth_controllers -->|"renders"| node_views_layouts
node_auth_controllers -->|"uses"| node_views_components
node_auth_controllers -.->|"covered by"| node_tests_auth
node_admin_controllers -->|"validates with"| node_admin_requests
node_admin_controllers -->|"persists"| node_admin_models
node_admin_controllers -->|"renders"| node_views_layouts
node_facilities_controllers -->|"persists"| node_facilities_models
node_facilities_controllers -->|"renders"| node_views_layouts
node_vehicle_controllers -->|"persists"| node_vehicle_models
node_vehicle_maintenance -->|"analyzes"| node_vehicle_models
node_document_controllers -->|"persists"| node_document_models
node_ticket_controllers -->|"links"| node_vehicle_models
node_invoice_controller -.->|"bills against"| node_facilities_models
node_rbac_config -->|"gates"| node_admin_controllers
node_rbac_seeders -->|"bootstraps"| node_rbac_config
node_migrations -->|"defines schema"| node_admin_models
node_migrations -->|"defines schema"| node_facilities_models
node_migrations -->|"defines schema"| node_vehicle_models
node_migrations -->|"defines schema"| node_document_models
node_storage_assets -.->|"serves"| node_views_layouts

click node_routes_web "https://github.com/rparvz700/admin360/blob/main/routes/web.php"
click node_routes_auth "https://github.com/rparvz700/admin360/blob/main/routes/auth.php"
click node_views_layouts "https://github.com/rparvz700/admin360/tree/main/resources/views/layouts"
click node_views_components "https://github.com/rparvz700/admin360/tree/main/resources/views/components"
click node_auth_controllers "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/Auth"
click node_auth_requests "https://github.com/rparvz700/admin360/tree/main/app/Http/Requests/Auth"
click node_rbac_config "https://github.com/rparvz700/admin360/blob/main/config/permission.php"
click node_rbac_seeders "https://github.com/rparvz700/admin360/tree/main/database/seeders"
click node_admin_controllers "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/Admin"
click node_admin_requests "https://github.com/rparvz700/admin360/tree/main/app/Http/Requests"
click node_admin_models "https://github.com/rparvz700/admin360/tree/main/app/Models"
click node_facilities_controllers "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/FacilitiesManagement"
click node_facilities_models "https://github.com/rparvz700/admin360/tree/main/app/Models"
click node_vehicle_controllers "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/VehicleManagement"
click node_vehicle_maintenance "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/VehicleMaintenanceManagement"
click node_vehicle_models "https://github.com/rparvz700/admin360/tree/main/app/Models"
click node_document_controllers "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/GenericDocumentManagement"
click node_document_models "https://github.com/rparvz700/admin360/tree/main/app/Models"
click node_ticket_controllers "https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/TicketManagement"
click node_invoice_controller "https://github.com/rparvz700/admin360/blob/main/app/Http/Controllers/InvoiceManagement/InvoiceController.php"
click node_storage_assets "https://github.com/rparvz700/admin360/tree/main/storage"
click node_migrations "https://github.com/rparvz700/admin360/tree/main/database/migrations"
click node_tests_auth "https://github.com/rparvz700/admin360/tree/main/tests/Feature/Auth"

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_routes_web,node_views_layouts,node_views_components,node_ticket_controllers,node_invoice_controller toneBlue
class node_routes_auth,node_auth_controllers,node_auth_requests,node_rbac_config,node_rbac_seeders,node_storage_assets,node_migrations,node_tests_auth toneAmber
class node_admin_controllers,node_admin_requests,node_admin_models toneMint
class node_facilities_controllers,node_facilities_models toneRose
class node_vehicle_controllers,node_vehicle_maintenance,node_vehicle_models toneIndigo
class node_document_controllers,node_document_models toneTeal
```

## Components

### Routing & UI

HTTP entry points and server-rendered presentation

- [Web routes](https://github.com/rparvz700/admin360/blob/main/routes/web.php): laravel routes · Primary browser entry routes · `routes/web.php`
- [Layouts](https://github.com/rparvz700/admin360/tree/main/resources/views/layouts): blade layouts · Shared page shells and navigation · `resources/views/layouts`
- [Components](https://github.com/rparvz700/admin360/tree/main/resources/views/components): blade components · Reusable UI primitives · `resources/views/components`

### Auth & Access

Authentication, profile lifecycle, and RBAC

- [Auth routes](https://github.com/rparvz700/admin360/blob/main/routes/auth.php): laravel routes · Authentication route definitions · `routes/auth.php`
- [Auth flow](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/Auth): auth controllers · Login, registration, password, and verification controllers · `app/Http/Controllers/Auth`
- [Auth requests](https://github.com/rparvz700/admin360/tree/main/app/Http/Requests/Auth): form requests · Validation for login and auth/profile updates · `app/Http/Requests/Auth`
- [RBAC config](https://github.com/rparvz700/admin360/blob/main/config/permission.php): permission config · Spatie roles and permissions configuration · `config/permission.php`
- [RBAC seeders](https://github.com/rparvz700/admin360/tree/main/database/seeders): seeders · Bootstrap roles, permissions, and super admin data · `database/seeders`

### Admin

Core master-data administration

- [Admin CRUD](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/Admin): admin controllers · Users, roles, departments, and subcenters · `app/Http/Controllers/Admin`
- [Admin requests](https://github.com/rparvz700/admin360/tree/main/app/Http/Requests): form requests · Store/update validation for admin master data · `app/Http/Requests`
- [Admin models](https://github.com/rparvz700/admin360/tree/main/app/Models): domain models · Users, roles-related entities, departments, and subcenters · `app/Models`

### Facilities

Buildings, rentals, deposits, and assets

- [Facilities](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/FacilitiesManagement): domain controllers · Buildings, floors, agreements, rent, deposits, and assets · `app/Http/Controllers/FacilitiesManagement`
- [Facility models](https://github.com/rparvz700/admin360/tree/main/app/Models): domain models · Property, agreement, rent, deposit, and asset records · `app/Models`

### Vehicles

Vehicle registry, documents, and maintenance

- [Vehicles](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/VehicleManagement): domain controllers · Vehicle registry, drivers, and vehicle document management · `app/Http/Controllers/VehicleManagement`
- [Maintenance](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/VehicleMaintenanceManagement): maintenance controllers · Logs, parts, vendors, and operational reports · `app/Http/Controllers/VehicleMaintenanceManagement`
- [Vehicle models](https://github.com/rparvz700/admin360/tree/main/app/Models): domain models · Vehicles, documents, logs, maintenance, parts, vendors, and types · `app/Models`

### Documents

Generic document metadata and dynamic forms

- [Document mgmt](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/GenericDocumentManagement): document controllers · Generic categories, attributes, and documents · `app/Http/Controllers/GenericDocumentManagement`
- [Document models](https://github.com/rparvz700/admin360/tree/main/app/Models): document models · Reusable category, attribute, and value schema · `app/Models`

### Workflows

Ticketing and invoicing subsystems

- [Tickets](https://github.com/rparvz700/admin360/tree/main/app/Http/Controllers/TicketManagement): workflow controllers · Ticket submission, admin triage, updates, and vehicle assignment · `app/Http/Controllers/TicketManagement`
- [Invoices](https://github.com/rparvz700/admin360/blob/main/app/Http/Controllers/InvoiceManagement/InvoiceController.php): invoice controller · Invoice lifecycle and CRUD views · `app/Http/Controllers/InvoiceManagement/InvoiceController.php`

### Platform

Persistence, shared assets, and tests

- [Storage & assets](https://github.com/rparvz700/admin360/tree/main/storage): runtime assets · Cached views, sessions, logs, uploads, and static JS/CSS · `storage`
- [Migrations](https://github.com/rparvz700/admin360/tree/main/database/migrations): schema migrations · Database tables for auth, RBAC, and each business domain · `database/migrations`
- [Auth tests](https://github.com/rparvz700/admin360/tree/main/tests/Feature/Auth): feature tests · Registration, login, password reset, email verification, and profile flows · `tests/Feature/Auth`

## Connections

- Web routes → Auth flow: dispatches · Web routes send requests into auth and application controllers
- Auth routes → Auth flow: dispatches · Dedicated auth routes map to the authentication lifecycle
- Web routes → Admin CRUD: dispatches · Admin routes expose CRUD entry points
- Web routes → Facilities: dispatches · Facilities routes serve the property and rental domain
- Web routes → Vehicles: dispatches · Vehicle routes serve registry and documents
- Web routes → Maintenance: dispatches · Maintenance routes serve logs and reports
- Web routes → Document mgmt: dispatches · Generic document routes handle metadata-driven forms
- Web routes → Tickets: dispatches · Ticket routes cover submission and admin oversight
- Web routes → Invoices: dispatches · Invoice routes expose billing CRUD
- Auth flow → Auth requests: validates with · Auth and profile inputs are validated through form requests
- Auth flow → Layouts: renders · Auth pages compose shared layout shells
- Auth flow → Components: uses · Auth UI reuses shared Blade components
- Auth flow → Auth tests: covered by · Authentication behavior is primarily exercised by feature tests
- Admin CRUD → Admin requests: validates with · Admin CRUD operations use dedicated store/update requests
- Admin CRUD → Admin models: persists · Admin CRUD reads and writes master-data models
- Admin CRUD → Layouts: renders · Admin screens use the shared application shell
- Facilities → Facility models: persists · Facilities controllers orchestrate property and rent entities
- Facilities → Layouts: renders · Facilities pages are server-rendered with shared layouts
- Vehicles → Vehicle models: persists · Vehicle controllers manage vehicles, drivers, and document records
- Maintenance → Vehicle models: analyzes · Maintenance features generate operational and cost reports from vehicle data
- Document mgmt → Document models: persists · Generic document controllers manage categories, attributes, and values
- Tickets → Vehicle models: links · Ticket workflows can assign or relate vehicles
- Invoices → Facility models: bills against · Invoices likely relate to property and agreement data
- RBAC config → Admin CRUD: gates · Roles and permissions restrict administrative access
- RBAC seeders → RBAC config: bootstraps · Seeders populate the RBAC tables defined by the permission package
- Migrations → Admin models: defines schema · Core tables underpin admin and user master data
- Migrations → Facility models: defines schema · Property, agreement, rent, deposit, and asset tables
- Migrations → Vehicle models: defines schema · Vehicle, document, maintenance, and log tables
- Migrations → Document models: defines schema · Generic document metadata tables
- Storage & assets → Layouts: serves · Shared runtime assets and compiled front-end support rendered views
