Start / End
Action / Step
Decision Point
Success
Error / Fail
Email / OTP
Payment
Real-time Chat
CEO / Admin
01

User Journey Flows

🏠 Renter Journey
Registration & Login
User Visits NestInn
Click Register / Sign Up
Fill Form: Name, Email, Phone, Password
Password Hashed (BCrypt) + Stored in DB
📧 OTP Sent to Email via Gmail SMTP
OTP Verified?
YES
Account Activated ✓
NO
Resend OTP / Expire
JWT Token Set in HTTP-Only Cookie 🍪
Property Search
Land on Home Page
View Top Rated Properties by Category
Search: Location + Dates + Type + Features
Results in List / Card View
Click Property → View 4-5 Photos
View Description, Amenities, Rules, Transport
Check Availability Calendar 📅
Select Dates → View Price Breakdown
Booking & Payment
Click "Reserve Now"
User Logged In?
NO
Redirect to Login
YES
Booking Summary Page
💳 Dummy Payment Gateway (RazorPay later)
Payment Success?
YES
Booking Confirmed ✓
FAIL
Refund in 3-4 Days
📧 Invoice PDF Auto-Sent to User Email
10% Platform Fee → CEO Earnings Pool
After Booking
💬 Real-time Chat Unlocked with Owner
Booking Complete 🎉
🏢 Property Owner Journey
Registration & Login
Owner Visits NestInn
Click "List Your Property"
Register: Name, Email, Phone, Business Info
Password Hashed (BCrypt) + Role = "Owner"
📧 OTP Sent to Email via Gmail SMTP
OTP Verified?
YES
Account Activated ✓
NO
Resend / Expire
JWT Token Set in HTTP-Only Cookie 🍪
Owner Dashboard Loaded
Property Management
Click "Add New Property"
Fill Property Details:
Title, Type, Location, Description
Upload 4-5 Photos → Server Folder
Set: Price (non-negotiable), Check-in/out Time
Add: Nearest Transport, Rules & Regulations
Add: Amenities (Pool, Garden, Beach, etc.)
Property Listed ✓ Visible to Renters
Owner Can: View / Edit / Delete Properties
Booking Notifications
📧 Email: User Booked Your Property!
View Booking in Dashboard
Confirm Reservation?
YES
Status → Confirmed
NO
Status → Declined
Messaging
View Inbox: Messages from Users
💬 Real-time Chat (Post-Booking Only)
Reply to Messages
Owner Operations Complete 🏢
👑 CEO / Admin Journey
Login (No Registration)
CEO Visits NestInn Admin
Login with Hardcoded Credentials
JWT Token Set (Role = "CEO") 🍪
Valid Credentials?
YES
CEO Dashboard 👑
NO
Access Denied
Dashboard Overview
📊 Charts: Platform Growth, Bookings Trend
View All: New Properties Added
View All: Bookings Made (read-only)
View All: Registered Users & Owners
⚠️ CEO Cannot Modify Any Data
Earnings Management
💰 Today's Earnings (10% platform fee)
📅 Weekly Earnings View
📆 Monthly Earnings View
📈 Annual + Total Earnings View
Already Withdrawn vs Pending Balance
Request Withdrawal?
YES
Dummy Withdraw ✓
(RazorPay later)
NO
Balance Stays
CEO Session Complete 👑
02

Payment → Email → Chat Flow

User Selects
Dates & Property
Booking
Summary Page
💳 Dummy
Payment
✓ Payment
Success
10% Fee →
CEO Pool
💬 Chat
Unlocked

💳 Payment
Fails
❌ Booking
Cancelled
Refund in
3-4 Days
User Can
Retry Booking
03

OTP Verification Flow (Gmail SMTP)

User / Owner
Registers
Generate 6-digit
OTP in DB
📧 Send OTP via
Gmail SMTP
User Enters
OTP
Check OTP
+ Expiry (10 min)
✓ Verified →
Account Active

Wrong / Expired
OTP
Resend OTP
(max 3 tries)
3 Fails →
Account Locked
Try Again
After 30 min
04

Database Design (SQL Server)

