Vote on the predicted winner of each 2026 Tour de France stage.
- backend/ — Express.js REST API backed by MariaDB (details)
- frontend/ — React (Create React App) UI (details)
The database runs in Docker; the backend and frontend run on the host with live-reload. From the repo root:
npm install # installs root, backend and frontend deps
npm run dev # starts the DB, syncs data from Infostrada, runs backend + frontend- Frontend: http://localhost:5173
- API: http://localhost:3000/api/ (try
/api/health) - The first
npm run devcopies.envandfrontend/.envfrom their.examplefiles if missing — edit.envand set real passwords plus your Infostrada credentials (INFOSTRADA_API_USER/INFOSTRADA_API_PASSWORD, see infostrada.md). - Backend runs via
node --watch(restarts on file changes); frontend via the CRA dev server. Stop both with Ctrl-C. - The DB keeps running in the background; stop it with
npm run dev:down.
The riders, stages and GC tables are not seeded by SQL — they are
populated from the Infostrada API. npm run dev runs that sync once on startup
(after the DB is up). The sync is non-fatal: if Infostrada is unreachable or
credentials are missing, dev still starts and you can sync later. Without it the
tables are empty, so the app shows no riders to select.
- Re-sync on demand (e.g. for newly added stages/results):
npm run dev:sync - The data persists in the
db_dataDocker volume between runs. - Wipe and start fresh:
docker compose down -vthennpm run dev.
Other scripts: npm run dev:db (DB only), npm run dev:backend,
npm run dev:frontend, npm run dev:sync (Infostrada sync).
To run everything (API + DB) in containers, prod-like, instead of on the host:
[ -f .env ] || cp .env.example .env
docker compose up -d --buildThe API serves the built frontend and the API on http://localhost:3000. The database is not exposed to the host in this mode.
See DEPLOY.md for building and rolling out on the CHP cluster.