Havenly — Modern Vacation Rental & Accommodation Marketplace
C#
0
81 commits
updated Sep 13, 2026
Havenly is an end-to-end accommodation booking and vacation rental platform built with ASP.NET Core 10, Clean N-Tier Architecture, and modern web technologies. It seamlessly connects travelers (Guests) with property owners (Hosts), featuring interactive visual calendars, integrated payments, AI-assisted recommendations, automated notifications, and comprehensive administrative analytics.
BookingCompletionBackgroundService) running scheduled tasks to automatically mark completed stays.Havenly is architected following Clean N-Tier Architecture and Domain-Driven Design (DDD) principles to ensure strict separation of concerns, high maintainability, and testability.
graph TD
subgraph PresentationLayer["Presentation Layer (Havenly.PL)"]
Controllers["ASP.NET Core Controllers<br/>(MVC & API Endpoints)"]
Views["Razor Views & ViewModels"]
NotificationHub["In-App Notifications & AJAX UI"]
BgServices["Background Hosted Services<br/>(Booking Completion Worker)"]
end
subgraph BusinessLogicLayer["Business Logic Layer (Havenly.BLL)"]
Services["Domain Services<br/>(Booking, Property, Review, Payout)"]
AI["AI Engine & Chatbot Service<br/>(Hugging Face + Catalog Recs)"]
PaymentSvc["Paymob Payment Integration"]
EmailSvc["Email Services (SMTP/MailKit)"]
Mappers["AutoMapper Profiles"]
end
subgraph DataAccessLayer["Data Access Layer (Havenly.DAL)"]
UOW["Unit of Work Pattern"]
Repos["Generic & Specific Repositories"]
DbContext["HavenlyDbContext (EF Core 10)"]
Seeder["Database Migration & Seeder"]
end
subgraph ExternalServices["External Infrastructure"]
SQLServer[("Microsoft SQL Server")]
Paymob["Paymob Gateway"]
HuggingFace["Hugging Face API"]
GoogleAuth["Google OAuth 2.0"]
GmailSMTP["Gmail SMTP Server"]
end
Controllers --> Services
Controllers --> Mappers
BgServices --> Services
Services --> UOW
Services --> AI
Services --> PaymentSvc
Services --> EmailSvc
UOW --> Repos
Repos --> DbContext
DbContext --> SQLServer
PaymentSvc --> Paymob
AI --> HuggingFace
Controllers --> GoogleAuth
EmailSvc --> GmailSMTP
sequenceDiagram
autonumber
actor Guest
participant Web as Havenly Portal
participant BLL as Booking & Payment Service
participant Paymob as Paymob Gateway
actor Host
participant Worker as Background Service
Guest->>Web: Select property & dates from Visual Calendar
Web->>BLL: Create booking request (Status: Pending)
BLL-->>Host: Send email & in-app notification
Host->>Web: Review & Accept booking request
Web->>BLL: Update status (Status: Accepted)
BLL-->>Guest: Trigger payment notification
Guest->>Web: Proceed to Secure Checkout
Web->>Paymob: Initialize Payment Order & IFrame
Paymob-->>Guest: Process Card / Mobile Wallet transaction
Paymob->>Web: Webhook / HMAC Payment Callback
Web->>BLL: Mark Booking as Confirmed & create Payment record
BLL-->>Guest: Send Confirmation Email & Receipt
BLL-->>Host: Notify reservation secured
Note over Guest,Worker: Stay takes place
Worker->>BLL: Check-out date reached -> Auto-complete stay
BLL->>Host: Release payout to Host balance
erDiagram
User ||--o{ Property : "owns / hosts"
User ||--o{ Booking : "makes"
User ||--o{ Review : "writes"
User ||--o{ Favorite : "saves"
User ||--o{ Notification : "receives"
Property ||--o{ PropertyImage : "contains"
Property ||--o{ Bedroom : "has"
Bedroom ||--o{ Bed : "contains"
Property ||--o{ PropertyAmenity : "offers"
Amenity ||--o{ PropertyAmenity : "categorized as"
Property ||--o{ PropertyBlockedDate : "restricts"
Property ||--o{ Booking : "booked in"
Property ||--o{ Review : "receives"
Property ||--|| Address : "located at"
Property ||--o{ Favorite : "saved in"
Booking ||--|| Payment : "paid via"
User {
string Id PK
string FullName
string Email
string PhoneNumber
string Status
DateTime JoinedDate
}
Property {
int Id PK
string Title
string Description
decimal PricePerNight
int MaxGuests
int Bathrooms
string HostId FK
int AddressId FK
}
PropertyBlockedDate {
int Id PK
int PropertyId FK
DateTime BlockedDate
string Reason
}
Booking {
int Id PK
int PropertyId FK
string GuestId FK
DateTime CheckInDate
DateTime CheckOutDate
decimal TotalPrice
string Status
DateTime CreatedAt
}
Payment {
int Id PK
int BookingId FK
string TransactionId
decimal Amount
string PaymentMethod
string Status
DateTime PaymentDate
}
Review {
int Id PK
int PropertyId FK
string GuestId FK
int Rating
string Comment
DateTime CreatedAt
}
Notification {
int Id PK
string UserId FK
string Title
string Message
string TargetUrl
bool IsRead
DateTime CreatedAt
}
| Layer | Technologies & Libraries |
|---|---|
| Framework | ASP.NET Core 10.0 (C# 13) |
| Architecture | Clean Architecture (DAL, BLL, PL) with Repository & Unit of Work Patterns |
| Database & ORM | Microsoft SQL Server, Entity Framework Core 10.0 |
| Security & Identity | ASP.NET Core Identity, Role-Based Access Control (Admin, Host, Guest), Google OAuth2 |
| Frontend | Razor Views, Bootstrap 5.3, FontAwesome, Chart.js, HTML5/CSS3, JavaScript (ES6+ AJAX) |
| Payment Gateway | Paymob API (Credit Cards, Mobile Wallets, HMAC callback validation) |
| Artificial Intelligence | Hugging Face Inference API (Qwen/Qwen2.5 / Llama-3.2), Custom Content-Based Recommendation Engine |
| Mailing & Comms | MailKit & MimeKit (SMTP Google relay, Responsive HTML templates) |
| Object Mapping | AutoMapper 16.2 |
| Background Processing | ASP.NET Core Hosted Background Services |
| Testing | xUnit, Moq, FluentAssertions |
Havenly/
├── Havenly.DAL/ # Data Access Layer
│ ├── Database/ # HavenlyDbContext, Migrations, DatabaseSeeder
│ ├── Entities/ # Domain Entities (Property, Booking, User, etc.)
│ └── Repos/ # Repositories & Unit of Work (Abstractions & Impl)
│
├── Havenly.BLL/ # Business Logic Layer
│ ├── ModelVMs/ # DTOs, ViewModels & Request Models
│ ├── Mappers/ # AutoMapper Profile Configurations
│ └── Services/ # Domain Services (Booking, Calendar, Payment, AI)
│
├── Havenly.PL/ # Presentation Layer (Web Application)
│ ├── BackgroundServices/ # Background Hosted Services
│ ├── Controllers/ # MVC & API Controllers
│ ├── Views/ # Razor Views (Host, Guest, Admin, Account)
│ ├── wwwroot/ # Static Assets (CSS, JS, Images, Icons)
│ ├── appsettings.json # Configuration settings & Connection Strings
│ └── Program.cs # Dependency Injection & Middleware Pipeline
│
├── Havenly.BLL.Tests/ # Unit & Integration Tests for Business Services
└── Havenly.DAL.Tests/ # Data Access & Repository Unit Tests
Update Havenly.PL/appsettings.json with your environment credentials:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=HavenlyDb;Trusted_Connection=True;TrustServerCertificate=True;"
},
"Authentication": {
"Google": {
"ClientId": "YOUR_GOOGLE_CLIENT_ID",
"ClientSecret": "YOUR_GOOGLE_CLIENT_SECRET"
}
},
"Paymob": {
"ApiKey": "YOUR_PAYMOB_API_KEY",
"IntegrationId": "YOUR_INTEGRATION_ID",
"IframeId": "YOUR_IFRAME_ID",
"HmacSecret": "YOUR_HMAC_SECRET",
"IsTestMode": true
},
"EmailSettings": {
"SmtpServer": "smtp.gmail.com",
"Port": 587,
"SenderEmail": "your-email@gmail.com",
"SenderPassword": "your-app-password",
"SenderDisplayName": "Havenly"
},
"HuggingFace": {
"ApiKey": "YOUR_HUGGINGFACE_API_KEY",
"ApiEndpoint": "https://router.huggingface.co/v1/chat/completions",
"Model": "Qwen/Qwen2.5-Coder-32B-Instruct"
}
}
The application automatically applies EF Core migrations and seeds foundational roles, permissions, and initial data on startup.
If you prefer to apply migrations manually via CLI:
dotnet ef database update --project Havenly.DAL --startup-project Havenly.PL
# Navigate to the presentation project
cd Havenly.PL
# Restore and run
dotnet restore
dotnet run
Open your browser at http://localhost:5071 (or the configured port).
Run the automated test suites using the .NET CLI:
# Run all tests across the solution
dotnet test
# Run BLL service tests specifically
dotnet test Havenly.BLL.Tests
# Run repository tests
dotnet test Havenly.DAL.Tests
Developed as an Information Technology Institute (ITI) Graduation Project.
C#
50.9%
HTML
46.3%
JavaScript
1.7%
CSS
1.1%
Havenly — Modern Vacation Rental & Accommodation Marketplace
C#
0
81 commits
updated Sep 13, 2026
Havenly is an end-to-end accommodation booking and vacation rental platform built with ASP.NET Core 10, Clean N-Tier Architecture, and modern web technologies. It seamlessly connects travelers (Guests) with property owners (Hosts), featuring interactive visual calendars, integrated payments, AI-assisted recommendations, automated notifications, and comprehensive administrative analytics.
BookingCompletionBackgroundService) running scheduled tasks to automatically mark completed stays.Havenly is architected following Clean N-Tier Architecture and Domain-Driven Design (DDD) principles to ensure strict separation of concerns, high maintainability, and testability.
graph TD
subgraph PresentationLayer["Presentation Layer (Havenly.PL)"]
Controllers["ASP.NET Core Controllers<br/>(MVC & API Endpoints)"]
Views["Razor Views & ViewModels"]
NotificationHub["In-App Notifications & AJAX UI"]
BgServices["Background Hosted Services<br/>(Booking Completion Worker)"]
end
subgraph BusinessLogicLayer["Business Logic Layer (Havenly.BLL)"]
Services["Domain Services<br/>(Booking, Property, Review, Payout)"]
AI["AI Engine & Chatbot Service<br/>(Hugging Face + Catalog Recs)"]
PaymentSvc["Paymob Payment Integration"]
EmailSvc["Email Services (SMTP/MailKit)"]
Mappers["AutoMapper Profiles"]
end
subgraph DataAccessLayer["Data Access Layer (Havenly.DAL)"]
UOW["Unit of Work Pattern"]
Repos["Generic & Specific Repositories"]
DbContext["HavenlyDbContext (EF Core 10)"]
Seeder["Database Migration & Seeder"]
end
subgraph ExternalServices["External Infrastructure"]
SQLServer[("Microsoft SQL Server")]
Paymob["Paymob Gateway"]
HuggingFace["Hugging Face API"]
GoogleAuth["Google OAuth 2.0"]
GmailSMTP["Gmail SMTP Server"]
end
Controllers --> Services
Controllers --> Mappers
BgServices --> Services
Services --> UOW
Services --> AI
Services --> PaymentSvc
Services --> EmailSvc
UOW --> Repos
Repos --> DbContext
DbContext --> SQLServer
PaymentSvc --> Paymob
AI --> HuggingFace
Controllers --> GoogleAuth
EmailSvc --> GmailSMTP
sequenceDiagram
autonumber
actor Guest
participant Web as Havenly Portal
participant BLL as Booking & Payment Service
participant Paymob as Paymob Gateway
actor Host
participant Worker as Background Service
Guest->>Web: Select property & dates from Visual Calendar
Web->>BLL: Create booking request (Status: Pending)
BLL-->>Host: Send email & in-app notification
Host->>Web: Review & Accept booking request
Web->>BLL: Update status (Status: Accepted)
BLL-->>Guest: Trigger payment notification
Guest->>Web: Proceed to Secure Checkout
Web->>Paymob: Initialize Payment Order & IFrame
Paymob-->>Guest: Process Card / Mobile Wallet transaction
Paymob->>Web: Webhook / HMAC Payment Callback
Web->>BLL: Mark Booking as Confirmed & create Payment record
BLL-->>Guest: Send Confirmation Email & Receipt
BLL-->>Host: Notify reservation secured
Note over Guest,Worker: Stay takes place
Worker->>BLL: Check-out date reached -> Auto-complete stay
BLL->>Host: Release payout to Host balance
erDiagram
User ||--o{ Property : "owns / hosts"
User ||--o{ Booking : "makes"
User ||--o{ Review : "writes"
User ||--o{ Favorite : "saves"
User ||--o{ Notification : "receives"
Property ||--o{ PropertyImage : "contains"
Property ||--o{ Bedroom : "has"
Bedroom ||--o{ Bed : "contains"
Property ||--o{ PropertyAmenity : "offers"
Amenity ||--o{ PropertyAmenity : "categorized as"
Property ||--o{ PropertyBlockedDate : "restricts"
Property ||--o{ Booking : "booked in"
Property ||--o{ Review : "receives"
Property ||--|| Address : "located at"
Property ||--o{ Favorite : "saved in"
Booking ||--|| Payment : "paid via"
User {
string Id PK
string FullName
string Email
string PhoneNumber
string Status
DateTime JoinedDate
}
Property {
int Id PK
string Title
string Description
decimal PricePerNight
int MaxGuests
int Bathrooms
string HostId FK
int AddressId FK
}
PropertyBlockedDate {
int Id PK
int PropertyId FK
DateTime BlockedDate
string Reason
}
Booking {
int Id PK
int PropertyId FK
string GuestId FK
DateTime CheckInDate
DateTime CheckOutDate
decimal TotalPrice
string Status
DateTime CreatedAt
}
Payment {
int Id PK
int BookingId FK
string TransactionId
decimal Amount
string PaymentMethod
string Status
DateTime PaymentDate
}
Review {
int Id PK
int PropertyId FK
string GuestId FK
int Rating
string Comment
DateTime CreatedAt
}
Notification {
int Id PK
string UserId FK
string Title
string Message
string TargetUrl
bool IsRead
DateTime CreatedAt
}
| Layer | Technologies & Libraries |
|---|---|
| Framework | ASP.NET Core 10.0 (C# 13) |
| Architecture | Clean Architecture (DAL, BLL, PL) with Repository & Unit of Work Patterns |
| Database & ORM | Microsoft SQL Server, Entity Framework Core 10.0 |
| Security & Identity | ASP.NET Core Identity, Role-Based Access Control (Admin, Host, Guest), Google OAuth2 |
| Frontend | Razor Views, Bootstrap 5.3, FontAwesome, Chart.js, HTML5/CSS3, JavaScript (ES6+ AJAX) |
| Payment Gateway | Paymob API (Credit Cards, Mobile Wallets, HMAC callback validation) |
| Artificial Intelligence | Hugging Face Inference API (Qwen/Qwen2.5 / Llama-3.2), Custom Content-Based Recommendation Engine |
| Mailing & Comms | MailKit & MimeKit (SMTP Google relay, Responsive HTML templates) |
| Object Mapping | AutoMapper 16.2 |
| Background Processing | ASP.NET Core Hosted Background Services |
| Testing | xUnit, Moq, FluentAssertions |
Havenly/
├── Havenly.DAL/ # Data Access Layer
│ ├── Database/ # HavenlyDbContext, Migrations, DatabaseSeeder
│ ├── Entities/ # Domain Entities (Property, Booking, User, etc.)
│ └── Repos/ # Repositories & Unit of Work (Abstractions & Impl)
│
├── Havenly.BLL/ # Business Logic Layer
│ ├── ModelVMs/ # DTOs, ViewModels & Request Models
│ ├── Mappers/ # AutoMapper Profile Configurations
│ └── Services/ # Domain Services (Booking, Calendar, Payment, AI)
│
├── Havenly.PL/ # Presentation Layer (Web Application)
│ ├── BackgroundServices/ # Background Hosted Services
│ ├── Controllers/ # MVC & API Controllers
│ ├── Views/ # Razor Views (Host, Guest, Admin, Account)
│ ├── wwwroot/ # Static Assets (CSS, JS, Images, Icons)
│ ├── appsettings.json # Configuration settings & Connection Strings
│ └── Program.cs # Dependency Injection & Middleware Pipeline
│
├── Havenly.BLL.Tests/ # Unit & Integration Tests for Business Services
└── Havenly.DAL.Tests/ # Data Access & Repository Unit Tests
Update Havenly.PL/appsettings.json with your environment credentials:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=HavenlyDb;Trusted_Connection=True;TrustServerCertificate=True;"
},
"Authentication": {
"Google": {
"ClientId": "YOUR_GOOGLE_CLIENT_ID",
"ClientSecret": "YOUR_GOOGLE_CLIENT_SECRET"
}
},
"Paymob": {
"ApiKey": "YOUR_PAYMOB_API_KEY",
"IntegrationId": "YOUR_INTEGRATION_ID",
"IframeId": "YOUR_IFRAME_ID",
"HmacSecret": "YOUR_HMAC_SECRET",
"IsTestMode": true
},
"EmailSettings": {
"SmtpServer": "smtp.gmail.com",
"Port": 587,
"SenderEmail": "your-email@gmail.com",
"SenderPassword": "your-app-password",
"SenderDisplayName": "Havenly"
},
"HuggingFace": {
"ApiKey": "YOUR_HUGGINGFACE_API_KEY",
"ApiEndpoint": "https://router.huggingface.co/v1/chat/completions",
"Model": "Qwen/Qwen2.5-Coder-32B-Instruct"
}
}
The application automatically applies EF Core migrations and seeds foundational roles, permissions, and initial data on startup.
If you prefer to apply migrations manually via CLI:
dotnet ef database update --project Havenly.DAL --startup-project Havenly.PL
# Navigate to the presentation project
cd Havenly.PL
# Restore and run
dotnet restore
dotnet run
Open your browser at http://localhost:5071 (or the configured port).
Run the automated test suites using the .NET CLI:
# Run all tests across the solution
dotnet test
# Run BLL service tests specifically
dotnet test Havenly.BLL.Tests
# Run repository tests
dotnet test Havenly.DAL.Tests
Developed as an Information Technology Institute (ITI) Graduation Project.
C#
50.9%
HTML
46.3%
JavaScript
1.7%
CSS
1.1%