A free photo quiz about the Swiss Federal Assembly, at parlaqui.ch: ten rounds, a portrait of a member of the National Council or the Council of States, six names to choose from. No account, in German, French, Italian and Romansh. Made by Liip.
Built with SvelteKit 2 (Svelte 5), TypeScript, SQLite (better-sqlite3), sharp and opentype.js, served by adapter-node in a Docker image.
- Node.js 22 (see
.nvmrc) and npm - An API key for the Swiss Parliament Open Data Web Service, free at https://ws.parl.ch/registration
cp .env.example .env # then set the values below
npm install
npm run devIn .env, set at least PARL_API_KEY and an IMPORT_TOKEN of 32 characters or more (openssl rand -hex 24). Every variable is explained in .env.example. The database is the file data/parlaqui.db, created on first start (DATABASE_PATH moves it).
Migrations in migrations/ are applied at startup. The database starts empty, so the game has nobody to show until the roster is imported once:
curl -s -X POST -H "Authorization: Bearer $IMPORT_TOKEN" http://localhost:5173/api/importIt answers {"status":"published",…} once the members and their photos are checked; schedule the same call daily in production (docs/import.md).
npm test # Vitest; every database test file gets its own in-memory database
npm run lint # Prettier and ESLint
npm run check # svelte-checknpm run build
PORT=3000 node buildThe Dockerfile builds the same and runs it as the node user; docs/operations.md covers deploying, backups and the readiness check (scripts/readiness.sh).
- docs/game.md: rounds, timing, scoring, flood protection, photos, screen readers
- docs/import.md: the daily roster import and its checks
- docs/parl-api.md: what the Parliament's web service returns
- docs/analytics.md: the cookie-free audience counter and
/insights - docs/privacy.md: where the privacy page's promises live in the code
- docs/seo.md: indexed pages, sitemap, previews and share images
- docs/operations.md: deploying, backups, restore, logs, readiness
The code is under the MIT License. The following are not covered by it:
- Parliament data and portraits: the members' data and portraits come from the Swiss Parliament (© ParlCH, Parlamentsdienste der Bundesversammlung, Bern) under the terms of its Open Data Web Service and photo gallery. The repository contains no portraits; the app fetches them at runtime.
- Federal Palace photo:
static/images/og.jpg,static/images/bundeshaus-686.jpg,static/images/bundeshaus-1024.jpgandsrc/lib/server/card/bundeshaus.jpgare adaptations of "Nordfassade Bundeshaus - früh morgens" by VOLLTOLL / Manuel Lopez, under CC BY-SA 4.0, and stay under that license. - Archivo font:
src/lib/server/card/archivo-latin-*.woff(and the copies installed through@fontsource/archivo) are © The Archivo Project Authors, under the SIL Open Font License 1.1. - Names and logos: "Parlaqui", "Liip" and their logos are not licensed for reuse.
The CI configuration uses Liip's GitLab components and runners, so it only runs on Liip's GitLab as is.