# rhellokitty/bookingkosan architecture

> Architecture diagram of the GitHub repository rhellokitty/bookingkosan, 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/rhellokitty/bookingkosan
- Repository: https://github.com/rhellokitty/bookingkosan

## Overview

BookingKosan is a Laravel boarding-house discovery and reservation application, with a separate bill-payment API and a Filament administration panel. The customer flow searches and views properties, collects booking and customer details, saves a transaction, and redirects to Midtrans; customers can later look up a booking. Payment notifications update transaction or bill state, and the legacy transaction callback can send WhatsApp confirmation. Controller and service excerpts establish the main calls; routes and several subsystems were not sampled, so their wiring is not inferred.

Main entry points: [`app/Http/Controllers/BookingController.php`](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/BookingController.php) (Booking flow), [`app/Services/Payments/PaymentWebhookHandler.php`](https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentWebhookHandler.php) (Payment webhook handler), [`app/Http/Controllers/BoardingHouseController.php`](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/BoardingHouseController.php) (Property browsing), [`app/Repositories/TransactionRepository.php`](https://github.com/rhellokitty/bookingkosan/blob/main/app/Repositories/TransactionRepository.php) (Transaction repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Property discovery"]
  node_property_controller["Property browsing"]
  node_home_controller["Home page<br/>[HomeController.php]"]
  node_property_views["Property pages"]
  node_home_view["Home view<br/>[home.blade.php]"]
  node_property_repo["Property queries"]
  node_category_city["Category and city"]
  node_category_city_views["Category and city pages<br/>[show.blade.php]"]
end

subgraph group_booking["Booking workflow"]
  node_booking_controller["Booking flow"]
  node_booking_views["Booking pages"]
  node_booking_requests["Booking validation"]
  node_transaction_repo["Transaction repository"]
  node_transaction_model["Booking transactions<br/>[Transaction.php]"]
  node_session[("Session store")]
end

subgraph group_payments["Payments"]
  node_legacy_callback["Transaction callback"]
  node_bill_api["Bill payment API"]
  node_payment_service["Payment service<br/>[PaymentService.php]"]
  node_webhook_handler["Payment webhook handler"]
  node_status_mapper["Status mapping"]
  node_bill_payment["Bill settlement"]
  node_payment_transaction["Payment attempts"]
  node_webhook_log["Webhook logs"]
  node_bill_model["Bills<br/>[Bill.php]"]
end

subgraph group_admin["Administration"]
  node_filament_resources["Filament resources"]
  node_admin_widgets["Admin dashboard"]
end

node_customer(("Customer"))
node_midtrans["Midtrans"]
node_twilio["Twilio WhatsApp"]
node_admin(("Admin user"))

node_customer -->|"browses"| node_property_controller
node_property_controller -->|"queries"| node_property_repo
node_property_controller -->|"loads filters"| node_category_city
node_property_controller -->|"renders"| node_property_views
node_home_controller -->|"renders"| node_home_view
node_category_city -->|"renders"| node_category_city_views
node_customer -->|"books"| node_booking_controller
node_booking_controller -->|"saves and reads"| node_transaction_repo
node_booking_controller -->|"loads property"| node_property_repo
node_booking_controller -->|"validates"| node_booking_requests
node_booking_controller -->|"renders"| node_booking_views
node_transaction_repo -->|"reads and writes"| node_session
node_transaction_repo -->|"creates and queries"| node_transaction_model
node_booking_controller -->|"creates payment"| node_midtrans
node_midtrans -->|"redirects back"| node_booking_controller
node_midtrans -->|"notifies"| node_legacy_callback
node_legacy_callback -->|"updates status"| node_transaction_model
node_legacy_callback -.->|"sends WhatsApp"| node_twilio
node_customer -->|"requests bill payment"| node_bill_api
node_bill_api -->|"initiates payment"| node_payment_service
node_bill_api -->|"loads bill"| node_bill_model
node_webhook_handler -->|"maps status"| node_status_mapper
node_webhook_handler -->|"reads and updates"| node_payment_transaction
node_webhook_handler -->|"records notification"| node_webhook_log
node_webhook_handler -->|"settles bill"| node_bill_payment
node_bill_payment -->|"marks paid"| node_bill_model
node_admin -->|"manages records"| node_filament_resources
node_admin -->|"views dashboard"| node_admin_widgets

click node_property_controller "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/BoardingHouseController.php"
click node_home_controller "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/HomeController.php"
click node_property_views "https://github.com/rhellokitty/bookingkosan/tree/main/resources/views/pages/boarding-house"
click node_home_view "https://github.com/rhellokitty/bookingkosan/blob/main/resources/views/pages/home.blade.php"
click node_property_repo "https://github.com/rhellokitty/bookingkosan/blob/main/app/Repositories/BoardingHouseRepository.php"
click node_category_city "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/CategoryController.php"
click node_category_city_views "https://github.com/rhellokitty/bookingkosan/blob/main/resources/views/pages/category/show.blade.php"
click node_booking_controller "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/BookingController.php"
click node_booking_views "https://github.com/rhellokitty/bookingkosan/tree/main/resources/views/pages/booking"
click node_booking_requests "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Requests/CustomerInformationStoreRequest.php"
click node_transaction_repo "https://github.com/rhellokitty/bookingkosan/blob/main/app/Repositories/TransactionRepository.php"
click node_transaction_model "https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/Transaction.php"
click node_legacy_callback "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/Api/MidtransController.php"
click node_bill_api "https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/Api/BillPaymentController.php"
click node_payment_service "https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentService.php"
click node_webhook_handler "https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentWebhookHandler.php"
click node_status_mapper "https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentStatusMapper.php"
click node_bill_payment "https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/BillPaymentService.php"
click node_payment_transaction "https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/PaymentTransaction.php"
click node_webhook_log "https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/PaymentWebhookLog.php"
click node_bill_model "https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/Bill.php"
click node_filament_resources "https://github.com/rhellokitty/bookingkosan/tree/main/app/Filament/Resources"
click node_admin_widgets "https://github.com/rhellokitty/bookingkosan/tree/main/app/Filament/Widgets"

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_property_controller,node_home_controller,node_property_views,node_home_view,node_property_repo,node_category_city,node_category_city_views,node_admin toneBlue
class node_booking_controller,node_booking_views,node_booking_requests,node_transaction_repo,node_transaction_model,node_session toneAmber
class node_legacy_callback,node_bill_api,node_payment_service,node_webhook_handler,node_status_mapper,node_bill_payment,node_payment_transaction,node_webhook_log,node_bill_model toneMint
class node_filament_resources,node_admin_widgets toneRose
class node_customer,node_midtrans,node_twilio toneIndigo
```

## Components

### Property discovery

- [Property browsing](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/BoardingHouseController.php): `app/Http/Controllers/BoardingHouseController.php`
- [Home page](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`
- [Property pages](https://github.com/rhellokitty/bookingkosan/tree/main/resources/views/pages/boarding-house): `resources/views/pages/boarding-house`
- [Home view](https://github.com/rhellokitty/bookingkosan/blob/main/resources/views/pages/home.blade.php): `resources/views/pages/home.blade.php`
- [Property queries](https://github.com/rhellokitty/bookingkosan/blob/main/app/Repositories/BoardingHouseRepository.php): `app/Repositories/BoardingHouseRepository.php`
- [Category and city](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`
- [Category and city pages](https://github.com/rhellokitty/bookingkosan/blob/main/resources/views/pages/category/show.blade.php): `resources/views/pages/category/show.blade.php`

### Booking workflow

- [Booking flow](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/BookingController.php): `app/Http/Controllers/BookingController.php`
- [Booking pages](https://github.com/rhellokitty/bookingkosan/tree/main/resources/views/pages/booking): `resources/views/pages/booking`
- [Booking validation](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Requests/CustomerInformationStoreRequest.php): `app/Http/Requests/CustomerInformationStoreRequest.php`
- [Transaction repository](https://github.com/rhellokitty/bookingkosan/blob/main/app/Repositories/TransactionRepository.php): `app/Repositories/TransactionRepository.php`
- [Booking transactions](https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/Transaction.php): `app/Models/Transaction.php`
- **Session store**

### Payments

- [Transaction callback](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/Api/MidtransController.php): `app/Http/Controllers/Api/MidtransController.php`
- [Bill payment API](https://github.com/rhellokitty/bookingkosan/blob/main/app/Http/Controllers/Api/BillPaymentController.php): `app/Http/Controllers/Api/BillPaymentController.php`
- [Payment service](https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentService.php): `app/Services/Payments/PaymentService.php`
- [Payment webhook handler](https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentWebhookHandler.php): `app/Services/Payments/PaymentWebhookHandler.php`
- [Status mapping](https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/PaymentStatusMapper.php): `app/Services/Payments/PaymentStatusMapper.php`
- [Bill settlement](https://github.com/rhellokitty/bookingkosan/blob/main/app/Services/Payments/BillPaymentService.php): `app/Services/Payments/BillPaymentService.php`
- [Payment attempts](https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/PaymentTransaction.php): `app/Models/PaymentTransaction.php`
- [Webhook logs](https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/PaymentWebhookLog.php): `app/Models/PaymentWebhookLog.php`
- [Bills](https://github.com/rhellokitty/bookingkosan/blob/main/app/Models/Bill.php): `app/Models/Bill.php`

### Administration

- [Filament resources](https://github.com/rhellokitty/bookingkosan/tree/main/app/Filament/Resources): `app/Filament/Resources`
- [Admin dashboard](https://github.com/rhellokitty/bookingkosan/tree/main/app/Filament/Widgets): `app/Filament/Widgets`

### Other components

- **Customer**
- **Midtrans**
- **Twilio WhatsApp**
- **Admin user**

## Connections

- Customer → Property browsing: browses
- Property browsing → Property queries: queries
- Property browsing → Category and city: loads filters
- Property browsing → Property pages: renders
- Home page → Home view: renders
- Category and city → Category and city pages: renders
- Customer → Booking flow: books
- Booking flow → Transaction repository: saves and reads
- Booking flow → Property queries: loads property
- Booking flow → Booking validation: validates
- Booking flow → Booking pages: renders
- Transaction repository → Session store: reads and writes
- Transaction repository → Booking transactions: creates and queries
- Booking flow → Midtrans: creates payment
- Midtrans → Booking flow: redirects back
- Midtrans → Transaction callback: notifies
- Transaction callback → Booking transactions: updates status
- Transaction callback → Twilio WhatsApp: sends WhatsApp
- Customer → Bill payment API: requests bill payment
- Bill payment API → Payment service: initiates payment
- Bill payment API → Bills: loads bill
- Payment webhook handler → Status mapping: maps status
- Payment webhook handler → Payment attempts: reads and updates
- Payment webhook handler → Webhook logs: records notification
- Payment webhook handler → Bill settlement: settles bill
- Bill settlement → Bills: marks paid
- Admin user → Filament resources: manages records
- Admin user → Admin dashboard: views dashboard
