The collected WSDC data can be downloaded at https://wsdc.mechstack.dev/data.json.
A server-rendered site for West Coast Swing competition data from the WSDC registry: look up dancers' points and division eligibility, browse past events and their competitors, and see upcoming sanctioned events. It replaces an older Jekyll static-site + flat-file approach with HTML rendered on the server from PostgreSQL.
FastAPI · Jinja2 (server-rendered HTML, minimal progressive-enhancement JS) ·
PostgreSQL (asyncpg) · uvicorn · Docker.
cp .env.example .env # add OPEN_WEATHER_MAP_API_KEY for event geocoding
docker compose up --buildThis starts PostgreSQL, the app on http://localhost:8000, and the data
importer. The app/importer apply migrations on startup from the SQL baked into
the image (python -m src.migrate), so no source or initdb mount is needed on
the server. Credentials are postgres:postgres / db wsdc (dev only).
To load data without hitting WSDC, point the importer at the legacy cached files
and run a single offline pass (set IMPORTER_OFFLINE=true in .env):
docker compose run --rm importer python -m src.importer --once/ home · /dancers · /dancer/{id} · /events · /event/{id} ·
/event-competitors/{occurrence_id} · /upcoming-events (+ /wsdc_events.ics) ·
/dancers-over-time · /about. /health is the JSON health check.
Feeds & data: /feed/{feed_token}.xml is a per-user RSS feed of your starred
dancers' newest points (the home page links it next to "Starred Dancers"), and
/data.json streams the whole dataset (the dancer/event/placement tables; the
private and operational tables are excluded) for anyone who wants to download it.
python -m src.importer fetches each dancer from WSDC and upserts it in its own
transaction, prioritising recent competitors and looping forever; --once runs a
single pass and IMPORTER_OFFLINE=1 reads the legacy cache files instead of the
network. See AGENTS.md for the full design.
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # set DATABASE_URL
./database/migrate.sh # needs DATABASE_URL in the environment
uvicorn src.main:app --reloadAGENTS.md is the detailed reference (schema, importer internals,
theme conventions, deployment). The image is published to GHCR by
.github/workflows/docker-publish.yml.