Docker clients always talk to /v2/ at the root of the host, whatever
Gitea's ROOT_URL says, and Gitea advertises its token endpoint at
https://<domain>/v2/token. The apex server block redirected everything to
www, so the registry was unreachable. It now proxies /v2/ to Gitea, without
a body size limit or request buffering, and redirects the rest as before.
Needed to publish the job-tracker image.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Makefile: make check runs the backend, Python, Vue and compose checks
that previously lived only in local notes.
deploy.yaml: a test job runs the backend and Python suites in containers
on every push, and deploy needs it. Deploy also refuses to run if main
has moved past the tested commit. maintenance.yaml takes the env-apply
lock around its compose steps, as deploy already did.
nginx: the 24 proxied locations that production and dev both carried now
live once in nginx_routes.conf.template, rendered by the entrypoint on
every boot path. The effective config is unchanged for both.
Remove the root package.json and lockfile, which nothing referenced.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A Violentmonkey userscript, served by the site and installed from /cv/jobs,
adds the posting open in the browser (LinkedIn, an ATS, any company page) to
the tracker. Claude reads the title, company and location off the page text.
- Three token-guarded REST routes under /api/jobs/capture (status, extract,
upsert). They take a bearer token, JOB_CAPTURE_TOKEN, because the auth
cookies are SameSite=Lax and never sent from another origin. An unset token
switches the routes off.
- The upsert matches on a canonical posting URL, then (company, job title),
so a capture and the email pipeline do not make two rows for one job.
- The Claude call is a new internal Python route, /internal/jobs/extract,
alongside the rowing reader; the client and fence stripping they share move
to python/app/claude.py.
- New "saved" status ranked below "applied", and a description column holding
the posting text, shown per row on the tracker.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
POST /rowing in the Go backend no longer calls the Anthropic SDK. It keeps
the admin gate, EXIF date, duplicate check, sanity bounds and insert, and
sends the image to a new internal Python route, POST /internal/rowing/read,
which makes the Claude call and returns the three numbers it read.
The route spends a paid call and has no auth of its own, so nginx 404s
/py/internal/ and the route refuses anything carrying the proxy headers
nginx adds. The python container now receives CLAUDE_API_KEY.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quartz was already replaced by silverbullet-public; its build context moves
to .deprecated/quartz. Hasura and autoheal are removed from the stack, with
their compose services (and Hasura's nginx blocks) kept verbatim under
.deprecated/ alongside a README on how to bring each back.
Removes the /hasura/ route from both nginx templates and the envsubst
allow-list, and updates the docs and comments that referred to the three
services. With autoheal gone nothing restarts an unhealthy container; the
healthchecks are now informational only, and the docs say so.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
/notes/ is now served by silverbullet-public: the same SilverBullet 2.11.0
image as the /sb/ editor, run with SB_READ_ONLY over a read-only mount of
the vault. Quartz is retired (quartz/ kept with a STATUS header).
Keeping private/ off the public site needs nginx, not just SilverBullet:
SB_SPACE_IGNORE only filters the file listing. Verified with curl that
2.11.0 still serves ignored paths via /.fs/<path>, via server-rendered page
URLs, and exposes the vault's .git through /.fs/.git/. nginx now 404s any
private/ or templates/ segment at any depth and any nested dot-folder under
/notes/. SB_REVISIONS=disabled stops /.revisions serving git history, and
nginx blocks it as a second layer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- auth: panic at init if BACKEND_SECRET missing/short — HS256 would happily
start with an empty key, making admin tokens forgeable by anyone
- websocket: admin check now goes through AuthenticateTokenWithClaims so the
"tv" token-version revocation applies on /ws too; a logged-out or
password-changed token no longer keeps it alive for its full lifetime
- admin diagnostics: check BACKEND_SECRET not the nonexistent AUTH_SECRET
- rowing upload: 10MB cap before buffering + base64 (admin-only route, but
unbounded read = easy memory exhaustion + huge paid Claude call)
- nginx: shared security_headers.conf (XFO/nosniff/Referrer-Policy/HSTS/CSP)
included in every location that sets its own add_header — nginx drops the
parent's whole set otherwise; CSP added to the SPA document;
ssl_protocols pinned to TLSv1.2/1.3; HSTS on apex redirect
- compose: Gitea HTTP bound to 127.0.0.1 (plain HTTP was LAN-exposed);
autoheal docker socket mount read-only
Co-Authored-By: Claude Code <[email protected]>
Quartz renders the vault but has no write path, so editing a note meant
editing files on the Pi or pushing through git. SilverBullet serves the same
vault as an editable PWA at /sb/, behind the same nginx admin gate /notes/
uses. Quartz stays as the read view; its --serve watcher picks up SilverBullet's
writes, so /notes/ follows within seconds.
The vault is now the `notes` repo rather than `obsidian_vault`, and the
silverbullet-git sidecar commits and pushes what the editor writes while
pulling what Obsidian pushes from elsewhere. The vault's own deploy workflow
has been removed in that repo: it pulled from the old remote and restarted
quartz, and a second git process in the same clone would race the sidecar.
Notes on the configuration:
- Single-space mode, auto-detected because the mounted folder is not empty.
SilverBullet writes no database or metadata into the vault, so the folder
stays plain markdown that quartz and Obsidian still understand.
- /sb/ is the one proxied app whose prefix is NOT stripped. SB_URL_PREFIX=/sb
tells the PWA its own base path and its service-worker scope is built from
that; stripping the prefix serves a blank page with nothing in the log.
- SB_SPACE_IGNORE mirrors quartz's ignorePatterns and must be newline
separated. A comma separated list is accepted silently and does nothing.
- No SB_USER is set, so the container is open to anything reaching it on
app-network. The nginx auth_request gate is the only protection.
- The sidecar runs as uid 1000 to match the vault's ownership, and is a
separate container rather than SilverBullet's own shell backend, which would
hand anyone past the nginx gate command execution inside the container.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BCQFvkvorAw1xwhd5gL2qZ
Security:
- Token revocation. User gains a TokenVersion counter embedded in both
tokens as a "tv" claim; AuthenticateToken rejects a token whose version
no longer matches the row. Logout bumps it, so logging out now kills
outstanding tokens rather than only clearing cookies. Costs one
primary-key SELECT per authenticated request, which is the price of
having revocation at all.
- Spotify OAuth CSRF. The fixed SPOTIFY_AUTH_STATE constant is replaced by
a per-request one-shot nonce, verified and consumed on callback.
- Private chat attachments. Attachments on private messages are written to
/backend/uploads/private/ and served at /uploads/private/, gated by the
same nginx auth_request admin check used for /hasura/ and /notes/.
Private uploads are rejected from non-admin callers.
- The icecast admin UI (/radio/admin/) is behind the admin gate; listener
traffic is untouched.
- Store caches are mutex-guarded, so -race is clean.
Bugs:
- The email pipeline no longer drops emails permanently on transient
failure. Failures record an attempt counter and are retried up to 3
times; the fetch window rewinds to the oldest retryable email's
ReceivedAt, without which a retry could never re-fetch it.
- Rowing duplicate detection distinguishes ErrRecordNotFound from a real
DB error, so a transient failure no longer causes a duplicate insert
plus a paid Claude call.
- DeletePost propagates its delete error instead of reporting success.
- RecentlyPlayed populates the cache it reads.
- main.go exits non-zero if r.Run fails, so a port conflict is visible.
- Python: the scan truncation flag is set on every deadline path;
timed_out is reported by the worker rather than inferred from the clock;
date validation uses Europe/London rather than server-local time.
- Vue: Time.vue and Radio.vue intervals are cleared on unmount; Feed.vue
guards a missing author; Timer.vue gets an explicit state machine and
compares total elapsed seconds; Elle.vue's comma-operator call and
per-frame console.log are fixed.
Simplification:
- One TTLCache replaces three near-identical cache implementations, with
the differing eviction rules as explicit parameters.
- run_scan's transport index no longer uses one object as both ordering
record and live output; its three phases are separate functions.
- _price_hotels submits all work to a single pool, so the nested-executor
deadlock hazard is gone by construction.
- The NDJSON event generators share one implementation.
- IMAP FETCH responses pair each line with its literal in the type, so
callers no longer hand-skip alternate entries.
- Shared helpers for slice-of-pointers, markdown fences and auth cookies.
- Vue: useHotelSearch, createMirrorStore, useRotation, useCreateForm,
useLinkAttrs, ListWidget and LinkTableItems replace duplicated blocks.
- nginx dev config's duplicated :80/:443 bodies share one partial.
Infra: certbot passes --deploy-hook touching a sentinel that nginx's
watcher reloads on, so renewed certs are served without a restart, and the
watcher also removes the manual restart after first issuance. db is gated
on service_healthy, autoheal is pinned, and the unused envsubst entries
are dropped.
Verified: go build/vet, npx vite build, py_compile, docker compose config
for both overlays, bash -n on all scripts, and an envsubst render of every
nginx template (no leftover placeholders, runtime vars preserved, braces
balanced).
Co-Authored-By: Claude Opus 5 <[email protected]>
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]>
A second "Cheapest night" tab on /hotels scans every candidate check-in
between two dates (filtered by weekday, 1-7 nights, up to ~3 months),
keeps the N cheapest hotels per night, and prices TfL transport once per
unique hotel so the whole range fits in the streaming window.
Backend
- travelodge.py: extract _shortlist/_make_row/_price_hotels/_apply_transport
from run_search; add a 30-minute per-(location, dates, rooms) Travelodge
result cache, a deadline on page fetches, and run_scan (parallel date
fetches with per-date failure isolation, one TfL lookup per hotel).
- main.py: HotelRequestBase shared by search and scan requests,
HotelScanRequest with weekday/range validation, scan event models,
_guarded slot wrapper, POST /hotels/scan/stream (NDJSON).
- nginx: the streaming location now matches /py/hotels/(search|scan).
Frontend
- Split CheapHotels.vue into SingleStayPanel, CheapestNightPanel,
SharedFields, HotelRows, a shared form composable, stream/format helpers
and hotels-shared.css; shared fields keep their values across tabs.
- Vite dev server proxies /py to the Python API.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01H5P3C1HbbEwLZEYsjwr7uV
Backend: fetch Travelodge pages in parallel batches, price TfL journeys
from a worker pool throttled to the anonymous 50/min limit (500/min with
TFL_APP_KEY), cache TfL journeys for two hours, and expose a streaming
NDJSON endpoint (/hotels/search/stream) that sends the hotel list first
and one line per hotel as fares arrive. A 20-hotel search now takes
about 10 seconds instead of minutes. Every hotel also gets a cycling
time from the origin (TfL cycle routing with an app key, otherwise a
distance estimate).
Frontend: consume the stream so hotels appear immediately with a
progress bar, show three picks (best value, cheapest room, quickest
cycle) instead of one, add a rank-by toggle (stay + transport, stay
only, cycle time, travel time) and a Cycle column, and raise the hotel
cap to 40.
Nginx: match both search routes and disable proxy buffering and gzip so
the stream reaches the browser as it is produced.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dphx7LL5JC8dAFYU7MMpoA
- Replace searxng and open-webui with a FastAPI `python/` service proxied
at /py/ (Travelodge hotel search, rate-limited in nginx)
- Add CheapHotels view and CreateToggle component
- Move design tokens into Tailwind @theme in styles.css and migrate
components/views to utility classes; CVLayout re-points tokens for light theme
- Update README, CLAUDE.md, and .gitignore accordingly
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dphx7LL5JC8dAFYU7MMpoA
Open-WebUI's SvelteKit frontend hardcodes asset/API paths at build time,
so subpath hosting under /openwebui/ produced 404s on /_app/... assets.
Move it to its own subdomain so it can run at root.
- certbot: request cert with chat.${DOMAIN} as a third SAN via --expand
- nginx (prod): drop /openwebui blocks; add chat.${DOMAIN} HTTP redirect
+ HTTPS server with the existing admin auth gate
- nginx (dev): drop /openwebui blocks (no chat.localhost in dev)
- compose: WEBUI_URL points to https://chat.${DOMAIN}
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Use Docker's embedded DNS resolver (127.0.0.11) with nginx variables in
proxy_pass directives so upstream hostnames are re-resolved at runtime
instead of being cached forever at startup.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Pass the requested URI as ?redirect= when nginx denies access, so the
login page can forward the user to their intended destination on success.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Add /admin/login route for Login.vue as a standalone page
- Add requiresAdmin guard to /admin route
- Update auth guard redirect to /admin/login with redirect query param
- Update nginx @auth_denied to redirect to /admin/login
- Remove Login component from Admin.vue; drop v-if auth checks (guard handles access)
- Remove stale view files from old views/ structure (moved in prior commit)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Add ValidateAdmin endpoint that checks JWT admin claim for use as an
nginx auth_request subrequest. Widen cookie path from backend endpoint
to "/" so the access_token is sent on all paths. Extend access token
lifetime from 24h to 7 days. Disable hasura service by default via
Docker profile.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Remove unused uptime-kuma and wallabag services from docker-compose,
nginx configs, and vite proxy. Use BASE_URL env var in searxng
settings template instead of hardcoded URL.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add trailing slash to proxy_pass so nginx strips the subpath prefix
before forwarding requests to the upstream containers.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add uptime-kuma, searxng, and wallabag Docker services with Postgres integration for wallabag
- Add nginx reverse proxy location blocks for /uptime-kuma/, /searxng/, /wallabag/ in both prod and dev templates
- Update entrypoint.sh envsubst to include new HOST/PORT vars
- Add Vite dev proxy entries for all three services
- Update gitea-runner config: add self-hosted label and allow all volumes
- Add Gitea CI/CD workflow
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Replaces the custom Go/Vue notes system with Quartz v4, a polished
static site generator for Obsidian vaults. Mounts OBSIDIAN_DIR as the
Quartz content directory and serves it at /notes/ with hot-reload via
`npx quartz build --serve`.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Upload, list, and delete fallback music files from the admin page.
Backend handlers validate file type/size and prevent path traversal.
Nginx max body size increased to 50M to support large audio files.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Fix auth bypass in UpdatePost/DeletePost (missing return after auth check)
- Remove Spotify access token from callback response
- Replace internal error messages with generic responses in all handlers
- Harden GraphQL: complexity limit, disable playground/introspection in prod
- Add security headers (X-Frame-Options, HSTS, etc.) to nginx
- Disable Hasura console/dev mode in production
- Add DOMPurify sanitization to Markdown component
- Fix cookie removal to use correct domain/path from auth config
- Fix nil dereference in rowing handler when Claude API errors
- Fix wildcard CORS on stamp endpoint
- Pin nginx and certbot Docker image versions
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Adds Hasura v2.44.0 service connected to the existing Postgres database,
proxied through nginx at /hasura/ with WebSocket support for the console.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add alt attributes, width/height for CLS, aria-labels, meta description,
preconnect hints, LCP fetchpriority, and sound/stamp cache headers.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Enable gzip compression in nginx, add cache-control headers for static assets,
convert fonts to WOFF2 with font-display swap, preload fonts, add lazy loading
to below-fold images, and remove unused font files.
Co-Authored-By: Claude Opus 4.6 <[email protected]>