How phuoc-link/eventhub-backend works
EventHub is a Laravel API for a Flutter event app. Its main workflow is authenticated event discovery and detail viewing, followed by event creation or schedule-level registration; owners manage schedules and participants, while users can cancel registrations and receive notifications. The graph also includes profile, place autocomplete, and shared time/state rules. Relationships are limited to those visible in excerpts, the source index, or README; several request, resource, and service implementations were not sampled, so their internal behavior is not inferred.
Main entry points: api.php API routes · EventReadService.php Event queries · EventService.php Event management · Event.php Events
Components 26
API boundary
- API routes
routes/api.php - Authentication API
app/Http/Controllers/Api/V1/AuthController.php - Events API
app/Http/Controllers/Api/V1/EventController.php - Registration API
app/Http/Controllers/Api/V1/RegistrationController.php - Notifications API
app/Http/Controllers/Api/V1/NotificationController.php
Event management
- Event queries
app/Services/EventReadService.php - Event management
app/Services/EventService.php - Schedule management
app/Services/ScheduleService.php
Participation
- Registration management
app/Services/RegistrationService.php - Notification creation
app/Services/NotificationService.php - Notification queries
app/Services/NotificationReadService.php
Accounts and integrations
- Authentication service
app/Services/AuthService.php - Profile API
app/Http/Controllers/Api/V1/ProfileController.php - Profile service
app/Services/ProfileService.php - Place autocomplete API
app/Http/Controllers/Api/V1/PlaceAutocompleteController.php - Google Places integration
app/Services/GooglePlacesService.php
Domain and data
- Event state rules
app/Support/EventState.php - Business time
app/Support/BusinessClock.php - API responses
app/Http/Responses/ApiResponse.php - Events
app/Models/Event.php - Schedules
app/Models/Schedule.php - Registrations
app/Models/Registration.php - Notifications
app/Models/Notification.php - Users
app/Models/User.php
Other components
- Flutter client
- Google Places
Connections 39
- Flutter client → API routes: calls API
- API routes → Authentication API: routes requests
routes/api.php - API routes → Events API: routes requests
routes/api.php - API routes → Registration API: routes requests
routes/api.php - API routes → Notifications API: routes requests
routes/api.php - API routes → Profile API: routes requests
routes/api.php - API routes → Place autocomplete API: routes requests
routes/api.php - Authentication API → Authentication service: delegates auth
app/Http/Controllers/Api/V1/AuthController.php - Authentication API → Users: returns user data
app/Http/Controllers/Api/V1/AuthController.php - Authentication API → API responses: formats response
app/Http/Controllers/Api/V1/AuthController.php - Events API → Event queries: queries events
app/Http/Controllers/Api/V1/EventController.php - Events API → Event management: manages events
app/Http/Controllers/Api/V1/EventController.php - Events API → API responses: formats response
app/Http/Controllers/Api/V1/EventController.php - Event queries → Event state rules: applies status rules
app/Services/EventReadService.php - Event queries → Events: queries events
app/Services/EventReadService.php - Event queries → Registrations: reads registrations
app/Services/EventReadService.php - Event queries → Schedules: reads schedules
app/Services/EventReadService.php - Event management → Schedule management: delegates schedules
app/Services/EventService.php - Event management → Notification creation: creates notifications
app/Services/EventService.php - Event management → Event state rules: checks editability
app/Services/EventService.php - Event management → Events: writes events
app/Services/EventService.php - Schedule management → Notification creation: creates notifications
app/Services/ScheduleService.php - Registration API → Registration management: delegates changes
app/Http/Controllers/Api/V1/RegistrationController.php - Registration API → Event queries: queries event data
app/Http/Controllers/Api/V1/RegistrationController.php - Registration management → Notification creation: creates notifications
app/Services/RegistrationService.php - Registration management → Registrations: writes registrations
app/Services/RegistrationService.php - Registrations → Schedules: belongs to schedule
app/Models/Registration.php - Schedules → Events: belongs to event
app/Models/Schedule.php - Notifications API → Notification queries: queries notifications
app/Http/Controllers/Api/V1/NotificationController.php - Notifications API → API responses: formats response
app/Http/Controllers/Api/V1/NotificationController.php - Notification creation → Notifications: writes notifications
app/Services/NotificationService.php - Place autocomplete API → Google Places integration: requests suggestions
app/Http/Controllers/Api/V1/PlaceAutocompleteController.php - Google Places integration → Google Places: queries provider · Inferred; not shown in the code that was read.
- Profile API → Profile service: delegates updates
app/Http/Controllers/Api/V1/ProfileController.php - Profile service → Users: updates profile
- Business time → Event state rules: provides time
app/Support/EventState.php - Event queries → Business time: reads business time
app/Services/EventReadService.php - Events → Users: belongs to creator
app/Models/Event.php - Users → Events: owns schedules
app/Models/Event.php