How vappelquist/restaurant_toltarna works
REST-aurant is a restaurant-reservation REST API for customers and staff. The main workflow accepts a booking request, finds or creates its guest, checks and allocates tables, then persists the reservation; API routes also support booking lookup, schedule/status changes, guest management, and table administration. The graph separates HTTP endpoints, booking and table operations, guest operations, and persistence/domain structure. Some links rely on the SOURCE INDEX or README because implementation excerpts are partial; unsampled behavior is not expanded beyond documented capabilities.
Main entry points: RestaurantDbContext.cs Restaurant data context · Program.cs API composition · BookingService.cs Booking operations · TableService.cs Availability and allocation
Components 19
HTTP API
- Booking endpoints
REST-aurant.API/Controllers/BookingController.cs - Guest endpoints
REST-aurant.API/Controllers/GuestController.cs - Table endpoints
REST-aurant.API/Controllers/TableController.cs - Service results and errors
REST-aurant.API/Services/ServiceResult.cs - Service interfaces
REST-aurant.API/Services - API composition
REST-aurant.API/Program.cs - Booking validation
REST-aurant.API/Validators/PlaceBookingValidator.cs
Reservations
- Booking operations
REST-aurant.API/Services/BookingService.cs - Availability and allocation
REST-aurant.API/Services/TableService.cs - Booking contracts
REST-aurant.API/DTOs/Booking.cs - Booking date contracts
REST-aurant.API/DTOs/BookingDateDto.cs - Date-change contract
REST-aurant.API/DTOs/BookingDateChangeDto.cs - Table status contract
REST-aurant.API/DTOs/TableStatusDto.cs
Guest management
- Guest operations
REST-aurant.API/Services/GuestService.cs - Guest contracts
REST-aurant.API/DTOs/GuestDTOs.cs
Persistence and domain
- Restaurant data context
REST-aurant.API/Data/RestaurantDbContext.cs - SQL Server database
- Restaurant domain models
Restaurant.Models/Models
Other components
- Customer / staff
Connections 17
- Customer / staff → Booking endpoints: submits requests
README.md - Customer / staff → Guest endpoints: manages guests
README.md - Customer / staff → Table endpoints: manages tables
- Booking endpoints → Booking operations: delegates booking
REST-aurant.API/Controllers/BookingController.cs - Guest endpoints → Guest operations: delegates guest tasks
REST-aurant.API/Controllers/GuestController.cs - Table endpoints → Availability and allocation: delegates table tasks
REST-aurant.API/Controllers/TableController.cs - Booking operations → Availability and allocation: allocates tables
REST-aurant.API/Services/BookingService.cs - Booking operations → Restaurant data context: reads and writes
REST-aurant.API/Services/BookingService.cs - Guest operations → Restaurant data context: reads and writes
REST-aurant.API/Services/GuestService.cs - Availability and allocation → Restaurant data context: reads and writes
REST-aurant.API/Services/TableService.cs - Restaurant data context → Restaurant domain models: maps entities
REST-aurant.API/Data/RestaurantDbContext.cs - API composition → Booking operations: registers service
REST-aurant.API/Program.cs - API composition → Guest operations: registers service
REST-aurant.API/Program.cs - API composition → Availability and allocation: registers service
REST-aurant.API/Program.cs - API composition → Restaurant data context: configures context
REST-aurant.API/Program.cs - API composition → Booking validation: registers validation
REST-aurant.API/Program.cs - Restaurant data context → SQL Server database: uses SQL Server