17 Commits
Author SHA1 Message Date
adamfandClaude Opus 5.5 94a6abba97 Move the notes editor and job tracker to stppriv
Test and deploy / test (push) Successful in 31s
Test and deploy / deploy (push) Successful in 27s
The SilverBullet editor and the job tracker now run on their own LXC
(adamf/stppriv) at priv.<DOMAIN>, behind Cloudflare Access. Here:

- silverbullet and jobs services removed; /sb/, /jobs/ and the old
  /cv/jobs, /cv/leads and userscript URLs 301 to priv.<DOMAIN>
- silverbullet-git runs with SYNC_MODE=pull: stppriv is the vault's only
  writer. The backend's vault mount is read-only.
- jobs env vars, dev overrides and docs removed; edge_test.sh checks
  the new redirects

Merge only after stppriv serves /sb/ and /jobs/ and the jobs data has
been moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 13:53:48 +00:00
adamfandClaude Opus 5.5 4530cb8dc4 Trim comments to the non-obvious why
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s
Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:49:03 +00:00
adamfandClaude Opus 5.5 daa2a465fb Cut the edge over from nginx and certbot to Caddy
Test and deploy / test (push) Successful in 3m30s
Test and deploy / deploy (push) Has been cancelled
Caddy takes nginx's place in compose: ports 80/443, the fixed address
172.28.255.251 that cloudflared pins the public names to, the network
aliases, the healthcheck and the autoheal label. nginx and certbot are
removed from compose; Caddy already holds its own certificates in
./caddy/data, obtained while it ran beside nginx. `traffic` now tails
logs/caddy/payloads.log, and the dev override switches Caddy to its dev
sites instead of putting nginx in DEV_MODE.

Docs and comments that described nginx's behaviour now describe Caddy's:
CLAUDE.md, DEPLOYMENT.md (topology, boot paths, TLS, rate limits, runbook
with a rollback, rough edges), the READMEs, .env.example and the comments
in the backend, Python service, Vue source and infra files. nginx/ and
certbot/ stay in the repo as the rollback until this has settled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 23:28:28 +00:00
adamfandClaude Opus 5.5 e09b90afaa Add Caddy beside nginx as the replacement edge
Test and deploy / test (push) Successful in 1m32s
Test and deploy / deploy (push) Successful in 29m5s
caddy/ reproduces nginx's routes, gates, /notes/ privacy denials, uploads
(bucket first, then disk), rate limits, real-IP and headers in one shared
route table, with certificates obtained over DNS-01 in-process instead of by
certbot. Until the cutover it serves nothing public: loopback-only ports
8880/8443, no network aliases, its own address. The image build validates
the prod and dev configs, so a broken Caddyfile stops the deploy before any
container is replaced (`make check-caddy` is the same build).

caddy/edge_test.sh checks the privacy boundary and the gates and prints
everything else for diffing nginx against Caddy before switching over.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 22:45:35 +00:00
adamfandClaude Opus 5.5 4533b55da0 Remove the Rust/WASM crate and its build step
Test and deploy / test (push) Successful in 26s
Test and deploy / deploy (push) Successful in 38s
Weekly Maintenance / maintenance (push) Successful in 2m38s
Nothing live used it: main.js awaited the wasm init() on every page load,
but the only consumer, components/util/wasm/AutoScroll.vue, was never
imported. Dropping it removes the rust:slim + wasm-pack stage from the vue
image, the two Vite plugins that existed only for it, and the src/wasm/
guard in `make check-vue`, so a fresh clone builds without a Rust toolchain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 21:11:09 +01:00
adamfandClaude Opus 5.5 602aa522d6 Serve the site through a Cloudflare tunnel
Test and deploy / test (push) Successful in 2m9s
Test and deploy / deploy (push) Successful in 1m45s
A cloudflared container dials out to Cloudflare and forwards the site's
hostnames to nginx on :443, so the router's 80/443 forwards can close.
nginx takes the visitor's address from CF-Connecting-IP, trusted only from
cloudflared's fixed IP, so rate limits stay per visitor.

