How dkraiser/abp works
This is a small ASP.NET booking API with in-memory persistence. Users manage rooms, search availability, book rooms with optional services, and request utilization/revenue reports. The API controllers invoke application handlers, which apply domain rules and booking/pricing policies and use repository interfaces; the API startup registers implementations and initial configuration. The graph follows documented capabilities, but unsampled handlers, policies and report wiring are shown only where the README or indexed source references support them.
Main entry points: Program.cs Startup wiring · BookRoomsHandler.cs Booking workflow · ManageRoomsHandler.cs Room management · IRoomRepository.cs Room repository contract
Components 19
HTTP API
- Startup wiring
src/api/Program.cs - Room endpoints
src/api/controllers/RoomsController.cs - Booking endpoints
src/api/controllers/BookingsController.cs - Report endpoints
src/api/controllers/ReportsController.cs
Application workflows
- Room management
src/application/implementations/handlers/ManageRoomsHandler.cs - Availability search
src/application/implementations/handlers/SearchAvailableRoomsHandler.cs - Booking workflow
src/application/implementations/handlers/BookRoomsHandler.cs - Report calculations
src/application/implementations/handlers/ReportHandler.cs - Booking restrictions
src/application/implementations/policies/booking/ForbiddenPeriodPolicy.cs - Hourly pricing
src/application/implementations/policies/pricing/hoursPolicy/HoursPricingPolicy.cs
Booking domain
- Room and services
src/domain/entities/Room.cs - Service entity
src/domain/entities/Service.cs - Booking entity
src/domain/entities/Booking.cs - Result and errors
src/domain/result/Result.cs
In-memory storage
- Room repository contract
src/application/interfaces/repositories/IRoomRepository.cs - Booking repository contract
src/application/interfaces/repositories/IBookingRepository.cs - Strict room store
src/infrastructure/repositories/inMemory/strict/InMemoryStrictRoomRepository.cs - Strict booking store
src/infrastructure/repositories/inMemory/strict/InMemoryStrictBookingRepository.cs
Other components
- API client
Connections 32
- API client → Room endpoints: manages rooms
src/api/controllers/RoomsController.cs - API client → Booking endpoints: searches and books
src/api/controllers/BookingsController.cs - API client → Report endpoints: requests reports
src/api/controllers/ReportsController.cs - Startup wiring → Room endpoints: hosts API
src/api/Program.cs - Startup wiring → Booking endpoints: hosts API
src/api/Program.cs - Startup wiring → Report endpoints: hosts API
src/api/Program.cs - Startup wiring → Room management: registers handler
src/api/Program.cs - Startup wiring → Availability search: registers handler
src/api/Program.cs - Startup wiring → Booking workflow: registers handler
src/api/Program.cs - Startup wiring → Report calculations: registers handler
src/api/Program.cs - Startup wiring → Strict room store: registers store
src/api/Program.cs - Startup wiring → Strict booking store: registers store
src/api/Program.cs - Room endpoints → Room management: invokes
src/api/controllers/RoomsController.cs - Booking endpoints → Availability search: invokes
src/api/controllers/BookingsController.cs - Booking endpoints → Booking workflow: invokes
src/api/controllers/BookingsController.cs - Report endpoints → Report calculations: invokes
src/api/controllers/ReportsController.cs - Room management → Room repository contract: reads and writes
src/application/implementations/handlers/ManageRoomsHandler.cs - Availability search → Room repository contract: reads rooms
src/application/implementations/handlers/SearchAvailableRoomsHandler.cs - Availability search → Booking repository contract: checks bookings
src/application/implementations/handlers/SearchAvailableRoomsHandler.cs - Booking workflow → Room repository contract: loads room
src/application/implementations/handlers/BookRoomsHandler.cs - Booking workflow → Booking repository contract: checks and saves
src/application/implementations/handlers/BookRoomsHandler.cs - Report calculations → Room repository contract: reads rooms
src/application/implementations/handlers/ReportHandler.cs - Report calculations → Booking repository contract: reads bookings
src/application/implementations/handlers/ReportHandler.cs - Strict room store → Room repository contract: implements
src/infrastructure/repositories/inMemory/strict/InMemoryStrictRoomRepository.cs - Strict booking store → Booking repository contract: implements
src/infrastructure/repositories/inMemory/strict/InMemoryStrictBookingRepository.cs - Room management → Room and services: creates and updates
src/application/implementations/handlers/ManageRoomsHandler.cs - Room and services → Service entity: contains services
src/domain/entities/Room.cs - Booking workflow → Booking entity: constructs and prices
src/application/implementations/handlers/BookRoomsHandler.cs - Booking workflow → Booking restrictions: checks policies
src/application/implementations/handlers/BookRoomsHandler.cs - Booking workflow → Hourly pricing: calculates price
src/application/implementations/handlers/BookRoomsHandler.cs - Booking workflow → Result and errors: returns outcomes
src/application/implementations/handlers/BookRoomsHandler.cs - Room management → Result and errors: returns outcomes
src/application/implementations/handlers/ManageRoomsHandler.cs