Lutheran Indian Ministries — Home Events Manager · Setup
Internal · Developer

Events Manager — One-Time Setup

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.

How it works

Roberta types notes    events-ai (Claude) structures the card    she refines by chat    Approve & Publish    events-publish commits 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.

Step 1 — Set three environment variables in Netlify

Netlify dashboard → your site → Site configuration → Environment variables → add:

VariableValue
ANTHROPIC_API_KEYAn Anthropic API key (console.anthropic.com → API keys). Powers the “Structure with AI” and chat refinement.
GITHUB_TOKENA 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_PASSWORDA 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.

Step 2 — Redeploy

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.

Step 3 — Give Roberta the password

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.

Security: the Anthropic key and GitHub token live only in Netlify’s server environment — never in the page source. The publish password is the gate Roberta uses; it’s checked server-side against the env var. Anyone without it can’t call the AI or publish. Keep GITHUB_TOKEN scoped to just this one repo.
Cost: the AI calls use Claude Haiku and are a fraction of a cent each. Publishing uses the GitHub API (free). The only ongoing cost is whatever the occasional AI structuring/chat adds to the Anthropic bill — negligible at this volume.

Troubleshooting