Admin flow: - Remove /admin/login (password-based) and /admin/dev-login routes entirely - admin_required now checks only the 'admin' role; redirects to auth.login - auth/dev-login with an ADMIN_EMAILS address redirects directly to /admin/ - .env.example: replace ADMIN_PASSWORD with ADMIN_EMAILS=admin@beanflows.coffee Dev seeding: - Add dev_seed.py: idempotent upsert of 4 fixed accounts (admin, free, starter, pro) so every access tier is testable after dev_run.sh - dev_run.sh: seed after migrations, show all 4 login shortcuts Regression tests (37 passing): - test_analytics.py: concurrent fetch_analytics calls return correct row counts (cursor thread-safety regression), column names are lowercase - test_roles.py TestAdminAuthFlow: password login routes return 404, admin_required redirects to auth.login, dev-login grants admin role and redirects to admin panel when email is in ADMIN_EMAILS - conftest.py: add mock_analytics fixture (fixes 7 pre-existing dashboard test errors); fix assertion text and lowercase metric param in tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
603 B
Plaintext
35 lines
603 B
Plaintext
# App
|
|
APP_NAME=BeanFlows
|
|
SECRET_KEY=change-me-generate-a-real-secret
|
|
BASE_URL=http://localhost:5001
|
|
DEBUG=true
|
|
ADMIN_EMAILS=admin@beanflows.coffee
|
|
|
|
# Database
|
|
DATABASE_PATH=data/app.db
|
|
DUCKDB_PATH=../local.duckdb
|
|
|
|
# Auth
|
|
MAGIC_LINK_EXPIRY_MINUTES=15
|
|
SESSION_LIFETIME_DAYS=30
|
|
|
|
# Email (Resend)
|
|
RESEND_API_KEY=
|
|
EMAIL_FROM=hello@example.com
|
|
|
|
|
|
# Paddle
|
|
PADDLE_API_KEY=
|
|
PADDLE_WEBHOOK_SECRET=
|
|
PADDLE_PRICE_STARTER=
|
|
PADDLE_PRICE_PRO=
|
|
|
|
|
|
# Rate limiting
|
|
RATE_LIMIT_REQUESTS=100
|
|
RATE_LIMIT_WINDOW=60
|
|
|
|
# Waitlist (set to true to enable waitlist gate on /auth/signup)
|
|
WAITLIST_MODE=false
|
|
RESEND_AUDIENCE_WAITLIST=
|