westfarn 04c3ac913c
Unit Tests / test (push) Successful in 3s
SEO enhancement and agentic browsing updates (#18) (#27)
## Summary
Closes #18.

- Add per-page titles, meta descriptions, Open Graph/Twitter tags, and canonical URLs on public `base2.html` pages
- Improve semantic structure: skip link, primary nav ARIA, single `<main id="main-content">`, heading hierarchy, descriptive image alts
- Publish `/robots.txt`, `/sitemap.xml`, and `/llms.txt` (linked from site head via `rel="alternate"`)
- Agentic/a11y fixes: membership checkbox label associations, ZIP `name` attribute, layout stability (image aspect-ratio / min-height), footer year without `document.write`
- WebMCP deferred — membership + Stripe checkout remain standard HTML/Stripe flows; no audit flag justified custom MCP surface yet

## Lighthouse / agentic notes
Baseline Lighthouse runs still need Chrome Canary export on staging/prod. Structural SEO/a11y items from the ticket are implemented so follow-up audits can capture before/after scores.

Expected audit wins vs prior minimal `charset`+`viewport` head:
- SEO: unique titles/descriptions, crawl directives, sitemap
- Agentic/a11y: landmarks, labels, CLS-oriented image sizing

## Test plan
- [x] `uv run python manage.py test schasite` (34 passed)
- [ ] Spot-check Home/About/Calendar/Dues/Membership/Board/Links in browser
- [ ] Confirm `/robots.txt`, `/sitemap.xml`, `/llms.txt` on deployed host
- [ ] Run Lighthouse SEO + Agentic browsing on key pages and note before/after pass ratio on the issue

Reviewed-on: #27
2026-07-14 05:19:28 -07:00
2025-03-07 12:15:48 -06:00
2026-07-14 05:13:55 -07:00
2026-07-14 05:13:55 -07:00

SCHA Wheaton

Django site for SCHA Wheaton. Packaging via uv; production deploy via server-infra.

Local development

Prerequisites

  • Python 3.12+
  • uv
  • Docker + Docker Compose (optional, recommended)

uv (host)

cp .env.example .env
uv sync
uv run python manage.py migrate
uv run python manage.py runserver

Without DATABASE_URL / DB_HOST, settings fall back to SQLite (db.sqlite3).

Docker (dev, bundled Postgres)

docker compose up --build

App: http://localhost:8000 — Postgres via bundled db (postgres://scha:scha@db:5432/scha). Compose does not read host DATABASE_URL (avoids CI/prod leaks); override with COMPOSE_DATABASE_URL if needed.

Environment variables

Variable Dev default Prod required Notes
DJANGO_ENV dev prod / beta Selects settings module
DJANGO_SECRET_KEY insecure default yes Must be set in prod
DJANGO_DEBUG env default / true in dev false
DJANGO_ALLOWED_HOSTS * yes Comma-separated
DJANGO_CSRF_TRUSTED_ORIGINS derived from hosts optional Comma-separated full origins
DATABASE_URL SQLite fallback yes Shared Postgres in prod
WEB_PORT n/a (compose) 8002 Host port for prod compose
STRIPE_* empty yes (prod/beta) Publishable, secret, webhook
RECAPTCHA_* empty yes (prod/beta) Public + private

Templates: .env.example (local), .env.prod.example (control-node secret).

Control-node secret path (server-infra):

~/Documents/secrets/scha/scha_prod.env

Validate with:

./scripts/validate-env.sh ~/Documents/secrets/scha/scha_prod.env

Production (docker-compose.prod.yml)

  • Single web service; no bundled DB — DATABASE_URL points at shared Postgres (10.0.0.230).
  • Host port from WEB_PORT (catalog: 8002).
  • Deployed by server-infra/scripts/deploy.sh --app scha --env prod --ref <sha>.

CI / CD (Gitea Actions)

Workflow Trigger Action
unittests.yml push + PR → master uv sync + manage.py test
ci.yml PR → master same unit tests
deploy.yml after Unit Tests succeeds on master push docker build + tests on ephemeral compose Postgresdeploy.sh

Deploy never runs on PRs.

Security note

Stripe and reCAPTCHA keys previously lived in settings.py. Treat them as compromised; rotate and set real values only in the control-node env file (never commit).

S
Description
Django site for SCHA
Readme
1.1 MiB
Languages
HTML 65.8%
Python 31.4%
CSS 1.8%
Shell 0.6%
JavaScript 0.2%
Other 0.2%