# fnzh-i/mdt-mobile-integration architecture

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

- Interactive diagram: https://gitdiagram.com/fnzh-i/mdt-mobile-integration
- Repository: https://github.com/fnzh-i/mdt-mobile-integration

## Overview

Mobile Data Terminal is a Laravel-backed records and incident-management platform for civilian lookups and field-officer workflows, with role-based web dashboards and REST endpoints intended for mobile clients. The principal flow accepts a license or vehicle lookup, routes it through application controllers and services, and returns records from persistence; ticket workflows additionally create and manage violation citations. The graph preserves authentication, support, and administrative capabilities visible in the tree and README. Several links reflect sampled code; unsampled route and service wiring is intentionally not inferred.

Main entry points: [`routes/web.php`](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/routes/web.php) (Web routes), [`app/Core/Controllers/LicenseController.php`](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Core/Controllers/LicenseController.php) (License API), [`app/Http/Controllers/CreationManager.php`](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Http/Controllers/CreationManager.php) (Creation manager), [`app/Services/TicketService.php`](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/TicketService.php) (Ticket service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Clients and routing"]
  node_api["API routes<br/>[api.php]"]
  node_web["Web routes<br/>[web.php]"]
end

subgraph group_identity["Identity and access"]
  node_auth["Authentication"]
  node_roles["Role access<br/>[RoleMiddleware.php]"]
  node_userservice["User service<br/>[UserService.php]"]
end

subgraph group_records["Records and citations"]
  node_corelicense["License API"]
  node_license["License service<br/>[LicenseService.php]"]
  node_creation["Creation manager"]
  node_ticketservice["Ticket service<br/>[TicketService.php]"]
  node_vehicle["Vehicle service<br/>[VehicleService.php]"]
  node_support["Support tickets"]
end

subgraph group_presentation["User interfaces"]
  node_dashboard["Role dashboards"]
  node_lookup["Search screens"]
end

subgraph group_persistence["Persistence"]
  node_userrepo["User repository<br/>[UserRepository.php]"]
  node_licenserepo["License repository"]
  node_ticketrepo["Ticket repository"]
  node_vehiclerepo["Vehicle repository"]
  node_supportrepo["Support repository"]
  node_database[("MariaDB store")]
end

node_mobile(("Mobile client"))
node_webusers(("Web users"))

node_mobile -->|"requests"| node_api
node_webusers -->|"requests"| node_web
node_api -->|"dispatches"| node_corelicense
node_web -->|"dispatches"| node_auth
node_web -->|"checks roles"| node_roles
node_web -->|"dispatches"| node_creation
node_auth -->|"uses"| node_userservice
node_userservice -->|"queries"| node_userrepo
node_corelicense -->|"calls"| node_license
node_license -->|"queries"| node_licenserepo
node_creation -->|"calls"| node_ticketservice
node_ticketservice -->|"reads and writes"| node_ticketrepo
node_ticketservice -->|"looks up license"| node_licenserepo
node_creation -->|"calls"| node_vehicle
node_vehicle -->|"queries"| node_vehiclerepo
node_web -->|"dispatches"| node_support
node_support -->|"queries"| node_supportrepo
node_corelicense -->|"returns results"| node_lookup
node_web -->|"renders"| node_dashboard
node_licenserepo -->|"reads and writes"| node_database
node_ticketrepo -->|"reads and writes"| node_database
node_vehiclerepo -->|"reads and writes"| node_database
node_userrepo -->|"reads and writes"| node_database
node_supportrepo -->|"reads and writes"| node_database

click node_api "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/routes/api.php"
click node_web "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/routes/web.php"
click node_auth "https://github.com/fnzh-i/mdt-mobile-integration/tree/main/app/Http/Controllers/Auth"
click node_roles "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Http/Middleware/RoleMiddleware.php"
click node_userservice "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/UserService.php"
click node_userrepo "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/UserRepository.php"
click node_corelicense "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Core/Controllers/LicenseController.php"
click node_license "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/LicenseService.php"
click node_licenserepo "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/LicenseRepository.php"
click node_creation "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Http/Controllers/CreationManager.php"
click node_ticketservice "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/TicketService.php"
click node_ticketrepo "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/TicketRepository.php"
click node_vehicle "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/VehicleService.php"
click node_vehiclerepo "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/VehicleRepository.php"
click node_support "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/SupportTicketService.php"
click node_supportrepo "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/SupportTicketRepository.php"
click node_dashboard "https://github.com/fnzh-i/mdt-mobile-integration/tree/main/resources/views"
click node_lookup "https://github.com/fnzh-i/mdt-mobile-integration/blob/main/resources/views/license-search.blade.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_api,node_web,node_mobile,node_webusers toneBlue
class node_auth,node_roles,node_userservice toneAmber
class node_corelicense,node_license,node_creation,node_ticketservice,node_vehicle,node_support toneMint
class node_dashboard,node_lookup toneRose
class node_userrepo,node_licenserepo,node_ticketrepo,node_vehiclerepo,node_supportrepo,node_database toneIndigo
```

## Components

### Clients and routing

- [API routes](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/routes/api.php): `routes/api.php`
- [Web routes](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/routes/web.php): `routes/web.php`

### Identity and access

- [Authentication](https://github.com/fnzh-i/mdt-mobile-integration/tree/main/app/Http/Controllers/Auth): `app/Http/Controllers/Auth`
- [Role access](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Http/Middleware/RoleMiddleware.php): `app/Http/Middleware/RoleMiddleware.php`
- [User service](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/UserService.php): `app/Services/UserService.php`

### Records and citations

- [License API](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Core/Controllers/LicenseController.php): `app/Core/Controllers/LicenseController.php`
- [License service](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/LicenseService.php): `app/Services/LicenseService.php`
- [Creation manager](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Http/Controllers/CreationManager.php): `app/Http/Controllers/CreationManager.php`
- [Ticket service](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/TicketService.php): `app/Services/TicketService.php`
- [Vehicle service](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/VehicleService.php): `app/Services/VehicleService.php`
- [Support tickets](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Services/SupportTicketService.php): `app/Services/SupportTicketService.php`

### User interfaces

- [Role dashboards](https://github.com/fnzh-i/mdt-mobile-integration/tree/main/resources/views): `resources/views`
- [Search screens](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/resources/views/license-search.blade.php): `resources/views/license-search.blade.php`

### Persistence

- [User repository](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/UserRepository.php): `app/Repositories/UserRepository.php`
- [License repository](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/LicenseRepository.php): `app/Repositories/LicenseRepository.php`
- [Ticket repository](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/TicketRepository.php): `app/Repositories/TicketRepository.php`
- [Vehicle repository](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/VehicleRepository.php): `app/Repositories/VehicleRepository.php`
- [Support repository](https://github.com/fnzh-i/mdt-mobile-integration/blob/main/app/Repositories/SupportTicketRepository.php): `app/Repositories/SupportTicketRepository.php`
- **MariaDB store**

### Other components

- **Mobile client**
- **Web users**

## Connections

- Mobile client → API routes: requests
- Web users → Web routes: requests
- API routes → License API: dispatches
- Web routes → Authentication: dispatches
- Web routes → Role access: checks roles
- Web routes → Creation manager: dispatches
- Authentication → User service: uses
- User service → User repository: queries
- License API → License service: calls
- License service → License repository: queries
- Creation manager → Ticket service: calls
- Ticket service → Ticket repository: reads and writes
- Ticket service → License repository: looks up license
- Creation manager → Vehicle service: calls
- Vehicle service → Vehicle repository: queries
- Web routes → Support tickets: dispatches
- Support tickets → Support repository: queries
- License API → Search screens: returns results
- Web routes → Role dashboards: renders
- License repository → MariaDB store: reads and writes
- Ticket repository → MariaDB store: reads and writes
- Vehicle repository → MariaDB store: reads and writes
- User repository → MariaDB store: reads and writes
- Support repository → MariaDB store: reads and writes
