diff --git a/.env.example b/.env.example index 757ca1d..78607d3 100644 --- a/.env.example +++ b/.env.example @@ -4,9 +4,11 @@ # # These are server-side variables (no VITE_ prefix) — they stay in the Cloudflare Function # and are never bundled into the browser JavaScript. +# Find the base and table IDs in the Airtable URL when viewing your table: +# airtable.com///... AIRTABLE_PAT=your_personal_access_token_here -AIRTABLE_BASE_ID=appKtPJiD3Pex9ai1 -AIRTABLE_TABLE_ID=tblfEZNHgfRwvvVJc +AIRTABLE_BASE_ID=your_base_id_here +AIRTABLE_TABLE_ID=your_table_id_here # Optional — client-side key for zip→distance (free at locationiq.com, used when Zippopotam is blocked) # VITE_LOCATIONIQ_KEY=your_free_locationiq_key diff --git a/README.md b/README.md index 005accd..c562005 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,23 @@ A free activity finder for people with Parkinson's disease and their caregivers Activity data is managed through Airtable and the site is hosted on Cloudflare Pages. +## Configuration + +The site talks to Airtable through Cloudflare Pages Functions (in `functions/api/`). All credentials and identifiers are stored as **server-side environment variables** in the Cloudflare Pages dashboard (Settings → Environment variables) and are never committed to this repo or bundled into the browser: + +| Variable | What it is | +|---|---| +| `AIRTABLE_PAT` | Airtable personal access token (the secret — keep private) | +| `AIRTABLE_BASE_ID` | The Airtable base identifier | +| `AIRTABLE_TABLE_ID` | The activities table identifier | + +To find the base and table IDs, open the table in Airtable and read them from the URL (`airtable.com///...`). See `.env.example` for the variable names to set. Never paste the PAT into client-side code or commit it. + ## Airtable Field Reference -The app reads these fields from the `Activities` table: + +The app reads these fields from the `Activities` table in Airtable: +======= | Field | Type | Notes | |---|---|---|