Skip to content

Phase 2: Bidirectional Google Calendar sync #26

Description

@akhilk999

Summary

Follow-up to app → CSA Member Calendar sync (v1). Add calendar → app updates so schedule/location edits on the shared CSA Member Calendar update the corresponding points event.

Background

v1 already pushes eligible org events (create/update/delete) to the Member Calendar via a service account and stores google_event_id on events. Mixers, Jiating Events, and Sports Spectator children are excluded.

Proposed approach

  1. Use Google Calendar push notifications (events.watch) to a Next.js webhook (e.g. /api/google-calendar/webhook) with channel renewal, or periodic events.list with syncToken.
  2. Match Calendar events to app rows via google_event_id.
  3. Update only fields the app allows today: starts_at / ends_at / location (and maybe description / RSVP metadata).
  4. Conflict handling: last-write-wins with timestamps, or treat the app as authoritative for points metadata and Calendar as authoritative only for schedule/location.
  5. Ignore Spectator / non-mapped Calendar edits; do not auto-create points events from arbitrary Calendar creates unless an explicit mapping rule is added later.

Out of scope (unless revisited)

  • Per-member personal calendar sync
  • Expanding member Google OAuth scopes
  • Editing event name/category from Calendar
  • Auto-import of manually created Google events into the points app

Acceptance criteria

  • Edits to synced events on the CSA Member Calendar update matching app events (schedule/location at minimum)
  • Non-mapped / ineligible Calendar changes do not create or corrupt points events
  • Channel renewal or sync-token polling is reliable in production
  • Conflict behavior is documented and deterministic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions