How ty202502125-cyber/pri_mech-rlm works
Spoke & Wrench is a bicycle-service booking and workshop-management application: customers discover services, authenticate, manage bicycles, request individual or grouped appointments, submit payments, and follow repairs; mechanics administer schedules, bookings, repairs, and content. The React app calls a Laravel API backed by the existing MySQL database, with Sanctum sessions. The graph retains the documented payment, photo, notification, and admin capabilities. Some frontend pages and backend controllers were not sampled, so their internal interactions are not inferred.
Main entry points: api.php API routing · BookingController.php Booking requests · api.js API client · AdminController.php Admin scheduling
Components 24
Customer experience
- React application
FRONTEND/src/App.jsx - Service catalogue
FRONTEND/src/components/ServiceList.jsx - Booking and account
FRONTEND/src/pages - API client
FRONTEND/src/services/api.js
Workshop interface
- Repair workspace
FRONTEND/src/components/RepairWorkspace.jsx
Laravel API
- API routing
BACKEND/routes/api.php - Authentication
BACKEND/app/Http/Controllers/Api/AuthController.php - Customer profiles
BACKEND/app/Http/Controllers/Api/CustomerController.php - Service and availability reads
BACKEND/app/Http/Controllers/Api/ServiceController.php - Public content
BACKEND/app/Http/Controllers/Api/PublicContentController.php - Notifications
BACKEND/app/Http/Controllers/Api/NotificationController.php - User and roles
BACKEND/app/Models/User.php
Booking operations
- Booking requests
BACKEND/app/Http/Controllers/Api/BookingController.php - Availability rules
BACKEND/app/Services/AvailabilityService.php - Booking workflow
BACKEND/app/Services/BookingWorkflowService.php - Payment verification
BACKEND/app/Http/Controllers/Api/PaymentController.php
Workshop operations
- Repair management
BACKEND/app/Http/Controllers/Api/RepairController.php - Booking photos
BACKEND/app/Http/Controllers/Api/BookingPhotoController.php - Private file access
BACKEND/app/Services/PrivateFileService.php - Admin scheduling
BACKEND/app/Http/Controllers/Api/AdminController.php - Admin content
BACKEND/app/Http/Controllers/Api/AdminContentController.php
Other components
- Customer
- Mechanic / admin
- MySQL database
Connections 27
- Customer → React application: uses
README.md - Mechanic / admin → React application: uses
README.md - Service catalogue → API client: requests services
FRONTEND/src/components/ServiceList.jsx - Booking and account → API client: uses API
FRONTEND/src/pages/AuthPage.jsx - Repair workspace → API client: uses API
FRONTEND/src/components/RepairWorkspace.jsx - API client → API routing: sends API requests
README.md - API routing → Authentication: routes to
BACKEND/routes/api.php - API routing → Customer profiles: routes to
BACKEND/routes/api.php - API routing → Service and availability reads: routes to
BACKEND/routes/api.php - API routing → Booking requests: routes to
BACKEND/routes/api.php - API routing → Payment verification: routes to
BACKEND/routes/api.php - API routing → Repair management: routes to
BACKEND/routes/api.php - API routing → Booking photos: routes to
BACKEND/routes/api.php - API routing → Admin scheduling: routes to
BACKEND/routes/api.php - API routing → Admin content: routes to
BACKEND/routes/api.php - API routing → Public content: routes to
BACKEND/routes/api.php - API routing → Notifications: routes to
BACKEND/routes/api.php - Booking requests → Availability rules: checks slots
BACKEND/app/Http/Controllers/Api/BookingController.php - Booking requests → Booking workflow: sends notifications
BACKEND/app/Http/Controllers/Api/BookingController.php - Admin scheduling → Availability rules: checks closures
BACKEND/app/Http/Controllers/Api/AdminController.php - Service and availability reads → MySQL database: reads schedules
- Availability rules → MySQL database: reads capacity data
BACKEND/app/Services/AvailabilityService.php - Admin scheduling → MySQL database: reads and writes
BACKEND/app/Http/Controllers/Api/AdminController.php - Booking requests → MySQL database: writes bookings
BACKEND/app/Http/Controllers/Api/BookingController.php - Authentication → User and roles: uses user
BACKEND/app/Http/Controllers/Api/AuthController.php - Payment verification → Private file access: manages proof files
BACKEND/app/Http/Controllers/Api/PaymentController.php - Booking photos → Private file access: uses file service
BACKEND/app/Http/Controllers/Api/BookingPhotoController.php