Commit Graph

5 Commits

Author SHA1 Message Date
Brian Fertig a849293bd0 Add account linking and per-account theme persistence
- Profile page gains a Request Account Link form, plus sections for pending requests (create / deny / deny-and-block), confirmed linked accounts (toggle / remove), and blocked requesters (allow requests)
- Toggle signs the browser in as the linked account using a single-use 60-second switch token minted server-side after link verification, so the target's password is never needed; a new "account-switch" Credentials provider in auth.ts consumes the token atomically to prevent replay
- Theme preference now stored on the User profile row (new `theme` column) and applied from the root layout's no-FOUC script before first paint, so each account keeps its own look across toggles and devices; anonymous visitors keep the old localStorage behavior
- New Prisma models: AccountLinkRequest, AccountLink, AccountLinkBlock, AccountSwitchToken with composite uniques, self-link check constraint, and cascade deletes
2026-08-30 13:28:55 -06:00
Brian Fertig 83075c8791 Add user profile page with name and photo support
- New `/profile` page lets users set first/last name and upload a
  profile photo (resized to 256x256 JPEG server-side via sharp, stored
  as a data URL in Postgres since the container FS is ephemeral)
- Sidebar user block now shows the profile photo (or initial-letter
  fallback) and display name, and links to `/profile`
- Migration adds `firstName`, `lastName`, `avatar` columns to User and
  backfills them from the legacy `name` field; seed updated to match
- Bump Next.js server-action body limit to 11 MB so avatar uploads up
  to the 10 MB cap aren't silently rejected with a 413
- Expose Postgres port on the host in docker-compose for local tooling
2026-08-30 11:24:05 -06:00
Brian Fertig a1cdb31e49 feat: make host port configurable via APP_PORT env var
Allow users to customize the host-side port mapping while keeping the
container's internal port fixed at 3000. The default remains 3000 when
APP_PORT is unset.

- Add APP_PORT to .env.example with documentation
- Update docker-compose.yml to use ${APP_PORT:-3000}:3000
- Update README with new env var and usage notes
2026-08-12 13:15:41 -06:00
Brian Fertig 0381363d4e Updates to README 2026-08-12 12:05:56 -06:00
Brian Fertig 86884fd23e Initial commit from Create Next App 2026-08-11 11:56:15 -06:00