Add a daily glossary quiz with a Go backend and high scores #21
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/glossary-quiz"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A daily quiz on the glossary's terms at
/quiz/, with today's and this week's high scores under public nicknames. It needs state the static site cannot keep, so this brings in ROADMAP's phases 2 and 3 together: a Go server beside Caddy, which proxies/api/to it, and PostgreSQL.What players get
anonymous_NNNNuntil the player chooses one. The page says, in bold and in both languages, that nicknames are public.How it works
graph.json(internal/quiz/questions.go). Five kinds: a term and its summary, a summary and its term, an example and its term, an abbreviation and its expansion, and a cloud service and its counterpart on the other cloud.counterpart-ofedge, make a question: a missing edge does not prove an answer wrong.distinguisheach other never appear in the same question.ffmpeggiving away FFmpeg, and both IAM terms offered in one question. A glossary edit that would produce a bad question now fails CI.HttpOnly,SameSite=Strictcookie; the database keeps only its SHA-256.pgxplussqlc. The generated code is committed and CI checks it is current; sqlc is pinned intools/go.mod.CI
A new
serverjob runsgofmt,go vetandsqlc diff, thengo testagainst a PostgreSQL it starts in the job. It then builds and smoke-tests the staged binary and pushesolli.puhakka.dev-server:<sha>fromdev.release.ymlchecks that both images exist.⚠️ Before merging
CI / serverwill fail until the kulpsin changes are in. They are being done separately:initdb,pg_ctl,psql).site_deployforolli/olli-dev:serverservice besideweb, with the healthcheck/app/server healthcheck;CI / server (push)tomain's required checks.Until step 2 is done the site keeps working, and the quiz page says the quiz is unavailable.
Checked locally
go testagainst PostgreSQL 18.6: 10 tests, covering the daily flow, time limit, answer rules, nicknames, both tables and pruning.html-validateandcheck-glossarypass.docker compose -f compose.dev.yml upruns the full stack.