feat: PocketBase backend + account/profile schema (epic #6, issue #9)
Foundation for the user-accounts platform. Self-hosted PocketBase v0.39.6,
version-pinned from the official release binary, schema-as-code so the
collections auto-apply on boot and never drift from hand-clicking.
Collections: users (auth, admin-only nsfwEnabled), profiles, watch_state,
watchlist, prefs. Per-owner access rules traverse profile.user; nsfwEnabled
is never client-writable (superuser-only). Relations cascadeDelete; unique
indexes keep one resume/watchlist row per (profile,itemId) and one prefs per
profile.
Verified locally against v0.39.6: migration applies clean, and scripts/verify.py
proves two users can't read/write each other's data and can't set their own
nsfwEnabled (19/19 checks). Coolify deploy (domain/TLS, superuser, SMTP,
backups) documented in README as the manual half.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 18:22:45 +00:00
|
|
|
# Local development / verification only. On Coolify, deploy the Dockerfile as an
|
|
|
|
|
# application resource (see README) — Coolify manages the domain, TLS and volume.
|
|
|
|
|
services:
|
|
|
|
|
pocketbase:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
args:
|
|
|
|
|
PB_VERSION: 0.39.6
|
|
|
|
|
ports:
|
|
|
|
|
- "8090:8090"
|
2026-07-22 16:23:05 +00:00
|
|
|
environment:
|
|
|
|
|
# Family invite code (onboarding.pb.js). Unset → registration + template
|
|
|
|
|
# route fail closed. Locally: AMBER_INVITE_CODE=test docker compose up.
|
|
|
|
|
AMBER_INVITE_CODE: ${AMBER_INVITE_CODE:-}
|
feat: PocketBase backend + account/profile schema (epic #6, issue #9)
Foundation for the user-accounts platform. Self-hosted PocketBase v0.39.6,
version-pinned from the official release binary, schema-as-code so the
collections auto-apply on boot and never drift from hand-clicking.
Collections: users (auth, admin-only nsfwEnabled), profiles, watch_state,
watchlist, prefs. Per-owner access rules traverse profile.user; nsfwEnabled
is never client-writable (superuser-only). Relations cascadeDelete; unique
indexes keep one resume/watchlist row per (profile,itemId) and one prefs per
profile.
Verified locally against v0.39.6: migration applies clean, and scripts/verify.py
proves two users can't read/write each other's data and can't set their own
nsfwEnabled (19/19 checks). Coolify deploy (domain/TLS, superuser, SMTP,
backups) documented in README as the manual half.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 18:22:45 +00:00
|
|
|
volumes:
|
|
|
|
|
- pb_data:/pb_data
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pb_data:
|