👤 Users
PK UserId
FullName
Email (unique)
Phone
PasswordHash
Role (Renter/Owner/CEO)
IsVerified
OTP + OTPExpiry
CreatedAt
🏠 Properties
PK PropertyId
FK OwnerId → Users
Title, Description
Type (Flat/Villa/Apt)
Location, City
PricePerNight
CheckInTime, CheckOutTime
NearestTransport
Rules, Amenities
IsAvailable
🖼️ PropertyImages
PK ImageId
FK PropertyId
ImageUrl (server path)
DisplayOrder (1-5)
UploadedAt
📅 Bookings
PK BookingId
FK UserId → Users
FK PropertyId
CheckInDate
CheckOutDate
TotalAmount
PlatformFee (10%)
Status (Pending/Confirmed)
PaymentStatus
BookedAt
💬 Messages
PK MessageId
FK BookingId
FK SenderId → Users
FK ReceiverId → Users
Content
SentAt
IsRead
💰 Earnings
PK EarningId
FK BookingId
Amount (10%)
EarnedAt
IsWithdrawn
WithdrawnAt
📧 OTPVerifications
PK OTPId
FK UserId → Users
OTPCode
ExpiresAt
IsUsed
Attempts (max 3)
⭐ Reviews
PK ReviewId
FK BookingId
FK UserId → Users
FK PropertyId
Rating (1-5)
Comment
CreatedAt
05

API Endpoints (.NET Core Web API)

🔐 Auth Controller
POST/api/auth/register
POST/api/auth/verify-otp
POST/api/auth/resend-otp
POST/api/auth/login
POST/api/auth/logout
GET/api/auth/me
🏠 Property Controller
GET/api/properties
GET/api/properties/{id}
GET/api/properties/search
POST/api/properties (Owner)
PUT/api/properties/{id}
DEL/api/properties/{id}
POST/api/properties/{id}/images
📅 Booking Controller
POST/api/bookings
GET/api/bookings/my
GET/api/bookings/{id}
PUT/api/bookings/{id}/confirm
GET/api/bookings/availability/{propId}
💬 Message Controller
POST/api/messages/send
GET/api/messages/{bookingId}
PUT/api/messages/read/{id}
🔌 SignalR Hub: /hubs/chat
💳 Payment Controller
POST/api/payment/initiate
POST/api/payment/confirm
POST/api/payment/refund
GET/api/payment/invoice/{bookingId}
👑 CEO Controller
GET/api/ceo/dashboard
GET/api/ceo/earnings
GET/api/ceo/earnings/summary
POST/api/ceo/withdraw
GET/api/ceo/users
GET/api/ceo/properties
GET/api/ceo/bookings
06

Sprint Plan (5–6 Days)

🗓️ Sprint 1 — Day 1 & 2 · Foundation
GitHub repo setup: branches Sprint1, Sprint2, Sprint3 → main
SQL Server DB schema creation in SSMS (all tables)
.NET Core Web API project setup in Visual Studio
Entity Framework Core + DB context + migrations
Auth: Register, BCrypt hash, OTP via Gmail SMTP
Auth: Login, JWT token, HTTP-only cookie set
Auth: Logout, role-based middleware (Renter/Owner/CEO)
Angular project setup in VS Code + routing + teal theme
Angular: Register, Login, OTP verify pages
Test all auth APIs on Postman
🗓️ Sprint 2 — Day 3 & 4 · Core Features
Owner dashboard: add/edit/delete properties with image upload
Property images stored in server wwwroot folder
Set pricing, check-in/out times, amenities, rules, transport
Home page: top-rated properties, search & filter API
Property detail page: photo gallery, calendar availability
Booking flow: summary page → dummy payment → confirm
Post-payment: invoice PDF auto-email to user (NestInn theme)
Booking alert email sent to owner
Owner: confirm/decline reservation in dashboard
Test all booking & property APIs on Postman + Swagger UI
🗓️ Sprint 3 — Day 5 & 6 · Advanced + Polish
Real-time chat with SignalR (unlock after payment success)
CEO dashboard: read-only view of all data
CEO earnings: today/week/month/annual with charts (Chart.js)
CEO withdraw flow (dummy) + withdrawn vs pending balance
Footer: Support, Hosting, NestInn sections (Airbnb-style)
Email templates styled to match NestInn teal theme
Full Swagger UI documentation for all endpoints
Final Postman collection: all endpoints tested
Merge Sprint branches → main on GitHub
Final review, code cleanup, capstone report writing