- Create override with port mappings if missing (was gitignored, absent on server)
- Force-recreate containers to apply new port mappings
- Auto-add BETTER_AUTH_URL to .env if not set
- Use @prisma/adapter-pg for PrismaClient (Prisma 7 removed datasourceUrl/datasources)
- prisma.config.ts: migrate.url for CLI commands
- schema.prisma: no url in datasource (Prisma 7 requirement)
- Add url = env("DATABASE_URL") back to schema (required by Prisma 7.5)
- Simplify prisma.config.ts
- First registered user auto-promoted to ADMIN via databaseHooks
- Subsequent users get HOST role
Step 6/7 asks for admin name/email/password and creates the user
directly in the database. Can be skipped (creates later via ./setup.sh admin).
Also fixed PgBouncer wait_for_service to use nc instead of pg_isready.
- auth.ts: auto-allow localhost:3000-3010 + LAN_HOST for trustedOrigins
- setup.sh: new `dev` command (update + kill old processes + auto LAN IP + launch)
- next.config.ts: allowedDevOrigins for LAN HMR
- Remove hardcoded baseURL from auth-client.ts — better-auth now uses
current window.location.origin, works from any IP/domain
- Add trustedOrigins config to auth.ts — allows requests from LAN IPs
- Add BETTER_AUTH_TRUSTED_ORIGINS env var for configuring allowed origins
- Improve error logging in login/register forms (was silent catch)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ./setup.sh admin — create admin user directly in DB
- Hashes password via bcryptjs (already in dependencies)
- Creates both user and better-auth account records
- Shows existing admins, offers to promote existing users
- Validates email, password length (min 8)
- Added to interactive menu and CLI router
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove set -e (((issues++)) returns exit 1 when 0 → kills script)
- Fix .env.example parser: skip comments, validate var names with regex
- Fix update: skip git pull when user declines stash (was running anyway)
- Add --accept-data-loss to prisma db push (prevents interactive hang)
- Replace ((var++)) with var=$((var + 1)) for safety with pipefail
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove "type": "commonjs" from package.json — fixes Turbopack
ESM/CommonJS conflict causing white screen in dev mode
- setup.sh: auto-generate passwords (PostgreSQL, MinIO, auth secret)
- setup.sh: auto-install Docker/Node.js if missing (apt/nvm/brew)
- setup.sh: backup existing .env before overwrite
- setup.sh: create MinIO bucket via curl if mc not installed
- setup.sh: add timeout errors for service readiness checks
- setup.sh: include pgbouncer in local dev docker compose up
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
setup.sh now waits for Redis PONG and PgBouncer pg_isready before running
Prisma migrations. CLAUDE.md gets mandatory post-change checklist ensuring
setup.sh, README.md, PROMPT.md, .env.example stay in sync after every change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>