# faizalfc/tareeqk_portal architecture

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

- Interactive diagram: https://gitdiagram.com/faizalfc/tareeqk_portal
- Repository: https://github.com/faizalfc/tareeqk_portal

## Overview

Tareeqk combines a Laravel API, a customer-facing React web app, and an Expo driver app. The web app routes customers and web-based drivers through account, home, and service screens; the API implements authentication and towing-request operations. The mobile app is a separate demo: the README says its login, registration, and sample request use hard-coded data, with no live API calls. Source excerpts show the web driver service calling request endpoints, but do not show the API route declarations or most customer-screen behavior.

Main entry points: [`Frontend-customer/reactapp-customer/src/App.js`](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/App.js) (Web Router), [`Frontend-customer/reactapp-customer/src/pages/common.js`](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/common.js) (API Base URL), [`Backend/towing-api/app/Http/Controllers/RequestController.php`](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/RequestController.php) (Request Operations), [`Backend/towing-api/app/Providers/RouteServiceProvider.php`](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Providers/RouteServiceProvider.php) (Laravel API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Customer Web"]
  node_webapp["Web Router<br/>[App.js]"]
  node_type["User Type"]
  node_customerregister["Customer Register<br/>[Register.js]"]
  node_customerlogin["Customer Login<br/>[Login.js]"]
  node_customerhome["Customer Home<br/>[Home.js]"]
  node_driverloginweb["Web Driver Login<br/>[DriverLogin.js]"]
  node_driverregisterweb["Web Driver Register<br/>[DriverRegister.js]"]
  node_driverservice["Driver Service<br/>[DriverService.js]"]
  node_baseurl["API Base URL<br/>[common.js]"]
end

subgraph group_api["Laravel API"]
  node_api["Laravel API"]
  node_customerauth["Customer Auth"]
  node_driverauth["Driver Auth"]
  node_requestcontroller["Request Operations"]
  node_basecontroller["Controller Base<br/>[Controller.php]"]
end

subgraph group_mobile["Driver Mobile"]
  node_mobileapp["Mobile Navigator<br/>[App.js]"]
  node_mobilelogin["Demo Login<br/>[LoginScreen.js]"]
  node_mobileregister["Demo Register<br/>[RegisterScreen.js]"]
  node_mobilehome["Demo Request Home<br/>[HomeScreen.js]"]
end

subgraph group_domain["API Domain"]
  node_customerdata["Customer Model<br/>[Customer.php]"]
  node_driverdata["Driver Model<br/>[Driver.php]"]
  node_userdata["User Model<br/>[User.php]"]
  node_requestdata["Towing Request Model<br/>[Request.php]"]
end

node_customer(("Customer"))
node_driver(("Driver"))

node_customer -->|"uses"| node_webapp
node_driver -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_type
node_webapp -->|"routes to"| node_customerregister
node_webapp -->|"routes to"| node_customerlogin
node_webapp -->|"routes to"| node_customerhome
node_webapp -->|"routes to"| node_driverloginweb
node_webapp -->|"routes to"| node_driverregisterweb
node_webapp -->|"routes to"| node_driverservice
node_customerregister -->|"imports"| node_baseurl
node_customerlogin -->|"imports"| node_baseurl
node_customerhome -->|"imports"| node_baseurl
node_driverloginweb -->|"imports"| node_baseurl
node_driverregisterweb -->|"imports"| node_baseurl
node_driverservice -->|"configures API"| node_baseurl
node_driverservice -->|"requests/status updates"| node_requestcontroller
node_api -.->|"dispatches routes"| node_customerauth
node_api -.->|"dispatches routes"| node_driverauth
node_api -.->|"dispatches routes"| node_requestcontroller
node_customerauth -->|"uses"| node_customerdata
node_customerauth -->|"uses"| node_requestdata
node_driverauth -->|"creates/authenticates"| node_driverdata
node_requestcontroller -->|"creates and updates"| node_requestdata
node_customerdata -->|"extends"| node_userdata
node_driverdata -->|"extends"| node_userdata
node_requestcontroller -.->|"extends"| node_basecontroller
node_mobileapp -->|"navigates to"| node_mobilelogin
node_mobileapp -->|"navigates to"| node_mobileregister
node_mobileapp -->|"starts at"| node_mobilehome

click node_webapp "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/App.js"
click node_type "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/UserTypeSelection.js"
click node_customerregister "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/Register.js"
click node_customerlogin "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/login/Login.js"
click node_customerhome "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/home/Home.js"
click node_driverloginweb "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/driver/DriverLogin.js"
click node_driverregisterweb "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/driver/DriverRegister.js"
click node_driverservice "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/driver/DriverService.js"
click node_baseurl "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/common.js"
click node_api "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Providers/RouteServiceProvider.php"
click node_customerauth "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/CustomerAuthController.php"
click node_driverauth "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/DriverAuthController.php"
click node_requestcontroller "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/RequestController.php"
click node_basecontroller "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/Controller.php"
click node_customerdata "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/Customer.php"
click node_driverdata "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/Driver.php"
click node_userdata "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/User.php"
click node_requestdata "https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/Request.php"
click node_mobileapp "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/App.js"
click node_mobilelogin "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/screens/LoginScreen.js"
click node_mobileregister "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/screens/RegisterScreen.js"
click node_mobilehome "https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/screens/HomeScreen.js"

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_webapp,node_type,node_customerregister,node_customerlogin,node_customerhome,node_driverloginweb,node_driverregisterweb,node_driverservice,node_baseurl toneBlue
class node_api,node_customerauth,node_driverauth,node_requestcontroller,node_basecontroller toneAmber
class node_mobileapp,node_mobilelogin,node_mobileregister,node_mobilehome toneMint
class node_customerdata,node_driverdata,node_userdata,node_requestdata toneRose
class node_customer,node_driver toneIndigo
```

## Components

### Customer Web

- [Web Router](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/App.js): `Frontend-customer/reactapp-customer/src/App.js`
- [User Type](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/UserTypeSelection.js): `Frontend-customer/reactapp-customer/src/pages/UserTypeSelection.js`
- [Customer Register](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/Register.js): `Frontend-customer/reactapp-customer/src/pages/Register.js`
- [Customer Login](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/login/Login.js): `Frontend-customer/reactapp-customer/src/pages/login/Login.js`
- [Customer Home](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/home/Home.js): `Frontend-customer/reactapp-customer/src/pages/home/Home.js`
- [Web Driver Login](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/driver/DriverLogin.js): `Frontend-customer/reactapp-customer/src/pages/driver/DriverLogin.js`
- [Web Driver Register](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/driver/DriverRegister.js): `Frontend-customer/reactapp-customer/src/pages/driver/DriverRegister.js`
- [Driver Service](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/driver/DriverService.js): `Frontend-customer/reactapp-customer/src/pages/driver/DriverService.js`
- [API Base URL](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-customer/reactapp-customer/src/pages/common.js): `Frontend-customer/reactapp-customer/src/pages/common.js`

### Laravel API

- [Laravel API](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Providers/RouteServiceProvider.php): `Backend/towing-api/app/Providers/RouteServiceProvider.php`
- [Customer Auth](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/CustomerAuthController.php): `Backend/towing-api/app/Http/Controllers/CustomerAuthController.php`
- [Driver Auth](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/DriverAuthController.php): `Backend/towing-api/app/Http/Controllers/DriverAuthController.php`
- [Request Operations](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/RequestController.php): `Backend/towing-api/app/Http/Controllers/RequestController.php`
- [Controller Base](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Http/Controllers/Controller.php): `Backend/towing-api/app/Http/Controllers/Controller.php`

### Driver Mobile

- [Mobile Navigator](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/App.js): `Frontend-driver/Tow-Driver/App.js`
- [Demo Login](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/screens/LoginScreen.js): `Frontend-driver/Tow-Driver/screens/LoginScreen.js`
- [Demo Register](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/screens/RegisterScreen.js): `Frontend-driver/Tow-Driver/screens/RegisterScreen.js`
- [Demo Request Home](https://github.com/faizalfc/tareeqk_portal/blob/main/Frontend-driver/Tow-Driver/screens/HomeScreen.js): `Frontend-driver/Tow-Driver/screens/HomeScreen.js`

### API Domain

- [Customer Model](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/Customer.php): `Backend/towing-api/app/Models/Customer.php`
- [Driver Model](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/Driver.php): `Backend/towing-api/app/Models/Driver.php`
- [User Model](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/User.php): `Backend/towing-api/app/Models/User.php`
- [Towing Request Model](https://github.com/faizalfc/tareeqk_portal/blob/main/Backend/towing-api/app/Models/Request.php): `Backend/towing-api/app/Models/Request.php`

### Other components

- **Customer**
- **Driver**

## Connections

- Customer → Web Router: uses (evidence: `README.md`)
- Driver → Web Router: uses (evidence: `README.md`)
- Web Router → User Type: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Web Router → Customer Register: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Web Router → Customer Login: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Web Router → Customer Home: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Web Router → Web Driver Login: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Web Router → Web Driver Register: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Web Router → Driver Service: routes to (evidence: `Frontend-customer/reactapp-customer/src/App.js`)
- Customer Register → API Base URL: imports (evidence: `Frontend-customer/reactapp-customer/src/pages/Register.js`)
- Customer Login → API Base URL: imports (evidence: `Frontend-customer/reactapp-customer/src/pages/login/Login.js`)
- Customer Home → API Base URL: imports (evidence: `Frontend-customer/reactapp-customer/src/pages/home/Home.js`)
- Web Driver Login → API Base URL: imports (evidence: `Frontend-customer/reactapp-customer/src/pages/driver/DriverLogin.js`)
- Web Driver Register → API Base URL: imports (evidence: `Frontend-customer/reactapp-customer/src/pages/driver/DriverRegister.js`)
- Driver Service → API Base URL: configures API (evidence: `Frontend-customer/reactapp-customer/src/pages/driver/DriverService.js`)
- Driver Service → Request Operations: requests/status updates (evidence: `Frontend-customer/reactapp-customer/src/pages/driver/DriverService.js`)
- Laravel API → Customer Auth: dispatches routes
- Laravel API → Driver Auth: dispatches routes
- Laravel API → Request Operations: dispatches routes
- Customer Auth → Customer Model: uses (evidence: `Backend/towing-api/app/Http/Controllers/CustomerAuthController.php`)
- Customer Auth → Towing Request Model: uses (evidence: `Backend/towing-api/app/Http/Controllers/CustomerAuthController.php`)
- Driver Auth → Driver Model: creates/authenticates (evidence: `Backend/towing-api/app/Http/Controllers/DriverAuthController.php`)
- Request Operations → Towing Request Model: creates and updates (evidence: `Backend/towing-api/app/Http/Controllers/RequestController.php`)
- Customer Model → User Model: extends (evidence: `Backend/towing-api/app/Models/Customer.php`)
- Driver Model → User Model: extends (evidence: `Backend/towing-api/app/Models/Driver.php`)
- Request Operations → Controller Base: extends (evidence: `Backend/towing-api/app/Http/Controllers/RequestController.php`)
- Mobile Navigator → Demo Login: navigates to (evidence: `Frontend-driver/Tow-Driver/App.js`)
- Mobile Navigator → Demo Register: navigates to (evidence: `Frontend-driver/Tow-Driver/App.js`)
- Mobile Navigator → Demo Request Home: starts at (evidence: `Frontend-driver/Tow-Driver/App.js`)
