From f26b9ec5f428869feef317a2cabbe121a369f03f Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Thu, 26 Nov 2026 11:08:17 +0100 Subject: [PATCH 1/5] docs: fix old links --- CONTRIBUTING.md | 2 +- docs/ai-documentation.md | 2 +- docs/sustainability.md | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89c6ed4..4a9f960 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -292,7 +292,7 @@ cd frontend pnpm e2e ``` -They need the local database to be running with the book dataset, see the [frontend README](./frontend/README.md#playwright-end-to-end-tests). +They need the local database to be running with the book dataset, see the [frontend README](./frontend/README.md#playwright-e2e-tests). ### Creating a pull request diff --git a/docs/ai-documentation.md b/docs/ai-documentation.md index 492f4ac..5c792c6 100644 --- a/docs/ai-documentation.md +++ b/docs/ai-documentation.md @@ -28,7 +28,7 @@ We have used Claude (through Claude Code) as a tool during development. In short - **[AGENTS.md](../AGENTS.md)**: the instructions every AI agent gets. It is short on purpose. It contains the rules from this document, a short overview of the project, a definition of done, and a table that says which documentation to read before which kind of change. It points to [CONTRIBUTING.md](../CONTRIBUTING.md), the READMEs and the files in `docs/` instead of repeating them, so each rule is written in one place. - **[CLAUDE.md](../CLAUDE.md)**: Claude Code reads this file and not `AGENTS.md`, so it imports `AGENTS.md` and `CONTRIBUTING.md`, which loads both in every session, and adds the few things that only apply to Claude Code. Other tools, such as Cursor and Codex, read `AGENTS.md` directly. -- **[.claude/settings.json](../.claude/settings.json)**: turns the restrictions described [below](#llms-are-unpredictable---and-their-access-is-restricted-based-on-that) into configuration that is the same for all of us. Claude Code is denied reading `.env` files, running git commands that write, and using `ssh`. It has to ask before commands that delete or change the local database, and may run lint, typecheck, tests and build without asking. +- **[.claude/settings.json](../.claude/settings.json)**: turns the restrictions described [below](#llm-restrictions) into configuration that is the same for all of us. Claude Code is denied reading `.env` files, running git commands that write, and using `ssh`. It has to ask before commands that delete or change the local database, and may run lint, typecheck, tests and build without asking. - **Skills** in [.claude/skills](../.claude/skills/): written-down procedures for work we do again and again, which the agent loads when they are needed: - `pre-pr-check` runs the pull request checklist from CONTRIBUTING.md and reports what passed and what was not verified. - `docs-check` compares a change with our documentation in both directions: that the code follows the documentation, and that the documentation still describes the code. diff --git a/docs/sustainability.md b/docs/sustainability.md index f4b74d5..146396b 100644 --- a/docs/sustainability.md +++ b/docs/sustainability.md @@ -17,13 +17,13 @@ This section is meant as an overview of potential improvements with regard to sustainability, and also shows that we are aware of the downsides of our implementation. The table has a column for the status at delivery 3, and the same table will be used to show what work has been done from delivery 3 to 4. More items can be added after delivery 3, and will be written inside the same table, with "Added after delivery 3" mark. -| Limitation | Possible improvement | Delivery 3 | Delivery 4 | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Cover images are loaded when the page renders, also those outside the screen, and have no fixed width or height. | Add `loading="lazy"` and set `width`/`height` on the `` in `BookCover.tsx`, so off-screen images load only when needed and the layout doesn't shift. | Not done | Done. Covers use `loading="lazy"`, except on the book page where the cover is visible right away. The cover box already has a fixed aspect ratio, so no `width`/`height` is needed to avoid layout shift. | -| We use the cover URLs from the dataset as they are, which may be larger images than the size we display them at. | Measure the image sizes, and use a smaller image variant if the image host offers one. | Not done | Won't do. Different covers are available from Goodreads through guesses regarding the correct URL, but the API is undocumented and may change at any time. This means our code loading images could stop working at any time, so we prefer to use URLs we know are working correctly. | -| The app loads two font families: Inter (self-hosted with `@fontsource`) and Open Sans (from Google Fonts). | Use one font family and host it ourselves, which removes an external request and one set of font files. | Not done | Done. Open Sans was not used anywhere, so we removed it. | -| Apollo caches the lists of genres, languages and formats in each browser, but the backend computes them again with a `GROUP BY` over the whole `books` table every time a browser without them asks. | Cache the lists in the backend, so they are computed once and shared between all users. They only change when the dataset changes. | Not done | Done. The backend computes each list once and keeps it in memory until the server restarts. The server must also be restarted if we ever change the book dataset. | -| Added after delivery 3: Apache sent our own JS, CSS and font files without cache headers, so browsers asked for them again on every visit. | Let browsers keep the files in `assets/` for a year, since their names change whenever their content changes. See the [deployment documentation](./deployment.md#apache-config). | - | Done | +| Limitation | Possible improvement | Delivery 3 | Delivery 4 | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Cover images are loaded when the page renders, also those outside the screen, and have no fixed width or height. | Add `loading="lazy"` and set `width`/`height` on the `` in `BookCover.tsx`, so off-screen images load only when needed and the layout doesn't shift. | Not done | Done. Covers use `loading="lazy"`, except on the book page where the cover is visible right away. The cover box already has a fixed aspect ratio, so no `width`/`height` is needed to avoid layout shift. | +| We use the cover URLs from the dataset as they are, which may be larger images than the size we display them at. | Measure the image sizes, and use a smaller image variant if the image host offers one. | Not done | Won't do. Different covers are available from Goodreads through guesses regarding the correct URL, but the API is undocumented and may change at any time. This means our code loading images could stop working at any time, so we prefer to use URLs we know are working correctly. | +| The app loads two font families: Inter (self-hosted with `@fontsource`) and Open Sans (from Google Fonts). | Use one font family and host it ourselves, which removes an external request and one set of font files. | Not done | Done. Open Sans was not used anywhere, so we removed it. | +| Apollo caches the lists of genres, languages and formats in each browser, but the backend computes them again with a `GROUP BY` over the whole `books` table every time a browser without them asks. | Cache the lists in the backend, so they are computed once and shared between all users. They only change when the dataset changes. | Not done | Done. The backend computes each list once and keeps it in memory until the server restarts. The server must also be restarted if we ever change the book dataset. | +| Added after delivery 3: Apache sent our own JS, CSS and font files without cache headers, so browsers asked for them again on every visit. | Let browsers keep the files in `assets/` for a year, since their names change whenever their content changes. See the [deployment documentation](./deployment.md#set-up-apache-config). | - | Done | ## Lighthouse From 38afc96f3f8facf5bb87a1cfe121f266f1fae106 Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Thu, 26 Nov 2026 11:08:37 +0100 Subject: [PATCH 2/5] docs: mention better auth secret in backend README --- backend/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/README.md b/backend/README.md index 396a1aa..f6d9c03 100644 --- a/backend/README.md +++ b/backend/README.md @@ -68,7 +68,7 @@ cd backend cp .env.example .env ``` -The `.env` file will be your own, gitignored version. +The `.env` file will be your own, gitignored version. Make sure to the `BETTER_AUTH_SECRET` value, and provide secrets for the GitHub and Discord login if you'd like to use them. Proceed to do the following: From fa3f08fef7b695db6dae3ec97a3c146ebdc40a03 Mon Sep 17 00:00:00 2001 From: Martin Alexander Kaminski Date: Thu, 26 Nov 2026 11:11:40 +0100 Subject: [PATCH 3/5] docs: simplify div and span explanation --- docs/accessibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/accessibility.md b/docs/accessibility.md index ad3e7d2..1e8e821 100644 --- a/docs/accessibility.md +++ b/docs/accessibility.md @@ -9,7 +9,7 @@ - **Semantic HTML.** The page language is set (``), the main navigation is a `