Commit Graph
6 Commits
Author SHA1 Message Date
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 ed87d04e04 Reach Gitea as git.DOMAIN on the LAN and drop the forwarder
Test and deploy / test (push) Has been cancelled
Test and deploy / deploy (push) Has been cancelled
Everything on stpvm now reaches the Gitea LXC by its own name, GITEA_HOST
(git.DOMAIN), pinned to its LAN IP: by extra_hosts in caddy, backend, usaco
and silverbullet-git, and by /etc/hosts on the host for the runner, CI and
Renovate. Public DNS for that name is Cloudflare, which only carries HTTPS,
so the pin is what makes :3000 and :2222 work. The haproxy forwarder that
kept localhost:3000/2222 working is gone, so stpvm no longer publishes
those ports. The deploy and Renovate workflows and the runner script use
the new name; the docs and the rollback notes follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 17:28:58 +00:00
adamfandClaude Opus 5.5 180f6ac8b8 Redirect /gitea/ to git.DOMAIN instead of proxying Gitea
Test and deploy / test (push) Successful in 21s
Test and deploy / deploy (push) Successful in 8s
Gitea's ROOT_URL is now https://git.DOMAIN/, served by the Gitea LXC's own
tunnel, so Caddy stops proxying /gitea/ and 301s every /gitea/* URL there
with the prefix dropped and the query kept (CV links, HTTPS clones,
bookmarks). The admin gate on Gitea's commit-history views goes with the
proxy; on git.DOMAIN they are public by choice. The registry at the apex's
/v2/ is still proxied. edge_test.sh checks the redirects instead of the
gate, and the docs and architecture diagrams follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 17:21:13 +00:00
adamfandClaude Opus 5.5 acf21c69c2 Let non-admin accounts be granted single services, starting with /receipt/
Test and deploy / test (push) Successful in 1m57s
Test and deploy / deploy (push) Successful in 1m42s
Access was admin or nothing, so letting a friend print receipts meant making
them a full admin. Users now carry a list of permissions (User.Permissions,
a JSON column), each a key from the registry in services/permissions.go;
admins pass every check. The only key so far is `receipt`.

GET /auth/validate/:permission answers like /auth/validate-admin (200/403/401,
with the same refresh-token fallback, now shared) plus 404 for an unknown key,
and reads the user row rather than the token, so a grant or revoke applies on
the next request. On 200 it returns the username in X-Auth-User.

nginx gets a permission gate beside the admin gate: a location sets
$auth_permission and auth_requests /internal/auth/validate. /receipt/ moves
onto it, forwarding X-Remote-User to the receipt server. 403 now goes to
/no-access rather than back to the login page. The variable must not be given
a server-level default: the subrequest re-runs the server rewrite phase and
would blank it.

The admin panel's Manage Users tab ticks permissions per user
(setUserPermissions, permissionTypes). The login page is no longer
admin-only in wording or destination: a non-admin lands on /account, which
lists the services they can open; /no-access is the same view with a notice.

/auth/validate-admin and every other admin-gated service are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 22:04:56 +01:00
adamfandClaude Opus 5.5 2eacbc2e33 Add saved layouts, and make /stp an ordinary canvas page
Test and deploy / test (push) Successful in 1m51s
Test and deploy / deploy (push) Successful in 1m10s
A layout is a named copy of one canvas page's boxes and background
(models.Layout, layout.graphql), saved from the canvas's new Layouts
button and loaded onto any page from there or from the admin Pages
tab. Loading onto a page with boxes asks whether to replace them or
add on top; a replace first saves the page as a "<page> before
<layout>" layout so it can be undone. Copies, not links: editing a
page never changes a layout or another page. The copying is
server-side in one transaction, and everything is @admin since a
layout keeps admin-only boxes.

/stp loses its static route and becomes a Page with slug "stp",
created once at start-up (ensureStpPage), so it can be renamed,
hidden or deleted like a shrine. Its boxes were already keyed "stp".
Home3.vue is kept as legacy; its starter is now "Old /stp grid" in
pageStarters.js. ConfirmDialog gains an optional second button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:33:07 +01:00
adamfandClaude Opus 5.5 289b5a5a1d Add /architecture: diagrams of how the site fits together
Test and deploy / test (push) Successful in 1m11s
Test and deploy / deploy (push) Successful in 31s
Eight hand-drawn SVG diagrams across five sections (infrastructure,
nginx, Go backend, Vue frontend, Python), sharing one diagram kit
(diagram.css, DiagramFigure, DiagramDefs) built on the site's tokens.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 20:41:20 +01:00