Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Events — public ICS calendar feed URL (includes an auth token as a query param)
EVENTS_ICS_URL=

# Notion API
NOTION_SECRET=
NOTION_DB_ID=
NOTION_SIGNATORIES_DB_ID=
NOTION_FAQ_DB_ID=
NOTION_IDEAS_DB_ID=
Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Many routes exist in pairs, e.g. `about.astro` / `about-new.astro`, `events.astr

### Data sources

- **Notion API** (`src/store/notionClient.ts`) — events and other dynamic content via `fetchNotionEvents()` / `fetchNotionEventById()`. Images are direct Notion-hosted URLs (no proxy/cache — that worker was removed), expire after ~1hr, client falls back to `/images/default.jpg` on load error. See `docs/EVENTS.md` / `docs/NOTION.md`.
- **Events ICS feed** (`src/store/eventsClient.ts`) — `fetchEvents()` fetches and hand-parses a public ICS calendar feed (`EVENTS_ICS_URL`, Mattermost Events Calendar plugin), server-side only since the URL carries an auth token. Consumed by `/api/events` and grouped into category sections (`src/utils/eventSections.ts`) by both `events.astro`/`Events.tsx` and `events-new.astro`/`EventsNew.tsx`. See `docs/EVENTS.md`.
- **Notion API** (`src/store/notionClient.ts`) — FAQ, ideas, agenda/speakers, E4P signatories, endorsements, and community calls (events no longer come from Notion). Images are direct Notion-hosted URLs (no proxy/cache — that worker was removed), expire after ~1hr, client falls back to `/images/default.jpg` on load error. See `docs/NOTION.md`.
- **ProjectHub** (external service) — `src/pages/api/projects.ts` calls `projecthub.techforpalestine.org/api/public/projects` directly and is fetched client-side via `/api/projects` by both `ProjectsDirectory.tsx` and `ProjectsNew.tsx`. `src/pages/api/project-proxy.ts` is unrelated — it's a generic authenticated proxy used only by the volunteer/incubator application forms. See `docs/PROJECTS.md`.
- **Cloudflare KV** — `DROPPED_CONVERSIONS` namespace (bound in `wrangler.toml`) is used for conversion tracking, surfaced at `src/pages/admin/conversions.astro` and `src/pages/api/admin/conversion-stats.ts`.
- **Content collections** (`src/content/config.ts`) — currently empty (`collections = {}`); older docs referencing `content/ideas` and `content/projects` markdown collections are stale — check `src/content/` before relying on this.
Expand Down
5 changes: 4 additions & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ The site deploys automatically to Cloudflare Pages on push to `main`.

Set the following in the Cloudflare Pages dashboard (Production and Preview are separate — set both). See `.env.example` for the canonical list; grouped here by subsystem (docs in parens). For how `.env`/`.dev.vars`/the dashboard interact locally, and a full audit of what's actually wired up, see [docs/ENVIRONMENT.md](docs/ENVIRONMENT.md).

**Events** ([docs/EVENTS.md](docs/EVENTS.md))

- `EVENTS_ICS_URL` — public ICS calendar feed URL (includes an auth token as a query param); fetched server-side only

**Notion** ([docs/NOTION.md](docs/NOTION.md))

- `NOTION_SECRET` — shared integration token
- `NOTION_DB_ID` — Events database ID
- `NOTION_SIGNATORIES_DB_ID`, `NOTION_FAQ_DB_ID`, `NOTION_IDEAS_DB_ID`, `NOTION_AGENDA_DB_ID`, `NOTION_ENDORSEMENTS_DB_ID`, `NOTION_COMMUNITY_CALLS_DB_ID`
- `NOTION_SPEAKERS_DB_ID` — listed for completeness; not currently read by any route

Expand Down
1 change: 0 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default defineConfig({
"/donate-2/",
"/donate-new/",
"/donate-2-new/",
"/event-details/",
"/404/",
"/about-new/",
"/team-new/",
Expand Down
2 changes: 1 addition & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All routes live under `src/pages/api/` and run server-side only (`export const p

| Route | Method | Auth / origin check | Upstream | Notes |
| ----------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/api/events` | GET | none (public read) | Notion (`fetchNotionEvents`) | `?showAll=yes` bypasses the Visibility filter |
| `/api/events` | GET | none (public read) | ICS feed (`fetchEvents`, `EVENTS_ICS_URL`) | Flat array; consumers group into category sections via `eventSections.ts` |
| `/api/faq` | GET | none | Notion (`fetchNotionFAQ`) | `?showAll=yes` bypasses Visibility filter |
| `/api/ideas` | GET | none | Notion (`fetchNotionIdeas`) | |
| `/api/speakers` | GET | none | Notion (`fetchNotionAgenda`) | Returns `{ agendaItems, speakers }`; resolves moderator relations to speaker profiles |
Expand Down
2 changes: 1 addition & 1 deletion docs/ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Ground truth = every `getEnv("X", ...)` call in `src/`, plus the build-time read
| Variable | Read via | In `.env.example`? | In local `.env`? | In local `.dev.vars`? | Consumers |
| ------------------------------ | ---------------------------- | :----------------: | :--------------: | :-------------------: | ----------------------------------------------------------------------------------- |
| `NOTION_SECRET` | `getEnv` | ✅ | ✅ | ❌ | All Notion routes |
| `NOTION_DB_ID` | `getEnv` | ✅ | | | Events |
| `EVENTS_ICS_URL` | `getEnv` | ✅ | | | Events (`fetchEvents` in `eventsClient.ts`) — public ICS feed URL with a token |
| `NOTION_SIGNATORIES_DB_ID` | `getEnv` | ✅ | ✅ | ❌ | E4P pledge/signatories |
| `NOTION_FAQ_DB_ID` | `getEnv` | ✅ | ✅ | ❌ | FAQ |
| `NOTION_IDEAS_DB_ID` | `getEnv` | ✅ | ✅ | ❌ | Ideas |
Expand Down
Loading
Loading