How salemamenallah32-beep/agence-de-voyage- works
This is a travel-agency booking application: clients authenticate, explore voyages, place reservations, and manage bookings; administrators manage voyages, reservations, and clients. Reviews and payments are additional reservation-related capabilities. The React app routes users to role-specific dashboards and uses a shared API service, while Laravel exposes controllers backed by Eloquent domain models. The excerpts show frontend API usage and backend controller/model behavior, but do not establish the frontend-to-backend URL or request mapping; that boundary is shown as unverified.
Main entry points: api.php API routes · api.ts API service · App.tsx App routing · Reservation.php Reservations
Components 27
Web application
- App routing
frontend/src/App.tsx - Authentication
frontend/src/contexts/AuthContext.tsx - Login and registration
frontend/src/components/auth - Client dashboard
frontend/src/components/client/ClientDashboard.tsx - Voyage browsing
frontend/src/components/client/VoyagesList.tsx - Voyage details and booking
frontend/src/components/client/VoyageDetails.tsx - My reservations
frontend/src/components/client/MyReservations.tsx - Admin dashboard
frontend/src/components/admin/AdminDashboard.tsx - Voyage management
frontend/src/components/admin/VoyagesManagement.tsx - Reservation management
frontend/src/components/admin/ReservationsManagement.tsx - Client management
frontend/src/components/admin/ClientsManagement.tsx - Voyage chat widget
frontend/src/components/utils/Tsypchatwidget.tsx - API service
frontend/src/services/api.ts
Backend API
- API routes
backend/routes/api.php - Authentication controller
backend/app/Http/Controllers/AuthController.php - Voyage controller
backend/app/Http/Controllers/VoyageController.php - Destination controller
backend/app/Http/Controllers/DestinationController.php - Reservation controller
backend/app/Http/Controllers/ReservationController.php - Payment controller
backend/app/Http/Controllers/PaymentController.php - Review controller
backend/app/Http/Controllers/ReviewController.php
Travel domain
- Users
backend/app/Models/User.php - Destinations
backend/app/Models/Destination.php - Voyages
backend/app/Models/Voyage.php - Reservations
backend/app/Models/Reservation.php - Payments
backend/app/Models/Payment.php - Reviews
backend/app/Models/Review.php
Other components
- User
Connections 41
- User → App routing: uses
- App routing → Authentication: provides auth
frontend/src/App.tsx - App routing → Login and registration: routes to
frontend/src/App.tsx - App routing → Client dashboard: routes to
frontend/src/App.tsx - App routing → Admin dashboard: routes to
frontend/src/App.tsx - App routing → Voyage chat widget: renders
frontend/src/App.tsx - Authentication → API service: calls
frontend/src/contexts/AuthContext.tsx - Client dashboard → Voyage browsing: routes to
frontend/src/components/client/ClientDashboard.tsx - Client dashboard → Voyage details and booking: routes to
frontend/src/components/client/ClientDashboard.tsx - Client dashboard → My reservations: routes to
frontend/src/components/client/ClientDashboard.tsx - Admin dashboard → Voyage management: renders
frontend/src/components/admin/AdminDashboard.tsx - Admin dashboard → Reservation management: renders
frontend/src/components/admin/AdminDashboard.tsx - Admin dashboard → Client management: renders
frontend/src/components/admin/AdminDashboard.tsx - Client management → API service: requests clients
frontend/src/components/admin/ClientsManagement.tsx - Voyage browsing → API service: requests data
- Voyage details and booking → API service: requests data
- My reservations → API service: requests data
- Voyage management → API service: requests data
- Reservation management → API service: requests data
- API service → API routes: HTTP requests
- API routes → Authentication controller: routes to
backend/routes/api.php - API routes → Voyage controller: routes to
backend/routes/api.php - API routes → Destination controller: routes to
backend/routes/api.php - API routes → Reservation controller: routes to
backend/routes/api.php - API routes → Payment controller: routes to
backend/routes/api.php - API routes → Review controller: routes to
backend/routes/api.php - Authentication controller → Users: queries
backend/app/Http/Controllers/AuthController.php - Voyage controller → Voyages: queries
backend/app/Http/Controllers/VoyageController.php - Destination controller → Destinations: queries
backend/app/Http/Controllers/DestinationController.php - Reservation controller → Reservations: creates and updates
backend/app/Http/Controllers/ReservationController.php - Reservation controller → Voyages: checks availability
backend/app/Http/Controllers/ReservationController.php - Reservation controller → Payments: creates payment
backend/app/Http/Controllers/ReservationController.php - Review controller → Reservations: checks completion
backend/app/Http/Controllers/ReviewController.php - Review controller → Reviews: creates and moderates
backend/app/Http/Controllers/ReviewController.php - Destinations → Voyages: has many
backend/app/Models/Destination.php - Voyages → Reservations: has many
backend/app/Models/Voyage.php - Voyages → Reviews: has many
backend/app/Models/Voyage.php - Users → Reservations: has many
backend/app/Models/User.php - Users → Reviews: has many
backend/app/Models/User.php - Reservations → Payments: has one
backend/app/Models/Reservation.php - Reservations → Reviews: has one
backend/app/Models/Reservation.php