Events
Three custom events inapp/Events/:
Plus Laravel’s built-in
Registered event (fired after user registration).
Event-listener wiring
File:app/Providers/EventServiceProvider.php
Email templates
16 Mailable classes inapp/Mail/. All use Queueable and SerializesModels.
Lesson lifecycle emails
Account & profile emails
Review & notification emails
Integration emails
Payment emails
Verification emails
Email recipients pattern
Most emails follow this pattern:- Primary recipient: The relevant user (tutor, student, or parent)
- BCC: Internal team addresses (
MAIL_TO_INTERNAL_TEAM_ADDRESSESenv var) - Some emails go directly to
hello@tutorbloc.com(hardcoded)
Notifications
Two notification classes inapp/Notifications/:
Push notifications
Push notifications are sent via theRemotePushNotifiable trait. The system supports:
Apple Push Notification Service (APNS)
Configured via env vars:APNS_KEY_FILE, APNS_KEY_ID, APNS_TEAM_ID, APNS_BUNDLE_ID
Device tokens stored in user_devices table:
ios_device_tokenios_aps_environment(production/sandbox)is_push_notification_enabled
app/Models/v1/UserDevice.php
The UserDevice model handles token deduplication — removeDeviceTokenIfExists() prevents the same device token being registered to multiple users.
Firebase Cloud Messaging (FCM)
Env vars exist (FCM_API_ACCESS_KEY, FCM_URL) but no FCM service class was found in the codebase. May be incomplete or handled externally — confirm with team.
Push notification triggers
Broadcast channels
File:routes/channels.php
A private broadcast channel is registered for user-specific events:
null (disabled). Can be switched to Pusher or Redis via BROADCAST_DRIVER env var. Pusher credentials are configured in config/broadcasting.php.