How ma7moudkolib/sportsxbooking works
SportsXBooking is a multi-role sports-venue booking platform. Players browse venues, inspect details and reviews, then submit bookings; the backend validates availability and pricing, persists pending bookings, and owners manage bookings and analytics while admins manage users. Payment, authentication, reviews, and image storage are distinct supporting capabilities. The graph follows documented workflows and relationships shown in the supplied excerpts and SOURCE INDEX; unsampled implementation details are represented only where the README documents them.
Main entry points: app.routes.ts Role-based routes · ServiceManager.cs Service manager · RepositoryManager.cs Repository unit of work · RepositoryContext.cs SQL Server data
Components 31
Angular client
- Role-based routes
Frontend/src/app/app.routes.ts - Venue discovery
Frontend/src/app/features/playgrounds/gallery/playground-gallery.component.ts - Venue details
Frontend/src/app/features/playgrounds/detail/playground-detail.component.ts - Booking management
Frontend/src/app/features/bookings/my-bookings/my-bookings.component.ts - Owner dashboard
Frontend/src/app/features/management/owner-dashboard/owner-dashboard.component.ts - Admin user tools
Frontend/src/app/features/management/admin-users/admin-users.component.ts - Login and registration
Frontend/src/app/features/auth/login/login.component.ts - API client services
Frontend/src/app/core/services/playground.service.ts - Auth state and requests
Frontend/src/app/core/services/auth.service.ts
API and application
- REST controllers
Backend/Presentation/Controllers/BookingsController.cs - Service manager
Backend/Application/Services/ServiceManager.cs - Booking rules
Backend/Application/Services/BookingService.cs - Venue management
Backend/Application/Services/PlaygroundService.cs - Review handling
Backend/Application/Services/ReviewService.cs - Payment workflow
Backend/Application/Services/PaymentService.cs - Authentication and JWT
Backend/Application/Services/AuthenticationService.cs - User administration
Backend/Application/Services/UserService.cs - Exception handling
Backend/Presentation/Extensions/ExceptionMiddlewareExtensions.cs
Persistence and integrations
- Image storage
Backend/Infrastructure/Services/CloudinaryStorageService.cs - PayPal gateway
Backend/Infrastructure/Services/PayPalGateway.cs - Repository unit of work
Backend/Infrastructure/Repositories/RepositoryManager.cs - Entity repositories
Backend/Infrastructure/Repositories/BookingRepository.cs - SQL Server data
Backend/Infrastructure/DatabaseContext/RepositoryContext.cs
Domain model
- Booking records
Backend/Domain/Entities/Booking.cs - Playground records
Backend/Domain/Entities/Playground.cs - Review records
Backend/Domain/Entities/Review.cs - Payment records
Backend/Domain/Entities/Payment.cs - User and roles
Backend/Domain/Entities/User.cs
Other components
- Player
- Facility owner
- Admin
Connections 46
- Player → Role-based routes: opens
Frontend/src/app/app.routes.ts - Facility owner → Role-based routes: opens
- Admin → Role-based routes: opens
- Role-based routes → Venue discovery: routes to
Frontend/src/app/app.routes.ts - Role-based routes → Venue details: routes to
Frontend/src/app/app.routes.ts - Role-based routes → Booking management: routes to
Frontend/src/app/app.routes.ts - Role-based routes → Owner dashboard: routes to
Frontend/src/app/app.routes.ts - Role-based routes → Admin user tools: routes to
Frontend/src/app/app.routes.ts - Role-based routes → Login and registration: routes to
Frontend/src/app/app.routes.ts - Venue discovery → API client services: requests venues
- Venue details → API client services: requests details
- Booking management → API client services: requests bookings
- Owner dashboard → API client services: requests management
- Admin user tools → API client services: requests users
- Login and registration → Auth state and requests: submits credentials
- API client services → REST controllers: calls API
- Auth state and requests → REST controllers: calls API
- REST controllers → Service manager: dispatches
Backend/Presentation/Controllers/BookingsController.cs - Service manager → Booking rules: exposes
Backend/Application/Services/ServiceManager.cs - Service manager → Venue management: exposes
Backend/Application/Services/ServiceManager.cs - Service manager → Review handling: exposes
Backend/Application/Services/ServiceManager.cs - Service manager → Payment workflow: exposes
Backend/Application/Services/ServiceManager.cs - Service manager → Authentication and JWT: exposes
Backend/Application/Services/ServiceManager.cs - Service manager → User administration: exposes
Backend/Application/Services/ServiceManager.cs - Booking rules → Repository unit of work: uses repositories
- Venue management → Repository unit of work: uses repositories
- Review handling → Repository unit of work: reads and saves
Backend/Application/Services/ReviewService.cs - Payment workflow → Repository unit of work: uses repositories
- Authentication and JWT → User and roles: creates and authenticates
Backend/Application/Services/AuthenticationService.cs - Authentication and JWT → Repository unit of work: saves changes
Backend/Application/Services/AuthenticationService.cs - User administration → Repository unit of work: uses repositories
- Venue management → Image storage: stores images
- Payment workflow → PayPal gateway: processes payment
- Repository unit of work → Entity repositories: coordinates
Backend/Infrastructure/Repositories/RepositoryManager.cs - Entity repositories → SQL Server data: queries and saves
Backend/Infrastructure/Repositories/RepositoryManager.cs - SQL Server data → Booking records: persists
Backend/Infrastructure/DatabaseContext/RepositoryContext.cs - SQL Server data → Playground records: persists
Backend/Infrastructure/DatabaseContext/RepositoryContext.cs - SQL Server data → Review records: persists
Backend/Infrastructure/DatabaseContext/RepositoryContext.cs - SQL Server data → Payment records: persists
Backend/Infrastructure/DatabaseContext/RepositoryContext.cs - SQL Server data → User and roles: persists
Backend/Infrastructure/DatabaseContext/RepositoryContext.cs - Review handling → Playground records: checks venue
Backend/Application/Services/ReviewService.cs - Review handling → Review records: creates review
Backend/Application/Services/ReviewService.cs - Exception handling → REST controllers: handles failures
- Booking rules → Booking records: creates and updates
- Facility owner → Owner dashboard: manages facilities
- Admin → Admin user tools: manages users