# kill4enemy/projeknew architecture

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

- Interactive diagram: https://gitdiagram.com/kill4enemy/projeknew
- Repository: https://github.com/kill4enemy/projeknew

## Overview

HansPadel is a Laravel facility-booking and management application. Users browse facilities, authenticate, submit a booking, and proceed through Midtrans payment; callbacks update booking status and trigger notifications. Filament provides administration for bookings, facilities, users, settings, and operational monitoring, while REST endpoints expose booking and facility data. The sampled booking controller and model files show key booking and payment interactions; several admin and route implementations are represented from the README and tree, so their internal wiring is not asserted.

Main entry points: [`src/app/Http/Controllers/BookingController.php`](https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/BookingController.php) (Booking workflow), [`src/app/Http/Controllers/Auth/GoogleAuthController.php`](https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Auth/GoogleAuthController.php) (Google sign-in), [`src/routes/api.php`](https://github.com/kill4enemy/projeknew/blob/main/src/routes/api.php) (REST API), [`src/routes/web.php`](https://github.com/kill4enemy/projeknew/blob/main/src/routes/web.php) (Web routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_booking["Booking and payments"]
  node_web["Web routes<br/>[web.php]"]
  node_bookingflow["Booking workflow"]
  node_bookingmodel["Booking records<br/>[Booking.php]"]
  node_facilitymodel["Facilities<br/>[Facility.php]"]
  node_settings["Booking settings<br/>[Setting.php]"]
  node_midtrans{{"Midtrans"}}
end

subgraph group_identity["Identity and access"]
  node_user["User accounts<br/>[User.php]"]
  node_googleauth["Google sign-in"]
  node_authroutes["Auth routes<br/>[auth.php]"]
  node_login["Login modal"]
  node_loginform["Login form<br/>[LoginForm.php]"]
end

subgraph group_admin["Administration"]
  node_adminbookings["Booking admin"]
  node_adminfacilities["Facility admin"]
  node_adminusers["User admin<br/>[UserResource.php]"]
  node_dashboard["Admin dashboard<br/>[BookingStats.php]"]
  node_settingsadmin["Settings admin<br/>[ManageSettings.php]"]
end

subgraph group_integration["API and notifications"]
  node_api["REST API<br/>[api.php]"]
  node_apibookings["Booking API"]
  node_apifacilities["Facility API"]
  node_mail["Booking email"]
end

node_customer(("Customer"))
node_apiuser(("API consumer"))

node_customer -->|"requests pages"| node_web
node_web -->|"routes booking"| node_bookingflow
node_bookingflow -->|"creates and updates"| node_bookingmodel
node_bookingflow -->|"checks facility"| node_facilitymodel
node_bookingflow -->|"reads settings"| node_settings
node_bookingflow -->|"requests payment token"| node_midtrans
node_midtrans -.->|"sends callback"| node_bookingflow
node_bookingflow -->|"sends confirmation"| node_mail
node_customer -->|"opens login"| node_login
node_login -->|"uses form"| node_loginform
node_authroutes -->|"routes sign-in"| node_googleauth
node_googleauth -->|"finds or creates"| node_user
node_googleauth -.->|"authenticates with Google"| node_midtrans
node_apiuser -->|"calls endpoints"| node_api
node_api -->|"routes bookings"| node_apibookings
node_api -->|"routes facilities"| node_apifacilities
node_apibookings -->|"reads bookings"| node_bookingmodel
node_apifacilities -->|"reads facilities"| node_facilitymodel

click node_web "https://github.com/kill4enemy/projeknew/blob/main/src/routes/web.php"
click node_bookingflow "https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/BookingController.php"
click node_bookingmodel "https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/Booking.php"
click node_facilitymodel "https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/Facility.php"
click node_settings "https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/Setting.php"
click node_user "https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/User.php"
click node_googleauth "https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Auth/GoogleAuthController.php"
click node_authroutes "https://github.com/kill4enemy/projeknew/blob/main/src/routes/auth.php"
click node_login "https://github.com/kill4enemy/projeknew/blob/main/src/resources/views/livewire/login-modal.blade.php"
click node_loginform "https://github.com/kill4enemy/projeknew/blob/main/src/app/Livewire/Forms/LoginForm.php"
click node_adminbookings "https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Resources/BookingResource.php"
click node_adminfacilities "https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Resources/FacilityResource.php"
click node_adminusers "https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Resources/UserResource.php"
click node_dashboard "https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Widgets/BookingStats.php"
click node_settingsadmin "https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Pages/ManageSettings.php"
click node_api "https://github.com/kill4enemy/projeknew/blob/main/src/routes/api.php"
click node_apibookings "https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Api/BookingController.php"
click node_apifacilities "https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Api/FacilityController.php"
click node_mail "https://github.com/kill4enemy/projeknew/blob/main/src/app/Mail/BookingConfirmedMail.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_web,node_bookingflow,node_bookingmodel,node_facilitymodel,node_settings,node_midtrans toneBlue
class node_user,node_googleauth,node_authroutes,node_login,node_loginform toneAmber
class node_adminbookings,node_adminfacilities,node_adminusers,node_dashboard,node_settingsadmin,node_apiuser toneMint
class node_api,node_apibookings,node_apifacilities,node_mail toneRose
class node_customer toneIndigo
```

## Components

### Booking and payments

- [Web routes](https://github.com/kill4enemy/projeknew/blob/main/src/routes/web.php): `src/routes/web.php`
- [Booking workflow](https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/BookingController.php): `src/app/Http/Controllers/BookingController.php`
- [Booking records](https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/Booking.php): `src/app/Models/Booking.php`
- [Facilities](https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/Facility.php): `src/app/Models/Facility.php`
- [Booking settings](https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/Setting.php): `src/app/Models/Setting.php`
- **Midtrans**

### Identity and access

- [User accounts](https://github.com/kill4enemy/projeknew/blob/main/src/app/Models/User.php): `src/app/Models/User.php`
- [Google sign-in](https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Auth/GoogleAuthController.php): `src/app/Http/Controllers/Auth/GoogleAuthController.php`
- [Auth routes](https://github.com/kill4enemy/projeknew/blob/main/src/routes/auth.php): `src/routes/auth.php`
- [Login modal](https://github.com/kill4enemy/projeknew/blob/main/src/resources/views/livewire/login-modal.blade.php): `src/resources/views/livewire/login-modal.blade.php`
- [Login form](https://github.com/kill4enemy/projeknew/blob/main/src/app/Livewire/Forms/LoginForm.php): `src/app/Livewire/Forms/LoginForm.php`

### Administration

- [Booking admin](https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Resources/BookingResource.php): `src/app/Filament/Admin/Resources/BookingResource.php`
- [Facility admin](https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Resources/FacilityResource.php): `src/app/Filament/Admin/Resources/FacilityResource.php`
- [User admin](https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Resources/UserResource.php): `src/app/Filament/Admin/Resources/UserResource.php`
- [Admin dashboard](https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Widgets/BookingStats.php): `src/app/Filament/Admin/Widgets/BookingStats.php`
- [Settings admin](https://github.com/kill4enemy/projeknew/blob/main/src/app/Filament/Admin/Pages/ManageSettings.php): `src/app/Filament/Admin/Pages/ManageSettings.php`

### API and notifications

- [REST API](https://github.com/kill4enemy/projeknew/blob/main/src/routes/api.php): `src/routes/api.php`
- [Booking API](https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Api/BookingController.php): `src/app/Http/Controllers/Api/BookingController.php`
- [Facility API](https://github.com/kill4enemy/projeknew/blob/main/src/app/Http/Controllers/Api/FacilityController.php): `src/app/Http/Controllers/Api/FacilityController.php`
- [Booking email](https://github.com/kill4enemy/projeknew/blob/main/src/app/Mail/BookingConfirmedMail.php): `src/app/Mail/BookingConfirmedMail.php`

### Other components

- **Customer**
- **API consumer**

## Connections

- Customer → Web routes: requests pages (evidence: `README.md`)
- Web routes → Booking workflow: routes booking (evidence: `src/routes/web.php`)
- Booking workflow → Booking records: creates and updates (evidence: `src/app/Http/Controllers/BookingController.php`)
- Booking workflow → Facilities: checks facility (evidence: `src/app/Http/Controllers/BookingController.php`)
- Booking workflow → Booking settings: reads settings (evidence: `src/app/Http/Controllers/BookingController.php`)
- Booking workflow → Midtrans: requests payment token (evidence: `src/app/Http/Controllers/BookingController.php`)
- Midtrans → Booking workflow: sends callback
- Booking workflow → Booking email: sends confirmation (evidence: `src/app/Http/Controllers/BookingController.php`)
- Customer → Login modal: opens login
- Login modal → Login form: uses form (evidence: `src/resources/views/livewire/login-modal.blade.php`)
- Auth routes → Google sign-in: routes sign-in (evidence: `src/routes/web.php`)
- Google sign-in → User accounts: finds or creates (evidence: `src/app/Http/Controllers/Auth/GoogleAuthController.php`)
- Google sign-in → Midtrans: authenticates with Google
- API consumer → REST API: calls endpoints (evidence: `README.md`)
- REST API → Booking API: routes bookings (evidence: `README.md`)
- REST API → Facility API: routes facilities (evidence: `README.md`)
- Booking API → Booking records: reads bookings (evidence: `src/app/Http/Controllers/Api/BookingController.php`)
- Facility API → Facilities: reads facilities (evidence: `src/app/Http/Controllers/Api/FacilityController.php`)
