# vansh-modi/bookmyfun architecture

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

- Interactive diagram: https://gitdiagram.com/vansh-modi/bookmyfun
- Repository: https://github.com/vansh-modi/bookmyfun

## Overview

BookMyFun is an ASP.NET MVC property-rental and booking marketplace with client, owner, employee, and administrator workflows. A visitor reaches MVC actions; the product supports property discovery and management, bookings and cancellations, payments, subscriptions, identity checks, media, damage claims, partner leads, communications, and financial reporting. Controllers coordinate domain services and repositories, which use a shared SQL access layer. The README is empty; edges below are limited to relationships visible in excerpts, the source index, or application wiring. Some controller-to-subsystem links remain unshown.

Main entry points: [`Program.cs`](https://github.com/vansh-modi/bookmyfun/blob/main/Program.cs) (Application startup), [`Data/DBHelper.cs`](https://github.com/vansh-modi/bookmyfun/blob/main/Data/DBHelper.cs) (SQL access layer), [`Services/RefundEngineService.cs`](https://github.com/vansh-modi/bookmyfun/blob/main/Services/RefundEngineService.cs) (Cancellation refunds), [`Models/Entities/Entities.cs`](https://github.com/vansh-modi/bookmyfun/blob/main/Models/Entities/Entities.cs) (Marketplace entities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_account["Accounts and OTP"]
  node_property_booking["Property and booking"]
  node_client["Client workspace"]
  node_owner["Owner workspace<br/>[OwnerController.cs]"]
  node_employee["Employee workspace"]
  node_admin["Admin operations<br/>[AdminController.cs]"]
  node_media_controller["Media access<br/>[MediaController.cs]"]
  node_home["Public pages<br/>[HomeController.cs]"]
end

subgraph group_domain["Marketplace services"]
  node_payment["Payment gateway"]
  node_pricing["Booking pricing"]
  node_refund["Cancellation refunds"]
  node_identity["Identity verification"]
  node_claims["Damage claims"]
  node_leads["Partner leads"]
  node_media_storage["Media validation"]
  node_communications["Email and messaging"]
end

subgraph group_persistence["Persistence"]
  node_dbhelper["SQL access layer<br/>[DBHelper.cs]"]
  node_database[("SQL Server")]
  node_initializer["Schema initializer"]
  node_seeder["Initial data seeder<br/>[DatabaseSeeder.cs]"]
  node_property_repo["Property records"]
  node_booking_repo["Booking records"]
  node_refund_repo["Refund records"]
  node_identity_repo["Verification records"]
  node_damage_repo["Damage records"]
  node_owner_request_repo["Owner requests"]
  node_subscription_repo["Subscriptions"]
end

subgraph group_models["Domain models"]
  node_entities["Marketplace entities<br/>[Entities.cs]"]
  node_viewmodels["Workflow view models<br/>[ViewModels.cs]"]
end

node_visitor(("Marketplace users"))
node_program["Application startup<br/>[Program.cs]"]

node_visitor -->|"requests pages"| node_home
node_visitor -->|"requests actions"| node_account
node_visitor -->|"requests actions"| node_property_booking
node_program -->|"runs schema setup"| node_initializer
node_program -->|"runs seed data"| node_seeder
node_initializer -->|"executes schema SQL"| node_dbhelper
node_seeder -->|"executes seed SQL"| node_dbhelper
node_property_repo -->|"executes queries"| node_dbhelper
node_booking_repo -->|"executes queries"| node_dbhelper
node_refund_repo -->|"uses SQL access"| node_dbhelper
node_identity_repo -->|"uses SQL access"| node_dbhelper
node_damage_repo -->|"uses SQL access"| node_dbhelper
node_owner_request_repo -->|"uses SQL access"| node_dbhelper
node_subscription_repo -->|"uses SQL access"| node_dbhelper
node_dbhelper -->|"opens SQL connections"| node_database
node_account -->|"sends OTP messages"| node_communications
node_account -->|"uses request models"| node_viewmodels
node_admin -->|"reviews verification"| node_identity
node_admin -->|"builds reports"| node_viewmodels
node_refund -->|"cancels booking"| node_booking_repo
node_refund -->|"records refund"| node_refund_repo
node_identity -->|"uses verification records"| node_identity_repo
node_claims -->|"uses claim entities"| node_entities
node_leads -->|"uses marketplace entities"| node_entities
node_refund -->|"uses booking entities"| node_entities
node_refund -->|"returns cancellation quote"| node_viewmodels
node_property_repo -->|"maps property records"| node_entities
node_booking_repo -->|"maps booking records"| node_entities
node_program -->|"registers service"| node_payment
node_program -->|"registers services"| node_pricing
node_program -->|"registers service"| node_media_storage
node_program -->|"registers service"| node_refund
node_program -->|"registers service"| node_identity
node_program -->|"registers service"| node_claims
node_program -->|"registers service"| node_leads

click node_account "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/AccountController.cs"
click node_property_booking "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/BookingAndPropertiesController.cs"
click node_client "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/ClientController.cs"
click node_owner "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/OwnerController.cs"
click node_employee "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/EmployeeController.cs"
click node_admin "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/AdminController.cs"
click node_media_controller "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/MediaController.cs"
click node_home "https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/HomeController.cs"
click node_payment "https://github.com/vansh-modi/bookmyfun/blob/main/Services/PaymentGatewayService.cs"
click node_pricing "https://github.com/vansh-modi/bookmyfun/blob/main/Services/BookingAndCommissionService.cs"
click node_refund "https://github.com/vansh-modi/bookmyfun/blob/main/Services/RefundEngineService.cs"
click node_identity "https://github.com/vansh-modi/bookmyfun/blob/main/Services/IdVerificationService.cs"
click node_claims "https://github.com/vansh-modi/bookmyfun/blob/main/Services/DamageClaimService.cs"
click node_leads "https://github.com/vansh-modi/bookmyfun/blob/main/Services/PartnerLeadService.cs"
click node_media_storage "https://github.com/vansh-modi/bookmyfun/blob/main/Services/MediaStorageService.cs"
click node_communications "https://github.com/vansh-modi/bookmyfun/blob/main/Services/CommunicationService.cs"
click node_dbhelper "https://github.com/vansh-modi/bookmyfun/blob/main/Data/DBHelper.cs"
click node_initializer "https://github.com/vansh-modi/bookmyfun/blob/main/Data/DatabaseInitializer.cs"
click node_seeder "https://github.com/vansh-modi/bookmyfun/blob/main/Data/DatabaseSeeder.cs"
click node_property_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/PropertyRepository.cs"
click node_booking_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/BookingRepository.cs"
click node_refund_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/RefundRepository.cs"
click node_identity_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/IdVerificationRepository.cs"
click node_damage_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/DamageClaimRepository.cs"
click node_owner_request_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/OwnerRequestRepository.cs"
click node_subscription_repo "https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/SubscriptionRepository.cs"
click node_entities "https://github.com/vansh-modi/bookmyfun/blob/main/Models/Entities/Entities.cs"
click node_viewmodels "https://github.com/vansh-modi/bookmyfun/blob/main/Models/ViewModels/ViewModels.cs"
click node_program "https://github.com/vansh-modi/bookmyfun/blob/main/Program.cs"

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_account,node_property_booking,node_client,node_owner,node_employee,node_admin,node_media_controller,node_home,node_visitor toneBlue
class node_payment,node_pricing,node_refund,node_identity,node_claims,node_leads,node_media_storage,node_communications toneAmber
class node_dbhelper,node_database,node_initializer,node_seeder,node_property_repo,node_booking_repo,node_refund_repo,node_identity_repo,node_damage_repo,node_owner_request_repo,node_subscription_repo toneMint
class node_entities,node_viewmodels toneRose
class node_program toneTeal
```

## Components

### Web workflows

- [Accounts and OTP](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/AccountController.cs): `Controllers/AccountController.cs`
- [Property and booking](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/BookingAndPropertiesController.cs): `Controllers/BookingAndPropertiesController.cs`
- [Client workspace](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/ClientController.cs): `Controllers/ClientController.cs`
- [Owner workspace](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/OwnerController.cs): `Controllers/OwnerController.cs`
- [Employee workspace](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/EmployeeController.cs): `Controllers/EmployeeController.cs`
- [Admin operations](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/AdminController.cs): `Controllers/AdminController.cs`
- [Media access](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/MediaController.cs): `Controllers/MediaController.cs`
- [Public pages](https://github.com/vansh-modi/bookmyfun/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`

### Marketplace services

- [Payment gateway](https://github.com/vansh-modi/bookmyfun/blob/main/Services/PaymentGatewayService.cs): `Services/PaymentGatewayService.cs`
- [Booking pricing](https://github.com/vansh-modi/bookmyfun/blob/main/Services/BookingAndCommissionService.cs): `Services/BookingAndCommissionService.cs`
- [Cancellation refunds](https://github.com/vansh-modi/bookmyfun/blob/main/Services/RefundEngineService.cs): `Services/RefundEngineService.cs`
- [Identity verification](https://github.com/vansh-modi/bookmyfun/blob/main/Services/IdVerificationService.cs): `Services/IdVerificationService.cs`
- [Damage claims](https://github.com/vansh-modi/bookmyfun/blob/main/Services/DamageClaimService.cs): `Services/DamageClaimService.cs`
- [Partner leads](https://github.com/vansh-modi/bookmyfun/blob/main/Services/PartnerLeadService.cs): `Services/PartnerLeadService.cs`
- [Media validation](https://github.com/vansh-modi/bookmyfun/blob/main/Services/MediaStorageService.cs): `Services/MediaStorageService.cs`
- [Email and messaging](https://github.com/vansh-modi/bookmyfun/blob/main/Services/CommunicationService.cs): `Services/CommunicationService.cs`

### Persistence

- [SQL access layer](https://github.com/vansh-modi/bookmyfun/blob/main/Data/DBHelper.cs): `Data/DBHelper.cs`
- **SQL Server**
- [Schema initializer](https://github.com/vansh-modi/bookmyfun/blob/main/Data/DatabaseInitializer.cs): `Data/DatabaseInitializer.cs`
- [Initial data seeder](https://github.com/vansh-modi/bookmyfun/blob/main/Data/DatabaseSeeder.cs): `Data/DatabaseSeeder.cs`
- [Property records](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/PropertyRepository.cs): `Repositories/PropertyRepository.cs`
- [Booking records](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/BookingRepository.cs): `Repositories/BookingRepository.cs`
- [Refund records](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/RefundRepository.cs): `Repositories/RefundRepository.cs`
- [Verification records](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/IdVerificationRepository.cs): `Repositories/IdVerificationRepository.cs`
- [Damage records](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/DamageClaimRepository.cs): `Repositories/DamageClaimRepository.cs`
- [Owner requests](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/OwnerRequestRepository.cs): `Repositories/OwnerRequestRepository.cs`
- [Subscriptions](https://github.com/vansh-modi/bookmyfun/blob/main/Repositories/SubscriptionRepository.cs): `Repositories/SubscriptionRepository.cs`

### Domain models

- [Marketplace entities](https://github.com/vansh-modi/bookmyfun/blob/main/Models/Entities/Entities.cs): `Models/Entities/Entities.cs`
- [Workflow view models](https://github.com/vansh-modi/bookmyfun/blob/main/Models/ViewModels/ViewModels.cs): `Models/ViewModels/ViewModels.cs`

### Other components

- **Marketplace users**
- [Application startup](https://github.com/vansh-modi/bookmyfun/blob/main/Program.cs): `Program.cs`

## Connections

- Marketplace users → Public pages: requests pages
- Marketplace users → Accounts and OTP: requests actions
- Marketplace users → Property and booking: requests actions
- Application startup → Schema initializer: runs schema setup (evidence: `Program.cs`)
- Application startup → Initial data seeder: runs seed data (evidence: `Program.cs`)
- Schema initializer → SQL access layer: executes schema SQL (evidence: `Data/DatabaseInitializer.cs`)
- Initial data seeder → SQL access layer: executes seed SQL (evidence: `Data/DatabaseSeeder.cs`)
- Property records → SQL access layer: executes queries (evidence: `Repositories/PropertyRepository.cs`)
- Booking records → SQL access layer: executes queries (evidence: `Repositories/BookingRepository.cs`)
- Refund records → SQL access layer: uses SQL access (evidence: `Repositories/RefundRepository.cs`)
- Verification records → SQL access layer: uses SQL access (evidence: `Repositories/IdVerificationRepository.cs`)
- Damage records → SQL access layer: uses SQL access (evidence: `Repositories/DamageClaimRepository.cs`)
- Owner requests → SQL access layer: uses SQL access (evidence: `Repositories/OwnerRequestRepository.cs`)
- Subscriptions → SQL access layer: uses SQL access (evidence: `Repositories/SubscriptionRepository.cs`)
- SQL access layer → SQL Server: opens SQL connections (evidence: `Data/DBHelper.cs`)
- Accounts and OTP → Email and messaging: sends OTP messages (evidence: `Controllers/AccountController.cs`)
- Accounts and OTP → Workflow view models: uses request models (evidence: `Controllers/AccountController.cs`)
- Admin operations → Identity verification: reviews verification (evidence: `Controllers/AdminController.cs`)
- Admin operations → Workflow view models: builds reports (evidence: `Controllers/AdminController.cs`)
- Cancellation refunds → Booking records: cancels booking (evidence: `Services/RefundEngineService.cs`)
- Cancellation refunds → Refund records: records refund (evidence: `Services/RefundEngineService.cs`)
- Identity verification → Verification records: uses verification records (evidence: `Services/IdVerificationService.cs`)
- Damage claims → Marketplace entities: uses claim entities (evidence: `Services/DamageClaimService.cs`)
- Partner leads → Marketplace entities: uses marketplace entities (evidence: `Services/PartnerLeadService.cs`)
- Cancellation refunds → Marketplace entities: uses booking entities (evidence: `Services/RefundEngineService.cs`)
- Cancellation refunds → Workflow view models: returns cancellation quote (evidence: `Services/RefundEngineService.cs`)
- Property records → Marketplace entities: maps property records (evidence: `Repositories/PropertyRepository.cs`)
- Booking records → Marketplace entities: maps booking records (evidence: `Repositories/BookingRepository.cs`)
- Application startup → Payment gateway: registers service (evidence: `Program.cs`)
- Application startup → Booking pricing: registers services (evidence: `Program.cs`)
- Application startup → Media validation: registers service (evidence: `Program.cs`)
- Application startup → Cancellation refunds: registers service (evidence: `Program.cs`)
- Application startup → Identity verification: registers service (evidence: `Program.cs`)
- Application startup → Damage claims: registers service (evidence: `Program.cs`)
- Application startup → Partner leads: registers service (evidence: `Program.cs`)
