How srpatel07/smartstay works
SmartStay is a hotel-booking application with an Angular client and an ASP.NET Core API backed by SQL Server through Dapper and stored procedures. The user-facing journey is browsing hotels and rooms, then creating and managing bookings; authentication and profile management support protected actions. The API also exposes hotel administration, reviews, offers, packages, and dashboard capabilities. The excerpts establish several controller-to-repository calls and frontend route mappings; links for unsampled feature implementations and most client-to-API calls are omitted rather than inferred.
Main entry points: app.routes.ts Route dispatch · Implementations Other repositories · auth.service.ts Authentication UI · AuthController.cs Identity and profile
Components 23
Angular client
- Route dispatch
frontend/smartstay-ui/src/app/app.routes.ts - Authentication UI
frontend/smartstay-ui/src/app/services/auth.service.ts - Hotel browsing
frontend/smartstay-ui/src/app/pages/hotels/hotels.ts - Room selection
frontend/smartstay-ui/src/app/pages/rooms/rooms.ts - Booking journey
frontend/smartstay-ui/src/app/pages/booking/booking.ts - My bookings
frontend/smartstay-ui/src/app/pages/my-bookings/my-bookings.ts - Admin dashboard
frontend/smartstay-ui/src/app/pages/admin/admin.ts
ASP.NET API
- Identity and profile
backend/SmartStay.API/Controllers/AuthController.cs - Hotel catalog
backend/SmartStay.API/Controllers/HotelController.cs - Room catalog
backend/SmartStay.API/Controllers/RoomController.cs - Booking management
backend/SmartStay.API/Controllers/BookingController.cs - Reviews
backend/SmartStay.API/Controllers/ReviewController.cs - Dashboard data
backend/SmartStay.API/Controllers/DashboardController.cs - Offers
backend/SmartStay.API/Controllers/OfferController.cs - Packages
backend/SmartStay.API/Controllers/PackageController.cs
Persistence layer
- Identity repository
backend/SmartStay.API/Repositories/Implementations/AuthRepository.cs - Hotel repository
backend/SmartStay.API/Repositories/Implementations/HotelRepository.cs - Room repository
backend/SmartStay.API/Repositories/Implementations/RoomRepository.cs - Booking repository
backend/SmartStay.API/Repositories/Implementations/BookingRepository.cs - Review repository
backend/SmartStay.API/Repositories/Implementations/ReviewRepository.cs - Other repositories
backend/SmartStay.API/Repositories/Implementations
Other components
- Traveler
- SQL Server
Connections 21
- Traveler → Route dispatch: uses
frontend/smartstay-ui/src/app/app.routes.ts - Route dispatch → Hotel browsing: routes to
frontend/smartstay-ui/src/app/app.routes.ts - Route dispatch → Room selection: routes to
frontend/smartstay-ui/src/app/app.routes.ts - Route dispatch → Booking journey: routes to
frontend/smartstay-ui/src/app/app.routes.ts - Route dispatch → My bookings: routes to
frontend/smartstay-ui/src/app/app.routes.ts - Route dispatch → Admin dashboard: routes to
frontend/smartstay-ui/src/app/app.routes.ts - Route dispatch → Authentication UI: guards with
frontend/smartstay-ui/src/app/app.routes.ts - Authentication UI → Identity and profile: requests profile
frontend/smartstay-ui/src/app/services/auth.service.ts - Identity and profile → Identity repository: calls
backend/SmartStay.API/Controllers/AuthController.cs - Hotel catalog → Hotel repository: calls
backend/SmartStay.API/Controllers/HotelController.cs - Room catalog → Room repository: calls
backend/SmartStay.API/Controllers/RoomController.cs - Booking management → Booking repository: calls
backend/SmartStay.API/Controllers/BookingController.cs - Reviews → Review repository: calls
backend/SmartStay.API/Controllers/ReviewController.cs - Identity repository → SQL Server: executes procedures
backend/SmartStay.API/Repositories/Implementations/AuthRepository.cs - Booking repository → SQL Server: executes procedures
backend/SmartStay.API/Repositories/Implementations/BookingRepository.cs - Review repository → SQL Server: executes procedures
backend/SmartStay.API/Repositories/Implementations/ReviewRepository.cs - Room repository → SQL Server: queries
backend/SmartStay.API/Repositories/Implementations/RoomRepository.cs - Hotel repository → SQL Server: queries
- Dashboard data → Other repositories: uses
- Offers → Other repositories: uses
- Packages → Other repositories: uses