Skip to content

feat(meet): meeting scheduling polls with Google Meet invites - #377

Merged
gregv merged 1 commit into
developfrom
feat/meet-scheduler
Nov 21, 2026
Merged

gregv merged 1 commit into
developfrom
feat/meet-scheduler

Conversation

@gregv

@gregv gregv commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

What

Backend for a Doodle-style meeting scheduler (frontend: /meet?code= and /admin/meet).

  • api/meet/ — new blueprint. Collections meet_polls (doc id = code) and meet_votes.
    • Public, no login: GET /api/meet/<code> (names + answers, never emails or the Meet link), POST /api/meet/<code>/votes (reCAPTCHA; one response per email; edits need the editToken returned on first submit).
    • volunteer.admin: list / create / get / patch / delete polls, delete a response, POST …/finalize.
  • common/utils/google_calendar.py — creates the event on the @ohack.org calendar with a Meet link (sendUpdates=all, so Google emails the invites). Service account with domain-wide delegation; deterministic event id so a retry can't create a second event.
  • Finalize creates the calendar event first; a calendar failure returns 502 and the poll stays open. sendInvites: false records the time only.

Needs before invites work

GOOGLE_CALENDAR_SA_CONFIG and GOOGLE_CALENDAR_ORGANIZER are not set on Fly yet (service account needs delegation for https://www.googleapis.com/auth/calendar.events). Without them finalize-with-invites returns 503 calendar_not_configured; everything else works.

Testing

  • api/meet/tests — 38 tests pass locally (service on MockFirestore, routes with auth stubs incl. 401/403 gates); added to the CI loop.
  • The Google Calendar call is only exercised with a fake — not yet run against Google.

Deploy before the frontend PR.

🤖 Generated with Claude Code

Doodle-style polls: public GET/vote routes by code (reCAPTCHA, no login),
volunteer.admin routes to create, edit, review and finalize. Finalizing
creates the event on the @ohack.org Google Calendar with a Meet link.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Comment thread api/meet/meet_views.py

@bp.route("/meet/<code>", methods=["GET"])
def get_poll(code):
return _run("get", meet_service.get_public_poll, code)
Comment thread api/meet/meet_views.py

@bp.route("/meet/<code>/votes", methods=["POST"])
def submit_vote(code):
return _run("vote", meet_service.submit_vote, code, request.get_json(silent=True))
Comment thread api/meet/meet_views.py
@auth.require_user
@auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId)
def admin_list_polls():
return _run("admin list", meet_service.admin_list_polls)
Comment thread api/meet/meet_views.py
Comment on lines +79 to +80
return _run("admin create", meet_service.admin_create_poll,
request.get_json(silent=True), _admin_from_request())
Comment thread api/meet/meet_views.py
@auth.require_user
@auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId)
def admin_get_poll(code):
return _run("admin get", meet_service.admin_get_poll, code)
Comment thread api/meet/meet_views.py
Comment on lines +94 to +95
return _run("admin update", meet_service.admin_update_poll,
code, request.get_json(silent=True))
Comment thread api/meet/meet_views.py
@auth.require_user
@auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId)
def admin_delete_poll(code):
return _run("admin delete", meet_service.admin_delete_poll, code)
Comment thread api/meet/meet_views.py
@auth.require_user
@auth.require_org_member_with_permission("volunteer.admin", req_to_org_id=getOrgId)
def admin_delete_vote(code, vote_id):
return _run("admin delete vote", meet_service.admin_delete_vote, code, vote_id)
Comment thread api/meet/meet_views.py
Comment on lines +116 to +117
return _run("admin finalize", meet_service.admin_finalize_poll,
code, request.get_json(silent=True), _admin_from_request())
@gregv
gregv merged commit 8f1ec76 into develop Nov 21, 2026
6 checks passed
@gregv
gregv deleted the feat/meet-scheduler branch November 21, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants