mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-05 18:39:25 +01:00
/auth/login, /auth/register and /auth/forgot-password are AccountKit's forms: password, passkey, an email sign-in link, recovery, Sign in with OrangeCat and the shared bitbaum sign-in, each when its env is set. /dashboard/security carries AccountKit's account panel (password, passkeys, two-step sign-in, linked sign-ins, deletion). compat passes screens: 'accountkit' (AccountKit 0.20). AccountKit is the only credential writer. evig's /api/auth/register, forgot-password, reset-password and verify-email and /api/user/change-password are removed: they shadowed AccountKit's endpoints of the same names. Kept, as AccountKit hooks or evig's own code: the per-account lockout, the 6-digit address code (it replaces AccountKit's confirmation mail), IT-Hilfe's claim link (now an AccountKit reset token, old links honoured), the team invitation claim, the HR hire, staff permissions and referral credit. Deletion is refused for a super admin and for a person on kept records. Migration 143 (additive, idempotent) makes the panel's rename and deletion reach users. The e2e job imports the seeded accounts before the journeys and runs a browser journey through every method, with mail caught by a sink. Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 Co-authored-by: Claude <noreply@anthropic.com>
91 lines
3.0 KiB
Plaintext
91 lines
3.0 KiB
Plaintext
# RevampIT Unified Environment Configuration
|
|
# Copy this file to .env.local and fill in your values
|
|
|
|
# ==========================================
|
|
# MAIN APPLICATION (Next.js)
|
|
# ==========================================
|
|
|
|
# Accounts (@bitbaum/accountkit) — generate: openssl rand -base64 64
|
|
AUTH_SECRET=your-super-secret-auth-key-change-in-production-min-32-chars
|
|
NEXTAUTH_URL=http://localhost:3001
|
|
NEXTAUTH_SECRET=your-super-secret-auth-key-change-in-production-min-32-chars
|
|
# "Sign in with OrangeCat" (client id "evig"): both, or the button is hidden.
|
|
# ORANGECAT_OAUTH_CLIENT_ID=
|
|
# ORANGECAT_OAUTH_CLIENT_SECRET=
|
|
# The shared bitbaum sign-in (Morulia): all three, or the button is hidden.
|
|
# Switched on by loki app-secrets.yml signin-on.
|
|
# SIGNIN_ISSUER=
|
|
# SIGNIN_CLIENT_ID=
|
|
# SIGNIN_CLIENT_SECRET=
|
|
# The email sign-in link and password recovery need account mail (RESEND_*).
|
|
|
|
# Database — SSOT: DATABASE_URL (app + auth share one pool)
|
|
# Local dev: Docker Postgres from docker-compose.yml (port 5433)
|
|
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/revampit_cms
|
|
|
|
# Optional discrete parts (used when DATABASE_URL is unset)
|
|
DB_HOST=localhost
|
|
DB_PORT=5433
|
|
DB_NAME=revampit_cms
|
|
DB_USER=postgres
|
|
DB_PASSWORD=postgres
|
|
DB_SSL=false
|
|
|
|
# Optional Redis for auth rate limiter/lockout
|
|
REDIS_URL=redis://localhost:6380
|
|
ENABLE_REDIS_RATE_LIMITER=true
|
|
MEILI_MASTER_KEY=masterKey_change_in_production
|
|
MEILI_PORT=7700
|
|
|
|
# ==========================================
|
|
# PAYREXX (online payments — optional in dev)
|
|
# ==========================================
|
|
# SSOT: src/config/payrexx.ts · Setup: docs/operations/PAYREXX_SETUP.md
|
|
# Dev: leave unset → mock redirect at /api/payments/payrexx-mock-redirect
|
|
# PAYREXX_INSTANCE=your_instance_name
|
|
# PAYREXX_API_SECRET=your_api_secret
|
|
# PAYREXX_WEBHOOK_SECRET=your_webhook_signing_secret
|
|
|
|
# ==========================================
|
|
# SERVER
|
|
# ==========================================
|
|
|
|
PORT=3001
|
|
NODE_ENV=development
|
|
JWT_SECRET=your-super-secret-jwt-key-change-in-production-min-32-chars
|
|
JWT_EXPIRES_IN=24h
|
|
FRONTEND_URL=http://localhost:3001
|
|
NEXT_PUBLIC_SITE_URL=http://localhost:3001
|
|
|
|
# Feature flags
|
|
ENABLE_CMS=false
|
|
NEXT_PUBLIC_ENABLE_ROLE_SELECTION_ON_REGISTER=false
|
|
|
|
# Admin bootstrap (setup scripts only)
|
|
# ADMIN_PASSWORD=your-secure-admin-password-here
|
|
|
|
# Email — local dev uses Mailpit (docker-compose port 1025 / UI 8025)
|
|
EMAIL_HOST=localhost
|
|
EMAIL_PORT=1025
|
|
EMAIL_SECURE=false
|
|
EMAIL_USER=
|
|
EMAIL_PASS=
|
|
EMAIL_FROM=noreply@revamp-it.ch
|
|
|
|
# File uploads (local fallback)
|
|
UPLOAD_DIR=./uploads
|
|
MAX_FILE_SIZE=10485760
|
|
|
|
# ==========================================
|
|
# PRODUCTION OPS (optional — gitignored)
|
|
# ==========================================
|
|
# See .env.selfhost.local.example for Hetzner prod access via SSH tunnel.
|
|
|
|
# ==========================================
|
|
# SECURITY NOTES
|
|
# ==========================================
|
|
# 1. NEVER commit .env.local or .env.selfhost.local
|
|
# 2. Prod DB: self-hosted Postgres 17 on Hetzner (not cloud-hosted)
|
|
# 3. Dev DB: local Docker (npm run services:up)
|
|
# 4. Use HTTPS in production (required for secure cookies)
|