Phase 3 · the server can write

A server that remembers

Nothing on this page is written into the HTML. Every planet below was fetched from a real HTTP server, which read it out of a real SQLite database, which was filled by a seed script. Browser → server → database → back again.

New in Phase 3: it goes the other way too. You can make an account and take the quiz, and what you did is still there tomorrow — on the server, not in your browser. Your score is worked out by the server, so it cannot be faked.

1 · Is anything alive?

GET /api/health — the server queries the database before answering.

checking…

2 · Data from the database

GET /api/planets — filtering and sorting happen in SQL, on the server. In v1 this was a hard-coded JavaScript array.

loading…

3 · One record, joined with another table

GET /api/planets/:slug — two queries, never one-per-fact. Click any planet above.

nothing selected

4 · A question with no fixed answer

GET /api/moon?date= — the only endpoint that cannot be pre-computed, because you choose the date. Pick any day, past or future.

pick a date

5 · Something you send TO the server

GET /api/quiz/levels/:id then POST /api/quiz/attempts — the questions come down without their answers, and the marking happens on the server. Look in DevTools: the correct answers are genuinely not in the response.

loading levels…