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.
1.6 KiB
1.6 KiB
Plumber — follow-ups
From the project review. Priority order within each section.
Done recently
- Persist sessions — Custom sqlc-backed
SessionStore(scs API kept; nopostgresstore). - Drop Dockerfile — DigitalOcean App Platform buildpack from
go.mod. - Rune-safe truncation — Form fields truncate by runes.
- Admin bootstrap —
ADMIN_USERNAMEseeds first admin only when none exist;/admin/usersfor promote/demote. - Graceful shutdown — Signal-aware
http.Server.Shutdownwith timeouts. - Handler tests — Vote HTMX, answer/hide, CSRF, session rotation via in-memory
Store(no Postgres for web suite). - App Platform listen port — Prefers
PORT, thenLISTEN, then:8080. - 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, PlanetScaleDATABASE_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
- Short README (run, env, admin, App Platform + PlanetScale).
- Migrations plan before the next schema change.
- Rate-limit auth endpoints.