claude e02125392a Announcements: a site-wide notice with a start and an end
The one string on this site where a deploy is the wrong latency is
"tonight's meeting is cancelled, the lot is flooded" at 4pm on a
Tuesday. That is a record with a lifecycle, not site copy, so it gets
a table and a write path rather than a commit.

store.py
  announcements table, created by the existing IF NOT EXISTS path so
  there is no migration. ends_at is REQUIRED: an announcement that
  never expires is site copy, and site copy belongs in the repo where
  it has a diff. Nothing is hard-deleted; taking one down early sets
  revoked_at, so what the site said and when survives.

  Ranking is urgent first, then most recent. Recency alone would let a
  routine Wednesday notice bury a Tuesday cancellation still live.

  Two caps, enforced here rather than in the route so the future panel
  inherits them: 200 characters, and 3 live at once. Both reject rather
  than truncate. Clipping a cancellation mid-sentence is worse than
  making someone shorten it, and a 4th live notice is a signal nobody
  is expiring things rather than something to render.

app.py
  announcement_bar() above the sticky nav. Native <details>, no
  JavaScript, which matters on a read-only rootfs with no build step.
  Collapsed clamps to one line with a count; expanded lists all of
  them and caps at 40vh. One notice renders with no chevron and no
  count: the common case must not look like a widget.

  FAILS OPEN. The admin API fails closed because it serves family
  phone numbers. This is the opposite case, and a broken announcement
  must never take down the public homepage.

  Colours are the existing note and rust token pairs from the brand
  standard. No new colour enters the palette.

admin_api.py
  GET/POST/DELETE on /api/admin/announcements. Leads stay read-only;
  announcements are the deliberate exception, because being mutable
  and expiring is the entire feature rather than a guess at a process.
  list returns a computed state per row (live, scheduled, expired,
  revoked, over_cap) so "why is my notice not showing" is answerable
  from the API and not from the homepage.
2026-09-01 19:22:04 -04:00

scout-website

Public recruiting site for Cub Scout Pack 73 and Scouts BSA Troop 73 (Zieglerville / Green Lane, PA). Live at https://greenlanescouts73.org (NPM proxy → scout-website container, port 8132 on arrstack). Replaces the scoutpoc proof of concept (claude-workspace/stacks/scoutpoc).

Updating the calendar (the part you'll actually do)

All dates on the site (home "Next up," both program pages, the Calendar page) come from the scout-calendar feed (claude-workspace/stacks/scout-calendar), which serves the Radicale collection mike/site73 as JSON:

EVENTS_FEED_URL          ← Portainer stack env; http://scout-calendar:8000/events.json
/data/events-cache.json  ← last good copy, served automatically whenever the feed is down

Edit the calendar in any CalDAV client pointed at Radicale (or ask Claude), and the site follows within ~5 minutes. No file edits, no rebuild, no redeploy. The public ICS families can subscribe to is https://calendar.greenlanescouts73.org/calendar.ics.

Event fields the feed emits (one object per event):

{"date": "2026-10-17", "end": "2026-10-18", "time": "from 4:00 PM",
 "title": "Fall Campout", "location": "Green Lane Park",
 "unit": "both", "badge": "OVERNIGHT"}
  • date required (YYYY-MM-DD). end only for multi-day events.
  • unit: "pack", "troop", or "both" (default pack). Drives the Pack/Troop calendar filter and each page's "Next up."
  • badge: optional shouty label (FALL OPEN HOUSE, OVERNIGHT, THE BIG ONE).
  • Past events are hidden from "Next up" automatically; the Calendar page shows the whole program year.
  • TeamSnap (team 8198615) stays the source of truth for registered families; Radicale mike/site73 is the source for this public site.

Documents

Files at /srv/scout-website-assets/docs (bind-mounted read-only at /docs), published by manifest.json in that same folder. Adding a document is a file drop plus a manifest entry: no rebuild, no redeploy. The app re-reads the manifest whenever its mtime changes.

{"slug": "permission-slip", "file": "2026-permission-slip.pdf",
 "title": "Activity permission slip", "description": "One per scout, per outing.",
 "category": "forms", "unit": "both", "visibility": "public", "updated": "2026-08-30"}
  • slug is the permanent URL: greenlanescouts73.org/documents/<slug>. Never change one that has been printed or emailed. To publish a new version, point the same slug at the new filename.
  • category matches an id in the manifest's categories; anything else lands under "Everything else".
  • visibility:
    • public - listed on /documents, open to anyone.
    • unlisted - served at its slug to anyone holding the link, kept off the index, sent with X-Robots-Tag: noindex. For internal papers that need a durable link before login exists. This is obscurity, not access control. An unlisted link is forwardable; assume it will be.
    • members - hidden and unservable, returns 404. This is not a working gate yet, it is the seam login will attach to.
  • updated optional; without it the file's own mtime is shown.

Documents are served through the app (/documents/{slug}), never from a static mount. Anything under /app/static is public forever, so nothing that will ever need gating goes there. When member login exists it plugs into documents.visible() and no public URL moves.

Layout

  • app/app.py — FastAPI app, all pages server-rendered (Home, /cubs, /troop, /calendar?unit=, /join, /documents). /contact 301s to /join.
  • app/documents.py — the document shelf: manifest loading, the slug-to-file map, and the one visibility gate.
  • docker-compose.yml — Portainer Repository stack definition (port 8131).
  • Images: not in the repo. Bind-mounted read-only from /srv/scout-website-assets/img. Source photos live on the NAS (Scouting-Recruitment-Images, scouting-comms/pack-73/assets/social); web-sized copies in Scouting-Recruitment-Images/_web.

Leads

/srv/scout-website/data/leads.jsonl — one JSON line per interest-form submission, plus an ntfy push per lead.

Lead pipeline (self-contained)

/join submissions write directly to the shared Google Sheet (SHEET_ID stack env, creds bind-mounted from /srv/scout-website/secrets/service_account.json) and push to the shared ntfy scouting topic (NTFY_BASE/NTFY_TOPIC/NTFY_TOKEN). The extra comments box lands in a new 8th sheet column, Comments. Every submission also appends to /data/leads.jsonl; if both sheet and push fail, a warning push goes to the fallback NTFY_URL topic. No dependency on the scoutpoc or scouting73-form containers: both can be decommissioned without breaking this site. (The flyer QR domain scouting73.thewichersfamily.com should be repointed here before its container is retired.)

S
Description
greenlanescouts73.org - Pack & Troop 73 recruiting site
Readme
1.5 MiB
Languages
Python 99.9%
Dockerfile 0.1%