Saldra web — Next.js BFF for the saldra-api backend. See FRONTEND_ARCHITECTURE.md for boundaries and env vars.
pnpm install
pnpm devRequires a sibling checkout of saldra-api next to this repo (../saldra-api), matching docker-compose.yml build contexts.
cp .env.docker.example .env.docker
# Set BETTER_AUTH_SECRET (32+ chars); BETTER_AUTH_URL=http://localhost:3000 matches published web port
docker compose --env-file .env.docker up --build- App: http://localhost:3000
- API: http://localhost:8080
- Postgres:
localhost:${POSTGRES_PORT:-5432}(user/password/dbsaldra, plus databasesaldra_authfor Better Auth)
Better Auth schema: the auth-migrate service runs auth migrate against saldra_auth automatically before web starts. If port 5432 is already allocated on your machine, set POSTGRES_PORT=5433 in .env.docker and recreate the stack.
Host-only migrate (optional, if you change src/lib/auth.ts and need to re-apply): see Better Auth CLI.
Principal linkage: map a Better Auth user to a Go principals.id via the principalId field (see FRONTEND_ARCHITECTURE).
The same docker-compose.yml replaces running the API compose from saldra-api alone: stop the old stack or change host ports to avoid clashes.