# vikesh-bansal/whitelagoon architecture

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

- Interactive diagram: https://gitdiagram.com/vikesh-bansal/whitelagoon
- Repository: https://github.com/vikesh-bansal/whitelagoon

## Overview

WhiteLagoon is an ASP.NET MVC villa-rental application: guests browse date-available villas, register or sign in, create bookings, and pay; administrators manage villa inventory and review booking and dashboard data. The graph follows controller-to-service calls visible in excerpts and the registrations in Program.cs. Several service and controller implementations are unsampled, so their internal wiring and some integrations are not inferred.

Main entry points: [`WhiteLagoon.Web/Controllers/BookingController.cs`](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/BookingController.cs) (Booking workflow), [`WhiteLagoon.Infrastructure/Repository/UnitOfWork.cs`](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Repository/UnitOfWork.cs) (Repository coordination), [`WhiteLagoon.Application/Services/Implementation/VillaService.cs`](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/VillaService.cs) (Villa service), [`WhiteLagoon.Web/Controllers/AmenityController.cs`](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/AmenityController.cs) (Amenity management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Villa browsing<br/>[HomeController.cs]"]
  node_account["Account access"]
  node_booking["Booking workflow"]
  node_villa_admin["Villa management<br/>[VillaController.cs]"]
  node_amenity_admin["Amenity management"]
  node_number_admin["Room management"]
  node_dashboard["Dashboard"]
end

subgraph group_application["Application services"]
  node_villa_service["Villa service<br/>[VillaService.cs]"]
  node_booking_service["Booking service<br/>[BookingService.cs]"]
  node_payment_service["Payment service<br/>[PaymentService.cs]"]
  node_amenity_service["Amenity service<br/>[AmenityService.cs]"]
  node_number_service["Room service"]
  node_dashboard_service["Dashboard metrics"]
  node_email_service["Email service<br/>[EmailService.cs]"]
end

subgraph group_infrastructure["Persistence"]
  node_unit_of_work["Repository coordination<br/>[UnitOfWork.cs]"]
  node_repository["Generic repository<br/>[Repository.cs]"]
  node_db_context["Application context"]
  node_database[("SQLite database")]
end

subgraph group_domain["Rental domain"]
  node_entities["Rental entities<br/>[Entities]"]
end

node_guest(("Guest"))
node_admin(("Administrator"))
node_stripe["Stripe Checkout"]
node_identity["ASP.NET Identity"]

node_guest -->|"browses"| node_home
node_home -->|"requests availability"| node_villa_service
node_guest -->|"signs in"| node_account
node_account -->|"authenticates"| node_identity
node_guest -->|"books stay"| node_booking
node_booking -->|"loads villa"| node_villa_service
node_booking -->|"creates booking"| node_booking_service
node_booking -->|"creates session"| node_payment_service
node_booking -->|"starts checkout"| node_stripe
node_booking -->|"updates payment"| node_booking_service
node_booking -->|"checks payment"| node_stripe
node_admin -->|"manages villas"| node_villa_admin
node_admin -->|"manages amenities"| node_amenity_admin
node_admin -->|"manages rooms"| node_number_admin
node_admin -->|"manages bookings"| node_booking
node_amenity_admin -->|"manages records"| node_amenity_service
node_amenity_admin -->|"loads villas"| node_villa_service
node_number_admin -->|"manages records"| node_number_service
node_number_admin -->|"loads villas"| node_villa_service
node_admin -->|"views metrics"| node_dashboard
node_dashboard -->|"requests charts"| node_dashboard_service
node_dashboard_service -->|"queries bookings and users"| node_unit_of_work
node_villa_service -->|"reads and writes"| node_unit_of_work
node_booking_service -->|"reads and writes"| node_unit_of_work
node_amenity_service -->|"accesses repositories"| node_unit_of_work
node_number_service -->|"accesses repositories"| node_unit_of_work
node_unit_of_work -->|"coordinates"| node_repository
node_repository -->|"queries entities"| node_db_context
node_db_context -->|"persists"| node_database
node_db_context -->|"stores identity"| node_identity

click node_home "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/HomeController.cs"
click node_account "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/AccountController.cs"
click node_booking "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/BookingController.cs"
click node_villa_admin "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/VillaController.cs"
click node_amenity_admin "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/AmenityController.cs"
click node_number_admin "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/VillaNumberController.cs"
click node_dashboard "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/DashboardController.cs"
click node_villa_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/VillaService.cs"
click node_booking_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/BookingService.cs"
click node_payment_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/PaymentService.cs"
click node_amenity_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/AmenityService.cs"
click node_number_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/VillaNumberService.cs"
click node_dashboard_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/DashboardService.cs"
click node_email_service "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/EmailService.cs"
click node_unit_of_work "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Repository/UnitOfWork.cs"
click node_repository "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Repository/Repository.cs"
click node_db_context "https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Data/ApplicationDbContext.cs"
click node_entities "https://github.com/vikesh-bansal/whitelagoon/tree/master/WhiteLagoon.Domain/Entities"

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_home,node_account,node_booking,node_villa_admin,node_amenity_admin,node_number_admin,node_dashboard toneBlue
class node_villa_service,node_booking_service,node_payment_service,node_amenity_service,node_number_service,node_dashboard_service,node_email_service toneAmber
class node_unit_of_work,node_repository,node_db_context,node_database toneMint
class node_entities toneRose
class node_guest,node_admin,node_stripe,node_identity toneIndigo
```

## Components

### Web experience

- [Villa browsing](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/HomeController.cs): `WhiteLagoon.Web/Controllers/HomeController.cs`
- [Account access](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/AccountController.cs): `WhiteLagoon.Web/Controllers/AccountController.cs`
- [Booking workflow](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/BookingController.cs): `WhiteLagoon.Web/Controllers/BookingController.cs`
- [Villa management](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/VillaController.cs): `WhiteLagoon.Web/Controllers/VillaController.cs`
- [Amenity management](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/AmenityController.cs): `WhiteLagoon.Web/Controllers/AmenityController.cs`
- [Room management](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/VillaNumberController.cs): `WhiteLagoon.Web/Controllers/VillaNumberController.cs`
- [Dashboard](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Web/Controllers/DashboardController.cs): `WhiteLagoon.Web/Controllers/DashboardController.cs`

### Application services

- [Villa service](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/VillaService.cs): `WhiteLagoon.Application/Services/Implementation/VillaService.cs`
- [Booking service](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/BookingService.cs): `WhiteLagoon.Application/Services/Implementation/BookingService.cs`
- [Payment service](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/PaymentService.cs): `WhiteLagoon.Application/Services/Implementation/PaymentService.cs`
- [Amenity service](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/AmenityService.cs): `WhiteLagoon.Application/Services/Implementation/AmenityService.cs`
- [Room service](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/VillaNumberService.cs): `WhiteLagoon.Application/Services/Implementation/VillaNumberService.cs`
- [Dashboard metrics](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/DashboardService.cs): `WhiteLagoon.Application/Services/Implementation/DashboardService.cs`
- [Email service](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Application/Services/Implementation/EmailService.cs): `WhiteLagoon.Application/Services/Implementation/EmailService.cs`

### Persistence

- [Repository coordination](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Repository/UnitOfWork.cs): `WhiteLagoon.Infrastructure/Repository/UnitOfWork.cs`
- [Generic repository](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Repository/Repository.cs): `WhiteLagoon.Infrastructure/Repository/Repository.cs`
- [Application context](https://github.com/vikesh-bansal/whitelagoon/blob/master/WhiteLagoon.Infrastructure/Data/ApplicationDbContext.cs): `WhiteLagoon.Infrastructure/Data/ApplicationDbContext.cs`
- **SQLite database**

### Rental domain

- [Rental entities](https://github.com/vikesh-bansal/whitelagoon/tree/master/WhiteLagoon.Domain/Entities): `WhiteLagoon.Domain/Entities`

### Other components

- **Guest**
- **Administrator**
- **Stripe Checkout**
- **ASP.NET Identity**

## Connections

- Guest → Villa browsing: browses
- Villa browsing → Villa service: requests availability
- Guest → Account access: signs in
- Account access → ASP.NET Identity: authenticates
- Guest → Booking workflow: books stay
- Booking workflow → Villa service: loads villa
- Booking workflow → Booking service: creates booking
- Booking workflow → Payment service: creates session
- Booking workflow → Stripe Checkout: starts checkout
- Booking workflow → Booking service: updates payment
- Booking workflow → Stripe Checkout: checks payment
- Administrator → Villa management: manages villas
- Administrator → Amenity management: manages amenities
- Administrator → Room management: manages rooms
- Administrator → Booking workflow: manages bookings
- Amenity management → Amenity service: manages records
- Amenity management → Villa service: loads villas
- Room management → Room service: manages records
- Room management → Villa service: loads villas
- Administrator → Dashboard: views metrics
- Dashboard → Dashboard metrics: requests charts
- Dashboard metrics → Repository coordination: queries bookings and users
- Villa service → Repository coordination: reads and writes
- Booking service → Repository coordination: reads and writes
- Amenity service → Repository coordination: accesses repositories
- Room service → Repository coordination: accesses repositories
- Repository coordination → Generic repository: coordinates
- Generic repository → Application context: queries entities
- Application context → SQLite database: persists
- Application context → ASP.NET Identity: stores identity
