Document codebase: comments, per-area READMEs, deployment guide

Readability pass across all four areas of the stack. Comments explain why
rather than what, concentrated at the points where behaviour is non-obvious:
concurrency, caching, auth, scraping and nginx templating.

Backend: doc comments on every exported declaration across handlers,
services, models and resolvers. Resolver commentary lives inside function
bodies so gqlgen does not strip it on regeneration; schema files use #
comments rather than description blocks so introspection output is
unchanged. Extracted the duplicated auth-cookie blocks into helpers.

Frontend: header comments on every component, store and view, including
STATUS: notes marking which of the parallel/legacy views are still live.
Documented the non-reactive animation-state pattern, the homeData hub and
the WebSocket stale-socket guard. Removed a few dead imports and named the
reconnect-backoff and poll-interval constants.

Python: module and function docstrings covering the Travelodge scraping
contract, the deadline threading, the two-executor concurrency and the
NDJSON streaming protocol.

Infra: header blocks on every compose file, nginx template, Dockerfile and
entrypoint, covering the config selection, envsubst allow-lists, rate-limit
semantics and volume persistence. Hoisted the duplicated envsubst variable
list in nginx/entrypoint.sh.

New: backend/README.md, python/README.md, DEPLOYMENT.md, .env.example,
backend/graph/doc.go. Refreshed vue/README.md. Corrected CLAUDE.md, which
stated a 24h access token where main.go sets 7 days.

No behaviour change. go build/vet, vite build, py_compile and docker
compose config all pass.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-09-16 15:57:48 +01:00
co-authored by Claude Opus 5
parent a1102b4aa1
commit 64df70e5d2
183 changed files with 4691 additions and 204 deletions
+3
View File
@@ -1,3 +1,6 @@
# Latest activity from the self-hosted Gitea instance, proxied and cached for
# one minute by the backend. Resolves to null when the feed is empty.
type GiteaFeedItem {
avatarUrl: String!
repoUrl: String!
@@ -1,3 +1,11 @@
# Job application tracker. Rows come from these mutations or automatically
# from the email sync pipeline (backend/services/email_sync.go). These are
# private data, so the queries here are admin-only as well as the mutations.
#
# status is a free-form String, but only the values ranked in
# services.statusOrder can be advanced automatically by the email pipeline:
# applied, screening, assessment, interviewing, offer, rejected, withdrawn.
type JobApplication {
id: ID!
createdAt: Time!
+7
View File
@@ -1,3 +1,10 @@
# Chat history. The live chat runs over the WebSocket at /ws, not GraphQL;
# this query is the initial page load.
#
# Two gotchas: authorId is a per-connection counter from the chat hub, not a
# User id, and private messages are silently filtered out for non-admins
# rather than causing an error.
type Message {
id: ID!
content: String!
+3
View File
@@ -1,3 +1,6 @@
# Places to go. Unlike most mutations these require only a signed-in user,
# not an admin, and there is no per-user ownership: the list is shared.
type Place {
id: ID!
createdAt: Time!
+16
View File
@@ -1,3 +1,19 @@
# Root of the GraphQL schema.
#
# Query and Mutation are declared here with no fields; every other file in this
# directory adds to them with `extend type Query` / `extend type Mutation`.
# That is what lets the schema be split one file per domain, matching the
# one-file-per-domain resolver layout (gqlgen.yml uses layout: follow-schema).
#
# Time is mapped to Go's time.Time by gqlgen's default scalar handling and is
# serialised as RFC 3339.
#
# These files are the source of truth: after editing one, run
# go run github.com/99designs/gqlgen generate
# from backend/ to regenerate graph/generated.go and graph/model/models_gen.go.
# Note that `#` comments like this one are invisible to clients; a `"""` block
# would become a schema description and show up in introspection.
scalar Time
type Query
+4
View File
@@ -1,3 +1,7 @@
# Spotify "now playing" / "recently played" for the home page. Both resolve to
# null / an empty list when the backend has never completed the Spotify OAuth
# flow, so the page degrades rather than erroring.
type SpotifyArtist {
name: String!
}
+3
View File
@@ -1,3 +1,6 @@
# Steam presence and recent games for the home page, cached for five minutes.
# headerImage is built from the app id rather than returned by Steam's API.
type SteamGame {
appId: Int!
name: String!