🔧 Setup guide · CeCe's calendar integration

Sam-facing · pick auth path, do the one-time wiring · CeCe then connects once
Architecture choice: Don't integrate Vagaro directly. Have CeCe turn on Vagaro's built-in 2-way Google Calendar sync (one-time, in her Vagaro account). Vagaro then keeps Google Calendar in sync with her client bookings — our app integrates with Google Calendar only, single source of truth. Saves a second OAuth flow + keeps Vagaro inside Vagaro.

📋 Decisions needed

Defaults shown highlighted in green. Change anything Sam wants by editing cece-setup-decisions in KV (or just tell CC).

DecisionOptionsDefault
Auth path (A) Google OAuth · cleaner, real-time
(B) Public ICS URL · faster prototype
A · Google OAuth recommended
Where it lives (A) Section of /our/
(B) Standalone /cece/
(C) Both — main on /cece/, summary on /our/
C · both recommended
CeCe involvement (A) Set prefs once → app suggests automatically
(B) Explicit approve-each-suggestion
A with B as override recommended
Notifications (A) In-app only
(B) Browser push
(C) Both, configurable
A initially recommended

🔀 Path A vs Path B — pick one

Path B · Public ICS URL

  • CeCe exports calendar as public read-only ICS link (Google Calendar UI)
  • App fetches + parses ICS on each page load (~5-30 sec lag vs reality)
  • No OAuth · no Google Cloud setup
  • ICS URL must be guarded somehow (it's a public-ish secret token)
  • Worse UX if CeCe ever resets her sync URL
Setup time: ~5 min CeCe (export URL) · 0 min Sam.
Recommendation: Path A. The 30 min one-time investment is worth it. Path B is a fine fallback if Google's verification screens or app-publishing requirements feel like too much friction for Sam's account.

🅰️ Path A · Google OAuth setup (Sam's todo)

Step 1 · Vagaro 2-way sync

CeCe's task (~5 min): In Vagaro account → Settings → Google Calendar Integration → enable 2-way sync to her personal Google Calendar. All future bookings flow into Google Calendar automatically. Vagaro support article →

Step 2 · Google Cloud project

Go to console.cloud.google.com and create a new project. Name it same-solutions-cece-calendar (or similar).

Step 3 · Enable Calendar API

In the project, navigate to APIs & Services → Library, search "Google Calendar API", click Enable.

Step 4 · OAuth consent screen
Step 5 · OAuth client ID

Save → copy the Client ID and Client Secret.

Step 6 · Cloudflare env vars

From a machine with wrangler authenticated:

wrangler pages secret put GOOGLE_CLIENT_ID
# paste Client ID

wrangler pages secret put GOOGLE_CLIENT_SECRET
# paste Client Secret

(Or set them in the Cloudflare Pages dashboard under Settings → Environment variables.)

Step 7 · Cloudflare Functions ✓ shipped

✓ Phase 2 functions live as of this commit:

KV keys used (auto-managed): cece-google-refresh-token (no TTL), cece-google-access-token (55-min TTL), cece-google-status (display data), cece-google-state-* (10-min TTL).

Step 8 · CeCe connects

Once Sam finishes Steps 2-6 (Google Cloud setup + Cloudflare env vars), CeCe visits /cece/, taps 🔗 Connect Google Calendar, signs in with her Google account, grants read-only access. Tokens land in KV. Today + Week views immediately swap from placeholder events to her real calendar.

Test it: after env vars are set, hit /calendar/cece-status in a browser. Should return {config_ok: true, connected: false} until CeCe connects. After CeCe connects, connected: true + her email.

🅱️ Path B · ICS URL fallback (faster prototype)

Step 1 · Vagaro 2-way sync

(Same as Path A · enable Vagaro → Google sync first.)

Step 2 · Get a public ICS URL

Google Calendar → calendar settings → "Secret address in iCal format" → copy URL. It looks like:

https://calendar.google.com/calendar/ical/.../private-XXXXX/basic.ics
Treat like a password. Anyone with this URL can read CeCe's calendar.
Step 3 · Stash in KV

Tell CC the URL. CC PUTs it to KV key cece-ics-url via /our/data. Next CC session builds /functions/calendar/cece-events.js that fetches that ICS, parses it with a lightweight ICS parser, and returns events as JSON.

Step 4 · Phase 2 integration

Tell CC: "Build Phase 2 of CeCe's calendar — ICS fetch + parse." Page loads pull fresh ICS each time (cached ~5 min in KV).

🅲 (Skip) · Direct Vagaro API

Vagaro does have an API, but it's contract-only (their B2B platform). Not a fit for one personal user. The Vagaro → Google sync route covers everything we need.

📦 Roadmap

✅ Phase 1 — Foundation (shipped)

✅ Phase 2 — Google OAuth flow (shipped)

✅ Phase 3 — Suggestion engine (shipped)

✅ Phase 4 — Polish (shipped)

Phase 5 — Future iterations (not yet built)