Google Calendar
Configuration
config/services.php):
Google_Service_Calendar::CALENDAR— read/write calendarGoogle_Service_Calendar::CALENDAR_EVENTS— read/write eventsGoogle_Service_Oauth2::USERINFO_EMAIL— user emailGoogle_Service_Oauth2::USERINFO_PROFILE— user profile
OAuth flow
File:app/Http/Controllers/Integrations/GoogleIntegrationController.php
Same pattern as Zoom: tutor connects Google account, tokens stored in oauth_service_tokens.
Calendar service
File:app/Models/Services/CalendarService.php
Calendar event model
File:app/Models/v1/CalendarEvent.php
Calendar list model
File:app/Models/CalendarList.php
How it’s used
-
Availability checking: When calculating available time slots,
AvailabilityServicecallsCalendarService::getCalendarEvents()to exclude times that clash with the tutor’s Google Calendar events. -
Lesson creation: When a lesson is booked, calendar events can be created on the tutor’s Google Calendar. The event ID is stored in
calendar_events.
Checking connection
Google Maps
Configuration
Service
File:app/Models/Services/Google/GoogleMapsAPI.php
Uses Guzzle HTTP client (not the Google SDK) to call the Maps API directly.
Value objects
Where Maps API is used
- Address search:
AddressService::searchPostCode()— geocodes a postcode and returns matching addresses - Lesson address display: Booking emails include Google Maps links to lesson addresses
- The BlackBox microservice also uses Google Maps Distance Matrix API for travel time calculations