Calendar Module

API Filament Google Workspace

The Calendar module owns calendars, calendar events, event invites, event links, and Google Workspace calendar imports.

Location

src/Modules/Calendar

Main Responsibilities

  • Store calendars and calendar events.
  • Expose calendar and event API endpoints.
  • Import calendars and events from Google Workspace.
  • Generate and send event invite notifications.
  • Guess meeting links and event link types.
  • Provide Filament resources for calendar administration.

Runtime Registration

CalendarServiceProvider registers:

  • Config under the calendar key.
  • Module migrations.
  • Calendar API routes.
  • Calendar web routes.
  • Calendar Filament panel provider.
  • The ImportGoogleCalendar console command.

API Routes

Calendar API routes are protected by api and auth:api,oauth-jwt middleware. The route prefix comes from config('calendar.route_prefix'), which defaults to:

api/v3/calendar

The API includes calendar CRUD, event CRUD, and an endpoint to send event invites.

Important Config

The main config file is:

src/Modules/Calendar/config/calendar.php

Important environment variables include:

CALENDAR_TABLE_PREFIX=cal_
CALENDAR_DEFAULT_TIMEZONE=America/Chicago
CALENDAR_IMPORT_QUEUE=default
CALENDAR_GOOGLE_CREDENTIALS_JSON=
CALENDAR_GOOGLE_WORKSPACE_CUSTOMER=my_customer
CALENDAR_GOOGLE_DEFAULT_USER=
CALENDAR_GOOGLE_PAGE_SIZE=250

Key Classes

AreaClasses
ControllersCalendarController, CalendarEventController
ModelsCalendar, CalendarEvent, CalendarEventInvite, CalendarEventLink, CalendarSource
JobsImportGoogleCalendarPage, ImportGoogleWorkspaceUserCalendars
ServicesGoogleCalendarGateway, GoogleCalendarImportService, GoogleWorkspaceClientFactory, GoogleWorkspaceDirectoryService
SupportCalendarInviteIcsBuilder, CalendarOwner, CalendarTable, CalendarEventLinkType
FilamentCalendarPanelProvider, CalendarResource, CalendarEventResource

Operational Notes

If Google Workspace import behavior changes, start with GoogleCalendarImportService and GoogleCalendarGateway.

If table names look unexpected, check CALENDAR_TABLE_PREFIX. The module uses the prefix helper in CalendarTable.