Website for SAHA, the San Antonio Hackers Association. React + Vite front end, served by a Cloudflare Worker with Static Assets.
- Static page (
src/): built by Vite intodist/. - Worker (
worker/index.ts):GET /api/eventsfetches the SAHA upcoming and past feeds from the DEVSA community calendar, edge-cached for an hour, and returns{ upcoming, past }as raw RSS XML. The browser parses it withDOMParser./discordredirects to the current Discord invite. ChangeDISCORD_INVITEto rotate it./gets absoluteog:URLs stamped from the request host, so link previews work on any domain.
- Fallbacks: if the feed is empty, the page shows the next expected 2nd Sunday. If it fails, it shows the recurring schedule and address.
- Arrow map (
src/components/ArrowMap.tsx,MapBase.tsx): traced line-art map. Starts with 6 arrows, each click adds one, caps at 40.
npm install
npm run dev # Vite dev server; /api/events is served by the same feed logic
npm test
npm run typecheck
npm run preview # build + run the real Worker locally with wranglerPushing to main runs .github/workflows/deploy.yml: typecheck, test, build, then wrangler deploy as the website Worker (https://website.sahasatx.workers.dev). Pull requests run the checks without deploying.
Repo settings it needs:
| Name | Kind | Used for |
|---|---|---|
CLOUDFLARE_API_TOKEN |
Actions secret | wrangler deploy (Workers Scripts: Edit) |
CLOUDFLARE_ACCOUNT_ID |
Actions variable | Target account |
The Worker itself needs no runtime secrets. The DEVSA feed is public.
- Rules, Background, Why:
src/components/Rules.tsx - Address and links:
src/lib/site.ts - Venue name and address on event cards come from the DEVSA listing, so fix them there.