Calendars and Video
Google Calendar through the platform's own OAuth client, Outlook through the Microsoft sign-in, Apple by invitation, video through Nexus or Google Meet.
Google Calendar
A member connects Google under Settings, Connections. The platform's own OAuth client (GOOGLE_OAUTH_CLIENT_ID and secret, from the Google Cloud project) asks for calendar access. Tokens are stored in calendar_connections and refreshed automatically.
Booked sessions are written to the member's primary calendar. Moving or canceling a session updates or removes the event. Events a member RSVPs to are written the same way. Two settings change the mode: NEXT_PUBLIC_GOOGLE_CALENDAR_PRIMARY=false writes to an app-owned calendar instead, and NEXT_PUBLIC_GOOGLE_CALENDAR_READ=true adds read access in that mode.
Outlook
Microsoft Graph calls use the token Clerk holds from the member's Microsoft sign-in. There is no separate Outlook connection step; the member must have signed in with Microsoft. An app-owned Microsoft client is a known gap for later.
Apple
No direct integration. Apple users receive the Google invitation email with an .ics attachment, which Apple Calendar opens.
Video
A session gets a Nexus video room when Nexus is configured. Otherwise a Google Meet link is created on the calendar event. A mentor can also set My own link in their booking settings. Every invitation carries one join link, /office-hours/join/<session>, which sends each person to the right room when they click it.
Where It Can Go Wrong
- An expired refresh token: the member reconnects under Settings, Connections.
- Google quota or consent problems: Google Cloud, APIs, Calendar API.
- The "unverified app" warning on connect: the consent screen is not yet verified under Impact Hub Houston's account.
- What was written where is recorded in
calendar_event_linksandsession_calendar_links; a missing row means the write failed and the Vercel log for that action has the Google error.
More in docs/calendar-handoff.md in the repository.

