The Events Manager lets Roberta add/edit healing-group events with AI help and publish them live — no code. The AI and the publishing step run as Netlify Functions, which need three secrets set once in the Netlify dashboard. Until these are set, the form and preview still work, but “Approve & Publish” will report that publishing isn’t configured.
data/events.json to GitHub → Netlify rebuilds → live in ~1–2 min
The Healing Groups page renders its session cards from data/events.json and hides any event the day after its end date — so removal is automatic and edits never touch HTML.
Netlify dashboard → your site → Site configuration → Environment variables → add:
| Variable | Value |
|---|---|
ANTHROPIC_API_KEY | An Anthropic API key (console.anthropic.com → API keys). Powers the “Structure with AI” and chat refinement. |
GITHUB_TOKEN | A GitHub fine-grained personal access token scoped to the garyricke/lim26 repo with Contents: Read and write. Lets the publish step commit data/events.json. |
EVENTS_PUBLISH_PASSWORD | A password you choose. Roberta types it in the manager to authorize AI calls + publishing. Share it only with people allowed to post events. |
Optional overrides (defaults shown): GITHUB_REPO=garyricke/lim26, GITHUB_BRANCH=main, EVENTS_PATH=data/events.json.
Trigger a deploy (or push any commit). The functions in netlify/functions/ deploy automatically thanks to netlify.toml. The manager calls them at /api/events-ai and /api/events-publish.
She opens admin-events.html (site password), enters the EVENTS_PUBLISH_PASSWORD once in the “Publish password” box, and she’s set. The browser remembers it for the session.
GITHUB_TOKEN scoped to just this one repo.
EVENTS_PUBLISH_PASSWORD.netlify dev with the env vars in a local .env to exercise the functions before deploying.