# shehzadbrohi/igfc architecture

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

- Interactive diagram: https://gitdiagram.com/shehzadbrohi/igfc
- Repository: https://github.com/shehzadbrohi/igfc

## Overview

Karsh Frex Logistic App is a role-based logistics web application for maintaining cargo/container forms and coordinating fleet resources and trips. The apparent user workflow is to sign in, register cargo or container details, manage units and their driver/trailer/container assignments, and maintain trips and trip legs; cargo forms can also be rendered as PDFs with barcode and QR-code identifiers. The excerpts show authentication, cargo-document generation, and container assignment behavior. Other domain areas are represented from the file tree; route-to-controller wiring and their detailed behavior were not sampled.

Main entry points: [`routes/web.php`](https://github.com/shehzadbrohi/igfc/blob/master/routes/web.php) (Web routes), [`app/Models`](https://github.com/shehzadbrohi/igfc/tree/master/app/Models) (Eloquent models), [`app/Http/Controllers/CargoFormController.php`](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/CargoFormController.php) (Cargo forms), [`app/Http/Controllers/ContainerFormController.php`](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/ContainerFormController.php) (Container forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and UI"]
  node_http["HTTP entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication"]
  node_authstore["User accounts"]
  node_views["Role-based pages<br/>[app.blade.php]"]
end

subgraph group_cargo["Cargo Documents"]
  node_cargoforms["Cargo forms"]
  node_containerforms["Container forms"]
  node_pdf["PDF labels"]
  node_containerpdf["Container PDF"]
  node_cargo_views["Cargo screens<br/>[index.blade.php]"]
  node_barcode["Barcode / QR libraries"]
end

subgraph group_fleet["Fleet Operations"]
  node_fleet["Fleet records"]
  node_resources["Drivers and trailers"]
  node_assignments["Resource assignments"]
  node_trips["Trips and legs<br/>[TripController.php]"]
end

subgraph group_records["Persistence"]
  node_models["Eloquent models"]
  node_database[("Application database<br/>[database.php]")]
end

node_user(("Admin / client / driver"))

node_user -->|"sends request"| node_http
node_http -->|"handles request"| node_bootstrap
node_bootstrap -->|"loads routes"| node_routes
node_routes -->|"dispatches auth"| node_auth
node_routes -->|"dispatches registration"| node_authstore
node_routes -->|"dispatches cargo"| node_cargoforms
node_routes -->|"dispatches container"| node_containerforms
node_routes -->|"dispatches fleet"| node_fleet
node_routes -->|"dispatches resources"| node_resources
node_routes -->|"dispatches assignments"| node_assignments
node_routes -->|"dispatches trips"| node_trips
node_auth -->|"renders login"| node_views
node_authstore -->|"creates user"| node_models
node_auth -->|"authenticates user"| node_models
node_cargoforms -->|"reads and writes"| node_models
node_containerforms -->|"reads and writes"| node_models
node_cargoforms -->|"renders screens"| node_cargo_views
node_containerforms -->|"renders form"| node_views
node_cargoforms -->|"generates label"| node_pdf
node_containerforms -->|"generates PDF"| node_containerpdf
node_pdf -->|"creates codes"| node_barcode
node_containerpdf -->|"creates codes"| node_barcode
node_fleet -->|"reads and writes"| node_models
node_resources -->|"reads and writes"| node_models
node_assignments -->|"updates assignments"| node_models
node_trips -->|"reads and writes"| node_models
node_models -->|"persists records"| node_database

click node_http "https://github.com/shehzadbrohi/igfc/blob/master/public/index.php"
click node_bootstrap "https://github.com/shehzadbrohi/igfc/blob/master/bootstrap/app.php"
click node_routes "https://github.com/shehzadbrohi/igfc/blob/master/routes/web.php"
click node_auth "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_authstore "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_views "https://github.com/shehzadbrohi/igfc/blob/master/resources/views/layouts/app.blade.php"
click node_cargoforms "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/CargoFormController.php"
click node_containerforms "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/ContainerFormController.php"
click node_pdf "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/CargoFormController.php"
click node_containerpdf "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/ContainerFormController.php"
click node_cargo_views "https://github.com/shehzadbrohi/igfc/blob/master/resources/views/cargoforms/index.blade.php"
click node_fleet "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/UnitHeadController.php"
click node_resources "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/DriverController.php"
click node_assignments "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/UnitContainerAssignmentController.php"
click node_trips "https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/TripController.php"
click node_models "https://github.com/shehzadbrohi/igfc/tree/master/app/Models"
click node_database "https://github.com/shehzadbrohi/igfc/blob/master/config/database.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_routes,node_auth,node_authstore,node_views,node_user toneBlue
class node_cargoforms,node_containerforms,node_pdf,node_containerpdf,node_cargo_views,node_barcode toneAmber
class node_fleet,node_resources,node_assignments,node_trips toneMint
class node_models,node_database toneRose
```

## Components

### Access and UI

- [HTTP entry](https://github.com/shehzadbrohi/igfc/blob/master/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/shehzadbrohi/igfc/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [Web routes](https://github.com/shehzadbrohi/igfc/blob/master/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [User accounts](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Role-based pages](https://github.com/shehzadbrohi/igfc/blob/master/resources/views/layouts/app.blade.php): `resources/views/layouts/app.blade.php`

### Cargo Documents

- [Cargo forms](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/CargoFormController.php): `app/Http/Controllers/CargoFormController.php`
- [Container forms](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/ContainerFormController.php): `app/Http/Controllers/ContainerFormController.php`
- [PDF labels](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/CargoFormController.php): `app/Http/Controllers/CargoFormController.php`
- [Container PDF](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/ContainerFormController.php): `app/Http/Controllers/ContainerFormController.php`
- [Cargo screens](https://github.com/shehzadbrohi/igfc/blob/master/resources/views/cargoforms/index.blade.php): `resources/views/cargoforms/index.blade.php`
- **Barcode / QR libraries**

### Fleet Operations

- [Fleet records](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/UnitHeadController.php): `app/Http/Controllers/UnitHeadController.php`
- [Drivers and trailers](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/DriverController.php): `app/Http/Controllers/DriverController.php`
- [Resource assignments](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/UnitContainerAssignmentController.php): `app/Http/Controllers/UnitContainerAssignmentController.php`
- [Trips and legs](https://github.com/shehzadbrohi/igfc/blob/master/app/Http/Controllers/TripController.php): `app/Http/Controllers/TripController.php`

### Persistence

- [Eloquent models](https://github.com/shehzadbrohi/igfc/tree/master/app/Models): `app/Models`
- [Application database](https://github.com/shehzadbrohi/igfc/blob/master/config/database.php): `config/database.php`

### Other components

- **Admin / client / driver**

## Connections

- Admin / client / driver → HTTP entry: sends request
- HTTP entry → App bootstrap: handles request
- App bootstrap → Web routes: loads routes
- Web routes → Authentication: dispatches auth
- Web routes → User accounts: dispatches registration
- Web routes → Cargo forms: dispatches cargo
- Web routes → Container forms: dispatches container
- Web routes → Fleet records: dispatches fleet
- Web routes → Drivers and trailers: dispatches resources
- Web routes → Resource assignments: dispatches assignments
- Web routes → Trips and legs: dispatches trips
- Authentication → Role-based pages: renders login
- User accounts → Eloquent models: creates user
- Authentication → Eloquent models: authenticates user
- Cargo forms → Eloquent models: reads and writes
- Container forms → Eloquent models: reads and writes
- Cargo forms → Cargo screens: renders screens
- Container forms → Role-based pages: renders form
- Cargo forms → PDF labels: generates label
- Container forms → Container PDF: generates PDF
- PDF labels → Barcode / QR libraries: creates codes
- Container PDF → Barcode / QR libraries: creates codes
- Fleet records → Eloquent models: reads and writes
- Drivers and trailers → Eloquent models: reads and writes
- Resource assignments → Eloquent models: updates assignments
- Trips and legs → Eloquent models: reads and writes
- Eloquent models → Application database: persists records
