How lucasffigueiredo/backend-ebusworkspace works
This is a .NET REST API for reserving desks and meeting rooms. Employees authenticate, discover spaces, create reservations, check in, and request extensions; Facilities or managers handle approvals and maintenance. Separate capabilities cover access requests, user roles, dashboards, audit history, and automatic no-show processing. The code follows Clean Architecture with CQRS/MediatR handlers, repository interfaces, and PostgreSQL-backed read/write contexts. Some subsystems are represented from the README and file tree rather than inspected source; those links are documented relationships, not claims of direct calls.
Main entry points: Handlers MediatR dispatch · ReservationRepository.cs Reservation repository · Reservations Reservation workflows · GetDashboardMetricsQueryHandler.cs Dashboard metrics
Components 22
REST API
- Reservation endpoints
src/JCA.WorkSpace.Service.API/Controllers/ReservationsController.cs - Space endpoints
src/JCA.WorkSpace.Service.API/Controllers/SpacesController.cs - User and access endpoints
src/JCA.WorkSpace.Service.API/Controllers/UsersController.cs - Authentication endpoints
src/JCA.WorkSpace.Service.API/Controllers/AuthController.cs
Application workflows
- MediatR dispatch
src/JCA.WorkSpace.Application/Handlers - Reservation workflows
src/JCA.WorkSpace.Application/Handlers/Reservations - Space and maintenance
src/JCA.WorkSpace.Application/Handlers/Spaces - Users and access
src/JCA.WorkSpace.Application/Handlers/Users - Google login
src/JCA.WorkSpace.Application/Handlers/Login/LoginGoogleCommandHandler.cs - Access approvals
src/JCA.WorkSpace.Application/Handlers/AccessRequests
Workspace domain
- Reservations and extensions
src/JCA.WorkSpace.Domain/Entities/Reservation.cs - Spaces
src/JCA.WorkSpace.Domain/Entities/Space.cs - Users
src/JCA.WorkSpace.Domain/Entities/User.cs
Persistence
- Reservation repository
src/JCA.WorkSpace.Infrastructure.Data/Repositories/ReservationRepository.cs - Space repository
src/JCA.WorkSpace.Infrastructure.Data/Repositories/SpaceRepository.cs - Workspace contexts
src/JCA.WorkSpace.Infrastructure.Data/Contexts/WorkSpaceContext.cs
Background and insights
- Dashboard metrics
src/JCA.WorkSpace.Application/Handlers/Dashboards/GetDashboardMetricsQueryHandler.cs - Audit history
src/JCA.WorkSpace.Application/Handlers/AudiLogs/GetAuditLogsQueryHandler.cs - No-show worker
src/JCA.WorkSpace.Service.API/Workers/NoShowWorker.cs - No-show processing
src/JCA.WorkSpace.Application/Handlers/NoShows/ProcessNoShowsCommandHandler.cs
Other components
- Employees and staff
- PostgreSQL
Connections 24
- Employees and staff → Reservation endpoints: uses
- Employees and staff → Space endpoints: browses
- Employees and staff → Authentication endpoints: authenticates
- Reservation endpoints → MediatR dispatch: sends requests
src/JCA.WorkSpace.Service.API/Controllers/ReservationsController.cs - Space endpoints → MediatR dispatch: dispatches queries
- User and access endpoints → MediatR dispatch: dispatches requests
- Authentication endpoints → MediatR dispatch: dispatches login
- MediatR dispatch → Reservation workflows: routes requests
- MediatR dispatch → Space and maintenance: routes requests
- MediatR dispatch → Users and access: routes requests
- MediatR dispatch → Google login: routes login
- MediatR dispatch → Access approvals: routes requests
- Reservation workflows → Reservation repository: queries and updates
- Space and maintenance → Space repository: queries and updates
- Dashboard metrics → Reservation repository: reads reservations
src/JCA.WorkSpace.Application/Handlers/Dashboards/GetDashboardMetricsQueryHandler.cs - Dashboard metrics → Space repository: reads spaces
src/JCA.WorkSpace.Application/Handlers/Dashboards/GetDashboardMetricsQueryHandler.cs - Reservation workflows → Reservation repository: reads reservations
- Reservation repository → Workspace contexts: queries
src/JCA.WorkSpace.Infrastructure.Data/Repositories/ReservationRepository.cs - Space repository → Workspace contexts: queries
src/JCA.WorkSpace.Infrastructure.Data/Repositories/SpaceRepository.cs - Workspace contexts → PostgreSQL: persists data
- Employees and staff → Dashboard metrics: views metrics
- Employees and staff → Audit history: reviews actions
- No-show worker → No-show processing: processes no-shows
- No-show processing → Reservation repository: updates statuses