certbot can now validate over DNS-01 through the Cloudflare API when
CLOUDFLARE_DNS_API_TOKEN is set, so renewal needs no inbound port; without
it, it falls back to the webroot as before. DEPLOYMENT.md covers setup and
what stays off the tunnel: registry traffic on the Pi (pin the apex to
127.0.0.1 to dodge the 100 MB body cap), Gitea SSH and the radio harbor
(Tailscale).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 14:03:10 +01:00
adamfandClaude Opus 5.5 931b02c9e4 Run the job tracker as its own container at /jobs/
Test and deploy / test (push) Successful in 2m3s
Test and deploy / deploy (push) Successful in 1m31s
The tracker (applications, leads, email pipeline, capture userscript) now
lives in the adamf/job-tracker repo and runs here from its published image.

- docker-compose.yml: a `jobs` service with an explicit environment list
  (its own database role; none of the site's other secrets), ./jobs-data
  mounted at /data, and nginx waiting for it. The dev override seeds it.
- nginx: /jobs/ proxied to it with the prefix kept, and 301s from
  /cv/jobs, /cv/leads and the old userscript URL.
- env_registry.json and .env.example: the email and job-lead variables now
  belong to the jobs service; CLAUDE_* to python and jobs; new
  POSTGRES_JOBS_* and JOBS_IMAGE_TAG. The compose environment test now
  checks the jobs service's list as well as python's.
- backend: no longer starts the email and job-lead schedulers or serves
  the capture and email routes, since the tracker reads the same settings
  and would otherwise process everything twice. The old job code stays
  until the tracker has run for a while.
- vue: the CV page's Jobs button goes to /jobs/; the old routes are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:08:18 +01:00
adamfandClaude Opus 5.5 8d7606bbe8 Retire quartz, hasura and autoheal into .deprecated/
Deploy with Docker Compose / deploy (push) Successful in 1m1s
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]>
2026-10-01 14:58:17 +01:00
adamfandClaude Opus 5 64df70e5d2 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]>
2026-09-16 15:57:48 +01:00
adamfandClaude Fable 5.1 152f60ee32 Add Python FastAPI service, cheap hotels page, and Tailwind theme refactor
Deploy with Docker Compose / deploy (push) Successful in 1m29s
- 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
2026-09-08 00:06:04 +01:00
adamfandClaude Opus 4.6 8636dfedb9 Replace go-imap library with custom IMAP client, simplify CV layout styles, bump vite, move SEED_DB to backend
Deploy with Docker Compose / deploy (push) Successful in 5m19s
- Rewrite email_imap.go to use a minimal hand-rolled IMAP client instead of go-imap/go-message,
  for better compatibility with Outlook's non-standard responses
- Consolidate and simplify CVLayout.vue CSS overrides
- Bump vite from 7.1.11 to 7.3.2
- Move SEED_DB env var from nginx to backend in dev compose
- Add /app/src/wasm volume exclusion in dev compose

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-04-18 08:53:34 +01:00
adamfandClaude Opus 4.6 34934e7d13 Enable gin release mode outside dev
Deploy with Docker Compose / deploy (push) Successful in 3m53s
Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-04-11 00:38:44 +01:00
adamfandClaude Opus 4.6 75cede3b1b Fix security vulnerabilities across backend, frontend, and infra
Deploy with Docker Compose / deploy (push) Successful in 4m44s
- 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]>
2026-03-29 23:59:10 +01:00
adamfandClaude Opus 4.6 932e257152 Add HTTPS support in dev mode and fix mobile layout issues
Deploy with Docker Compose / deploy (push) Successful in 4m19s
Generate self-signed certs for local HTTPS, add port 443 and full SSL
server block to dev nginx config, add Spotify redirect URI env var,
improve Spotify token error handling, and fix Chat/Steam mobile sizing.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-26 11:18:32 +00:00
adamfandClaude Opus 4.6 d3d3269d49 Extract Vue frontend into separate container and add stp_wasm crate
Deploy with Docker Compose / deploy (push) Successful in 4m58s
Move Vue app from nginx/vue/ to top-level vue/ with its own Dockerfile,
update docker-compose configs and nginx proxy to serve from the new
container, and add initial Rust WASM crate (stp_wasm). Also fix .gitignore
to exclude Rust target/ directories.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-25 16:40:45 +00:00
adamf 2737b4f0d0 Avoid panic on spotify if not authed
Deploy with Docker Compose / deploy (push) Successful in 3m35s
2026-03-07 17:46:55 +00:00
adamf 9fa953c969 Add local dev mode with HTTP-only nginx and DB seeding)
Deploy with Docker Compose / deploy (push) Successful in 5m11s
2026-03-07 17:36:54 +00:00