How leyang050317/greenpool works
GreenPool is a carpooling application for drivers to publish and manage trips and passengers to find trips, request seats, and pay; it also supports vehicle-document onboarding, trip routing, ratings, safety, notifications, and tourist attractions. The main workflow runs from trip publication through booking and payment to post-trip ratings. Sampled controller excerpts and the SOURCE INDEX support the booking, trip, routing, and rating links; README statements establish Stripe and OCR behavior. Other listed capabilities are represented, but their internal links are omitted where source evidence was not shown.
Main entry points: PassengerBookingController.php Passenger bookings · PaymentService.php Payment handling · VehicleController.php Vehicle onboarding · TripController.php Trip management
Components 28
Accounts and vehicles
- Account access
app/Http/Controllers/Auth - Profiles
app/Http/Controllers/ProfileController.php - Vehicle onboarding
app/Http/Controllers/Driver/VehicleController.php - Document OCR
app/Services/Ocr - Vehicles
app/Models/Vehicle.php
Trips and bookings
- Trip management
app/Http/Controllers/Driver/TripController.php - Trips
app/Models/Trip.php - Trip routing
app/Services/Routing/TripDistanceService.php - Passenger bookings
app/Http/Controllers/Passenger/PassengerBookingController.php - Bookings
app/Models/Booking.php - Booking chat
app/Http/Controllers/ChatController.php
Payments and ratings
- Payment handling
app/Services/PaymentService.php - Stripe checkout
app/Services/StripeCheckoutService.php - Stripe webhook
app/Http/Controllers/StripeWebhookController.php - Payments
app/Models/Payment.php - Ratings
app/Http/Controllers/RatingController.php - Rating records
app/Models/Rating.php
Safety and support
- Emergency response
app/Http/Controllers/EmergencyController.php - Notifications
app/Services/NotificationDeliveryService.php - FAQ assistant
app/Services/GeminiFaqService.php
Attractions
- Tourist attractions
app/Http/Controllers/AttractionController.php - Attraction records
app/Models/Attraction.php
Other components
- Passenger
- Driver
- Web interface
- Google Maps
- Stripe
- Google Places
Connections 31
- Passenger → Passenger bookings: requests seats
app/Http/Controllers/Passenger/PassengerBookingController.php - Driver → Trip management: manages trips
app/Http/Controllers/Driver/TripController.php - Web interface → Account access: signs in
- Web interface → Profiles: edits profile
- Driver → Vehicle onboarding: registers vehicle
- Vehicle onboarding → Document OCR: scans documents
app/Http/Controllers/Driver/VehicleController.php - Vehicle onboarding → Vehicles: saves vehicle
app/Http/Controllers/Driver/VehicleController.php - Trip management → Trips: saves trips
app/Http/Controllers/Driver/TripController.php - Trip management → Trip routing: calculates route
app/Http/Controllers/Driver/TripController.php - Trip routing → Google Maps: requests places
- Passenger bookings → Trips: searches trips
app/Http/Controllers/Passenger/PassengerBookingController.php - Passenger bookings → Trip routing: calculates route
app/Http/Controllers/Passenger/PassengerBookingController.php - Passenger bookings → Bookings: creates booking
app/Http/Controllers/Passenger/PassengerBookingController.php - Passenger bookings → Notifications: notifies driver
- Passenger bookings → Payment handling: checks payment limits
app/Http/Controllers/Passenger/PassengerBookingController.php - Passenger → Payment handling: pays fare
- Payment handling → Payments: reads and writes
app/Services/PaymentService.php - Payment handling → Stripe checkout: starts checkout
- Stripe checkout → Stripe: creates session
- Stripe → Stripe webhook: sends signed event
- Stripe webhook → Payments: marks paid
- Passenger bookings → Ratings: opens post-trip ratings
- Ratings → Rating records: saves rating
app/Http/Controllers/RatingController.php - Ratings → Notifications: notifies reviewee
app/Http/Controllers/RatingController.php - Driver → Emergency response: reports emergency
- Passenger bookings → Booking chat: opens trip chat
- Passenger → FAQ assistant: asks questions
- FAQ assistant → Google Maps: uses places data
- Passenger → Tourist attractions: explores attractions
- Tourist attractions → Google Places: looks up places
app/Http/Controllers/AttractionController.php - Tourist attractions → Attraction records: reads attractions
app/Http/Controllers/AttractionController.php