Files
plumber/todo.md
T
codegirl007 96b0ce795a Address follow-up review: cheaper avatars, list limits, less chatter.
Switch avatar resize to ApproxBiLinear, cap hunt/profile/admin list queries, drop redundant admin/profile lookups, dedupe CI on app PRs, and refresh stale todo.md notes.
2026-08-22 09:55:32 -07:00

32 lines
1.6 KiB
Markdown

# Plumber — follow-ups
From the project review. Priority order within each section.
## Done recently
- [x] **Persist sessions** — Custom sqlc-backed `SessionStore` (scs API kept; no `postgresstore`).
- [x] **Drop Dockerfile** — DigitalOcean App Platform buildpack from `go.mod`.
- [x] **Rune-safe truncation** — Form fields truncate by runes.
- [x] **Admin bootstrap**`ADMIN_USERNAME` seeds first admin only when none exist; `/admin/users` for promote/demote.
- [x] **Graceful shutdown** — Signal-aware `http.Server.Shutdown` with timeouts.
- [x] **Handler tests** — Vote HTMX, answer/hide, CSRF, session rotation via in-memory `Store` (no Postgres for web suite).
- [x] **App Platform listen port** — Prefers `PORT`, then `LISTEN`, then `:8080`.
- [x] **Prod DB = PlanetScale Postgres** — Required `DATABASE_URL`; DSN cleanup for PlanetScale/libpq-only params.
## Docs & ops
- [ ] **README** — How to run locally, env vars (from `.env.example`), admin bootstrap, PlanetScale `DATABASE_URL`, App Platform notes (`PORT`, `SECURE_COOKIE=1`).
- [ ] **Migrations story** — Schema is applied on boot from `schema.sql`. OK for v1; plan real migrations before schema drifts.
## Smaller / later
- [ ] Rate-limit login/register (bcrypt helps; still open to brute-force).
- [ ] Cursor pagination UI when hunt/profile lists hit their row limits.
- [ ] Optional Postgres integration tests (`TEST_DATABASE_URL`) for sqlc SessionStore / advisory locks.
## Suggested order of attack
1. Short README (run, env, admin, App Platform + PlanetScale).
2. Migrations plan before the next schema change.
3. Rate-limit auth endpoints.