# rasyiqecu/audrive-workshop architecture

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

- Interactive diagram: https://gitdiagram.com/rasyiqecu/audrive-workshop
- Repository: https://github.com/rasyiqecu/audrive-workshop

## Overview

AUDrive is a dealership and automotive workshop management application built with Laravel, with a Python/FastAPI microservice for engine-sound diagnostics. Customers can book workshop service, while workshop staff review bookings and manage repair work; diagnostic scans produce AI results that can be reviewed by a mechanic. The product also includes a car marketplace, spare-parts commerce, and dealership operations. The graph preserves these major capabilities, but source excerpts for most modules were unavailable, so many subsystem connections are intentionally omitted.

Main entry points: [`app/Http/Controllers/Workshop/ServiceBookingController.php`](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Workshop/ServiceBookingController.php) (Booking requests), [`app/Models/ServiceBooking.php`](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/ServiceBooking.php) (Service booking), [`ai-service/main.py`](https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/main.py) (Diagnostic API), [`app/Models/Customer.php`](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/Customer.php) (Customer records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workshop["Workshop service"]
  node_booking_controller["Booking requests"]
  node_booking_service["Booking service"]
  node_service_booking[("Service booking<br/>[ServiceBooking.php]")]
  node_vehicle[("Customer vehicle")]
  node_work_order[("Repair work order<br/>[WorkOrder.php]")]
end

subgraph group_diagnostics["AI diagnostics"]
  node_ai_client["AI scan entry"]
  node_scan_review["Scan review"]
  node_scan_record[("Scan record<br/>[AiScan.php]")]
  node_ai_api["Diagnostic API<br/>[main.py]"]
  node_audio_preprocess["Audio preprocessing<br/>[preprocessor.py]"]
  node_audio_predictor["Sound prediction<br/>[predictor.py]"]
  node_model_loader["Model loading<br/>[loader.py]"]
end

subgraph group_commerce["Marketplace commerce"]
  node_car_marketplace["Car marketplace"]
  node_car_inventory[("Car inventory<br/>[CarUnit.php]")]
  node_parts_catalog["Parts catalog"]
  node_parts_service["Parts service"]
  node_sales_orders[("Sales orders<br/>[SalesOrder.php]")]
end

subgraph group_operations["Dealership operations"]
  node_admin_operations["Admin operations"]
end

subgraph group_platform["Shared platform"]
  node_notifications["Notifications"]
  node_customer_record[("Customer records<br/>[Customer.php]")]
  node_user_record[("User accounts<br/>[User.php]")]
end

node_customer(("Customer"))
node_staff(("Workshop staff"))

node_customer -->|"requests service"| node_booking_controller
node_booking_controller -->|"delegates booking"| node_booking_service
node_booking_controller -->|"reads and creates"| node_service_booking
node_booking_controller -->|"loads vehicle"| node_vehicle
node_service_booking -->|"has work order"| node_work_order
node_service_booking -->|"belongs to"| node_vehicle
node_customer -.->|"submits scan"| node_ai_client
node_ai_client -.->|"requests diagnosis"| node_ai_api
node_ai_api -->|"preprocesses audio"| node_audio_preprocess
node_ai_api -->|"predicts sound"| node_audio_predictor
node_audio_predictor -->|"uses model"| node_model_loader
node_staff -->|"reviews diagnosis"| node_scan_review
node_scan_review -->|"updates review"| node_scan_record
node_car_marketplace -->|"queries listings"| node_car_inventory
node_parts_catalog -->|"delegates catalog"| node_parts_service
node_parts_catalog -.->|"uses customer"| node_customer_record
node_notifications -->|"selects recipients"| node_user_record
node_notifications -->|"notifies customer"| node_customer_record
node_customer_record -->|"owns vehicles"| node_vehicle

click node_booking_controller "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Workshop/ServiceBookingController.php"
click node_booking_service "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Services/ServiceBookingService.php"
click node_service_booking "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/ServiceBooking.php"
click node_vehicle "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/CustomerVehicle.php"
click node_work_order "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/WorkOrder.php"
click node_ai_client "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Customer/AiScanController.php"
click node_scan_review "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Admin/AiScanReviewController.php"
click node_scan_record "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/AiScan.php"
click node_ai_api "https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/main.py"
click node_audio_preprocess "https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/app/preprocessor.py"
click node_audio_predictor "https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/app/predictor.py"
click node_model_loader "https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/app/loader.py"
click node_car_marketplace "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Marketplace/CarListingController.php"
click node_car_inventory "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/CarUnit.php"
click node_parts_catalog "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/SparePart/CatalogController.php"
click node_parts_service "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Services/SparePartService.php"
click node_sales_orders "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/SalesOrder.php"
click node_admin_operations "https://github.com/rasyiqecu/audrive-workshop/tree/main/app/Http/Controllers/Admin"
click node_notifications "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Services/Notification/NotificationService.php"
click node_customer_record "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/Customer.php"
click node_user_record "https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/User.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_booking_controller,node_booking_service,node_service_booking,node_vehicle,node_work_order toneBlue
class node_ai_client,node_scan_review,node_scan_record,node_ai_api,node_audio_preprocess,node_audio_predictor,node_model_loader toneAmber
class node_car_marketplace,node_car_inventory,node_parts_catalog,node_parts_service,node_sales_orders toneMint
class node_admin_operations toneRose
class node_notifications,node_customer_record,node_user_record,node_customer,node_staff toneIndigo
```

## Components

### Workshop service

- [Booking requests](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Workshop/ServiceBookingController.php): `app/Http/Controllers/Workshop/ServiceBookingController.php`
- [Booking service](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Services/ServiceBookingService.php): `app/Services/ServiceBookingService.php`
- [Service booking](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/ServiceBooking.php): `app/Models/ServiceBooking.php`
- [Customer vehicle](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/CustomerVehicle.php): `app/Models/CustomerVehicle.php`
- [Repair work order](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/WorkOrder.php): `app/Models/WorkOrder.php`

### AI diagnostics

- [AI scan entry](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Customer/AiScanController.php): `app/Http/Controllers/Customer/AiScanController.php`
- [Scan review](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Admin/AiScanReviewController.php): `app/Http/Controllers/Admin/AiScanReviewController.php`
- [Scan record](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/AiScan.php): `app/Models/AiScan.php`
- [Diagnostic API](https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/main.py): `ai-service/main.py`
- [Audio preprocessing](https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/app/preprocessor.py): `ai-service/app/preprocessor.py`
- [Sound prediction](https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/app/predictor.py): `ai-service/app/predictor.py`
- [Model loading](https://github.com/rasyiqecu/audrive-workshop/blob/main/ai-service/app/loader.py): `ai-service/app/loader.py`

### Marketplace commerce

- [Car marketplace](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/Marketplace/CarListingController.php): `app/Http/Controllers/Marketplace/CarListingController.php`
- [Car inventory](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/CarUnit.php): `app/Models/CarUnit.php`
- [Parts catalog](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Http/Controllers/SparePart/CatalogController.php): `app/Http/Controllers/SparePart/CatalogController.php`
- [Parts service](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Services/SparePartService.php): `app/Services/SparePartService.php`
- [Sales orders](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/SalesOrder.php): `app/Models/SalesOrder.php`

### Dealership operations

- [Admin operations](https://github.com/rasyiqecu/audrive-workshop/tree/main/app/Http/Controllers/Admin): `app/Http/Controllers/Admin`

### Shared platform

- [Notifications](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Services/Notification/NotificationService.php): `app/Services/Notification/NotificationService.php`
- [Customer records](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/Customer.php): `app/Models/Customer.php`
- [User accounts](https://github.com/rasyiqecu/audrive-workshop/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **Customer**
- **Workshop staff**

## Connections

- Customer → Booking requests: requests service (evidence: `app/Http/Controllers/Workshop/ServiceBookingController.php`)
- Booking requests → Booking service: delegates booking (evidence: `app/Http/Controllers/Workshop/ServiceBookingController.php`)
- Booking requests → Service booking: reads and creates (evidence: `app/Http/Controllers/Workshop/ServiceBookingController.php`)
- Booking requests → Customer vehicle: loads vehicle (evidence: `app/Http/Controllers/Workshop/ServiceBookingController.php`)
- Service booking → Repair work order: has work order (evidence: `app/Models/ServiceBooking.php`)
- Service booking → Customer vehicle: belongs to (evidence: `app/Models/ServiceBooking.php`)
- Customer → AI scan entry: submits scan
- AI scan entry → Diagnostic API: requests diagnosis
- Diagnostic API → Audio preprocessing: preprocesses audio (evidence: `ai-service/main.py`)
- Diagnostic API → Sound prediction: predicts sound (evidence: `ai-service/main.py`)
- Sound prediction → Model loading: uses model (evidence: `ai-service/app/predictor.py`)
- Workshop staff → Scan review: reviews diagnosis (evidence: `app/Http/Controllers/Admin/AiScanReviewController.php`)
- Scan review → Scan record: updates review (evidence: `app/Http/Controllers/Admin/AiScanReviewController.php`)
- Car marketplace → Car inventory: queries listings (evidence: `app/Http/Controllers/Marketplace/CarListingController.php`)
- Parts catalog → Parts service: delegates catalog (evidence: `app/Http/Controllers/SparePart/CatalogController.php`)
- Parts catalog → Customer records: uses customer
- Notifications → User accounts: selects recipients (evidence: `app/Services/Notification/NotificationService.php`)
- Notifications → Customer records: notifies customer (evidence: `app/Services/Notification/NotificationService.php`)
- Customer records → Customer vehicle: owns vehicles (evidence: `app/Models/Customer.php`)
