Skip to content
devsanantonioPublic

About

San Antonio Hacker's Association Website

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

saha-web

Website for SAHA, the San Antonio Hackers Association. React + Vite front end, served by a Cloudflare Worker with Static Assets.

How it works

  • Static page (src/): built by Vite into dist/.
  • Worker (worker/index.ts):
    • GET /api/events fetches 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 with DOMParser.
    • /discord redirects to the current Discord invite. Change DISCORD_INVITE to rotate it.
    • / gets absolute og: 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.

Develop

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 wrangler

Deploy

Pushing 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.

Editing content

  • 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.

About

San Antonio Hacker's Association Website

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages