# bigst3pper/smart_parking_system architecture

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

- Interactive diagram: https://gitdiagram.com/bigst3pper/smart_parking_system
- Repository: https://github.com/bigst3pper/smart_parking_system

## Overview

ParkSmart is a Laravel parking-reservation application. A user registers or signs in, browses available slots, books one, tracks elapsed time and cost, then ends the reservation and completes simulated pay-on-exit; reservation completion releases the slot. Admin capabilities include slot, reservation, user, and report management, though the README describes them as incomplete. The graph emphasizes documented workflows and sampled controller/model calls; several route files and admin components were not sampled, so their connections are not inferred.

Main entry points: [`app/Models/User.php`](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/User.php) (User accounts), [`app/Models/Reservation.php`](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Reservation.php) (Reservations), [`app/Models/ParkingSlot.php`](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/ParkingSlot.php) (Parking slots), [`app/Http/Controllers/Admin/ReservationController.php`](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ReservationController.php) (Reservation management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry and identity"]
  node_public_entry["Laravel entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_registration["Registration"]
  node_login["Session login"]
  node_email_verify["Email verification"]
end

subgraph group_parking["Parking and reservations"]
  node_slot_browse["Slot browsing<br/>[SlotController.php]"]
  node_user_reservation["Booking and checkout"]
  node_payment_controller["Payment handling"]
end

subgraph group_records["Domain records"]
  node_user_model[("User accounts<br/>[User.php]")]
  node_slot_model[("Parking slots<br/>[ParkingSlot.php]")]
  node_reservation_model[("Reservations<br/>[Reservation.php]")]
  node_payment_model[("Payment records<br/>[Payment.php]")]
  node_vehicle_model[("Vehicles<br/>[Vehicle.php]")]
  node_rating_model[("Service ratings<br/>[ServiceRating.php]")]
end

subgraph group_admin["Administration"]
  node_slot_admin["Slot management"]
  node_admin_reservation["Reservation management"]
  node_admin_reports["Reports"]
  node_admin_users["User management<br/>[UserController.php]"]
end

node_visitor(("User"))

node_public_entry -->|"loads app"| node_bootstrap
node_bootstrap -->|"registers routes"| node_auth_routes
node_visitor -->|"registers"| node_registration
node_auth_routes -->|"routes to"| node_registration
node_auth_routes -->|"routes to"| node_login
node_auth_routes -->|"routes to"| node_email_verify
node_registration -->|"creates account"| node_user_model
node_visitor -->|"browses slots"| node_slot_browse
node_slot_browse -->|"queries slots"| node_slot_model
node_visitor -->|"books slot"| node_user_reservation
node_user_reservation -->|"reads and updates"| node_reservation_model
node_user_reservation -->|"releases slot"| node_slot_model
node_user_reservation -.->|"uses payment record"| node_payment_model
node_visitor -->|"pays on exit"| node_payment_controller
node_slot_admin -->|"manages slots"| node_slot_model
node_admin_reservation -->|"creates and updates"| node_reservation_model
node_admin_reservation -->|"updates occupancy"| node_slot_model
node_admin_reservation -->|"finds or creates"| node_user_model
node_admin_reservation -->|"finds or creates"| node_vehicle_model
node_admin_reports -->|"reports on"| node_reservation_model
node_admin_reports -->|"reports on"| node_slot_model
node_admin_reports -->|"reports on"| node_user_model
node_admin_reports -->|"reports on"| node_vehicle_model
node_admin_users -.->|"manages users"| node_user_model
node_reservation_model -->|"belongs to"| node_user_model
node_reservation_model -->|"belongs to"| node_slot_model
node_reservation_model -->|"belongs to"| node_vehicle_model
node_reservation_model -->|"has payment"| node_payment_model
node_user_model -->|"has vehicles"| node_vehicle_model
node_user_model -->|"has reservations"| node_reservation_model
node_user_model -->|"has payments"| node_payment_model
node_slot_model -->|"has ratings"| node_rating_model
node_rating_model -->|"belongs to"| node_user_model
node_rating_model -->|"belongs to"| node_slot_model

click node_public_entry "https://github.com/bigst3pper/smart_parking_system/blob/main/public/index.php"
click node_bootstrap "https://github.com/bigst3pper/smart_parking_system/blob/main/bootstrap/app.php"
click node_auth_routes "https://github.com/bigst3pper/smart_parking_system/blob/main/routes/auth.php"
click node_registration "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_login "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_email_verify "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php"
click node_slot_browse "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/User/SlotController.php"
click node_user_reservation "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/User/ReservationController.php"
click node_payment_controller "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/User/PaymentController.php"
click node_slot_admin "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ParkingSlotController.php"
click node_admin_reservation "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ReservationController.php"
click node_admin_reports "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ReportController.php"
click node_admin_users "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/UserController.php"
click node_user_model "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/User.php"
click node_slot_model "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/ParkingSlot.php"
click node_reservation_model "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Reservation.php"
click node_payment_model "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Payment.php"
click node_vehicle_model "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Vehicle.php"
click node_rating_model "https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/ServiceRating.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_public_entry,node_bootstrap,node_auth_routes,node_registration,node_login,node_email_verify,node_visitor toneBlue
class node_slot_browse,node_user_reservation,node_payment_controller toneAmber
class node_user_model,node_slot_model,node_reservation_model,node_payment_model,node_vehicle_model,node_rating_model toneMint
class node_slot_admin,node_admin_reservation,node_admin_reports,node_admin_users toneRose
```

## Components

### Web entry and identity

- [Laravel entry](https://github.com/bigst3pper/smart_parking_system/blob/main/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/bigst3pper/smart_parking_system/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Auth routes](https://github.com/bigst3pper/smart_parking_system/blob/main/routes/auth.php): `routes/auth.php`
- [Registration](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Session login](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Email verification](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php): `app/Http/Controllers/Auth/VerifyEmailController.php`

### Parking and reservations

- [Slot browsing](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/User/SlotController.php): `app/Http/Controllers/User/SlotController.php`
- [Booking and checkout](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/User/ReservationController.php): `app/Http/Controllers/User/ReservationController.php`
- [Payment handling](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/User/PaymentController.php): `app/Http/Controllers/User/PaymentController.php`

### Domain records

- [User accounts](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/User.php): `app/Models/User.php`
- [Parking slots](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/ParkingSlot.php): `app/Models/ParkingSlot.php`
- [Reservations](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Reservation.php): `app/Models/Reservation.php`
- [Payment records](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Payment.php): `app/Models/Payment.php`
- [Vehicles](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/Vehicle.php): `app/Models/Vehicle.php`
- [Service ratings](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Models/ServiceRating.php): `app/Models/ServiceRating.php`

### Administration

- [Slot management](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ParkingSlotController.php): `app/Http/Controllers/Admin/ParkingSlotController.php`
- [Reservation management](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ReservationController.php): `app/Http/Controllers/Admin/ReservationController.php`
- [Reports](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/ReportController.php): `app/Http/Controllers/Admin/ReportController.php`
- [User management](https://github.com/bigst3pper/smart_parking_system/blob/main/app/Http/Controllers/Admin/UserController.php): `app/Http/Controllers/Admin/UserController.php`

### Other components

- **User**

## Connections

- Laravel entry → App bootstrap: loads app (evidence: `public/index.php`)
- App bootstrap → Auth routes: registers routes (evidence: `bootstrap/app.php`)
- User → Registration: registers
- Auth routes → Registration: routes to (evidence: `routes/auth.php`)
- Auth routes → Session login: routes to (evidence: `routes/auth.php`)
- Auth routes → Email verification: routes to (evidence: `routes/auth.php`)
- Registration → User accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- User → Slot browsing: browses slots (evidence: `README.md`)
- Slot browsing → Parking slots: queries slots (evidence: `app/Http/Controllers/User/SlotController.php`)
- User → Booking and checkout: books slot (evidence: `README.md`)
- Booking and checkout → Reservations: reads and updates (evidence: `app/Http/Controllers/User/ReservationController.php`)
- Booking and checkout → Parking slots: releases slot (evidence: `app/Http/Controllers/User/ReservationController.php`)
- Booking and checkout → Payment records: uses payment record (evidence: `app/Http/Controllers/User/ReservationController.php`)
- User → Payment handling: pays on exit (evidence: `README.md`)
- Slot management → Parking slots: manages slots (evidence: `app/Http/Controllers/Admin/ParkingSlotController.php`)
- Reservation management → Reservations: creates and updates (evidence: `app/Http/Controllers/Admin/ReservationController.php`)
- Reservation management → Parking slots: updates occupancy (evidence: `app/Http/Controllers/Admin/ReservationController.php`)
- Reservation management → User accounts: finds or creates (evidence: `app/Http/Controllers/Admin/ReservationController.php`)
- Reservation management → Vehicles: finds or creates (evidence: `app/Http/Controllers/Admin/ReservationController.php`)
- Reports → Reservations: reports on (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Reports → Parking slots: reports on (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Reports → User accounts: reports on (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- Reports → Vehicles: reports on (evidence: `app/Http/Controllers/Admin/ReportController.php`)
- User management → User accounts: manages users
- Reservations → User accounts: belongs to (evidence: `app/Models/Reservation.php`)
- Reservations → Parking slots: belongs to (evidence: `app/Models/Reservation.php`)
- Reservations → Vehicles: belongs to (evidence: `app/Models/Reservation.php`)
- Reservations → Payment records: has payment (evidence: `app/Models/Reservation.php`)
- User accounts → Vehicles: has vehicles (evidence: `app/Models/User.php`)
- User accounts → Reservations: has reservations (evidence: `app/Models/User.php`)
- User accounts → Payment records: has payments (evidence: `app/Models/User.php`)
- Parking slots → Service ratings: has ratings (evidence: `app/Models/ParkingSlot.php`)
- Service ratings → User accounts: belongs to (evidence: `app/Models/ServiceRating.php`)
- Service ratings → Parking slots: belongs to (evidence: `app/Models/ServiceRating.php`)
