Files
Tomas DvorakandDevin f2f7439050 refactor(db): replace sqlc with handwritten pgx repos
- Finish Paddle-to-Stripe billing migration; drop paddle/stripe libs
- Renumber migrations; add 00012 memberships+manage_token,
  00013 location_type_capacity
- Add tests: admin, auth, bookings customer service
- Remove graphify-out artifacts and stale env files

Authored By: TDvorak <[email protected]>

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-17 20:21:34 +02:00

114 lines
4.3 KiB
Bash

# ============================================
# Bookra Backend API Configuration
# ============================================
# Active stack:
# - frontend signs users in with Neon Auth
# - backend verifies Neon Auth JWTs
# - backend serves booking + billing APIs
# - Stripe handles SaaS billing + customer portal
# ============================================
BOOKRA_APP_ENV=staging
BOOKRA_API_PORT=8080
BOOKRA_API_URL=http://localhost:8080
BOOKRA_FRONTEND_URL=http://localhost:3000
# --------------------------------------------
# DEMO MODE (Standalone showcase mode)
# --------------------------------------------
# Set to true to enable permanent demo mode with in-memory data.
# When enabled:
# - API uses MemoryRepository with pre-populated demo data
# - All requests are auto-authenticated as demo-owner
# - No database connection required
# - Perfect for showcasing the app without external dependencies
# Note: When DEMO_MODE=false, the following are required:
# - BOOKRA_DATABASE_URL
# - BOOKRA_NEON_AUTH_URL (for JWT verification)
BOOKRA_DEMO_MODE=false
# --------------------------------------------
# DATABASE (Required when DEMO_MODE=false)
# --------------------------------------------
BOOKRA_DATABASE_URL=postgres://user:[email protected]/bookra_backend?sslmode=require
BOOKRA_DATABASE_DIRECT_URL=postgres://user:[email protected]/bookra_backend?sslmode=require
# --------------------------------------------
# AUTHENTICATION (Required when DEMO_MODE=false)
# --------------------------------------------
# Neon Auth base URL for JWKS verification.
BOOKRA_NEON_AUTH_URL=https://ep-example.neonauth.region.aws.neon.tech/neondb/auth
# Local JWT fallback secret for the password-auth endpoints (/v1/auth/*).
# Required when DEMO_MODE=false if you use local auth.
BOOKRA_AUTH_JWT_SECRET=
# --------------------------------------------
# INTERNAL SERVICES
# --------------------------------------------
# Job runner key for internal API endpoints (reminders, notifications)
BOOKRA_JOB_RUNNER_KEY=replace-with-secure-random-key
# --------------------------------------------
# STRIPE BILLING (Required for live checkout/webhooks)
# --------------------------------------------
# Secret API key + webhook signing secret from the Stripe dashboard.
# Price IDs: Stripe dashboard -> Product catalog -> Price IDs.
BOOKRA_STRIPE_API_KEY=sk_test_xxx
BOOKRA_STRIPE_WEBHOOK_SECRET=whsec_xxx
# Monthly subscription price IDs
BOOKRA_STRIPE_STARTER_CZK_MONTHLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_STARTER_USD_MONTHLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_PRO_CZK_MONTHLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_PRO_USD_MONTHLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_BUSINESS_CZK_MONTHLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_BUSINESS_USD_MONTHLY_PRICE_ID=price_xxx
# Yearly subscription price IDs
BOOKRA_STRIPE_STARTER_CZK_YEARLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_STARTER_USD_YEARLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_PRO_CZK_YEARLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_PRO_USD_YEARLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_BUSINESS_CZK_YEARLY_PRICE_ID=price_xxx
BOOKRA_STRIPE_BUSINESS_USD_YEARLY_PRICE_ID=price_xxx
# SMS usage prices (standard prices — usage is aggregated monthly into invoices)
BOOKRA_STRIPE_SMS_CZK_PRICE_ID=price_xxx
BOOKRA_STRIPE_SMS_USD_PRICE_ID=price_xxx
BOOKRA_STRIPE_SMS_EUR_PRICE_ID=
BOOKRA_STRIPE_SMS_GBP_PRICE_ID=
BOOKRA_STRIPE_SMS_PLN_PRICE_ID=
# --------------------------------------------
# EMAIL (Optional)
# --------------------------------------------
# Only configure if backend needs to send reminder emails directly.
BOOKRA_EMAIL_FROM=
BOOKRA_SMTP_HOST=
BOOKRA_SMTP_PORT=587
BOOKRA_SMTP_USERNAME=
BOOKRA_SMTP_PASSWORD=
# --------------------------------------------
# SMS Manager.cz (Optional — SMS add-on)
# --------------------------------------------
BOOKRA_SMSMANAGER_API_KEY=
BOOKRA_SMSMANAGER_BASE_URL=https://api.smsmngr.com/v2
# --------------------------------------------
# ANALYTICS (Optional)
# --------------------------------------------
BOOKRA_UMAMI_API_URL=
BOOKRA_UMAMI_API_KEY=
# --------------------------------------------
# MONITORING (Optional)
# --------------------------------------------
BOOKRA_SENTRY_DSN=
# --------------------------------------------
# ADMIN (Optional — platform admin API)
# --------------------------------------------
BOOKRA_ADMIN_EMAIL=
BOOKRA_ADMIN_KEY=