Youth events need a name and date of birth for every attendee, and a parent/guardian's details for under-18s. Parents get an email and WhatsApp link to a consent page that records the signed name, time, IP, device and exact consent text; medical and emergency details are stored encrypted. Tickets are issued but check-in is blocked until consent is given (supervisor override audited). A daily job sends reminders and purges medical details after the retention period. Adds a supervisor consent tracker, consent status and medical list reports, and clears consent data when an account is anonymised. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
75 lines
5.0 KiB
Bash
75 lines
5.0 KiB
Bash
# ─── Database ────────────────────────────────────────────────────────────────
|
|
DATABASE_URL="postgresql://username:password@localhost:5432/hope_events"
|
|
|
|
# ─── Auth ─────────────────────────────────────────────────────────────────────
|
|
JWT_SECRET=your_jwt_secret_here_minimum_32_characters
|
|
|
|
# Two-factor authentication is required for admins and supervisors whenever
|
|
# email (SMTP) or WhatsApp can deliver a code. Set to false only as an emergency
|
|
# switch, e.g. if the mail server is down and admins are locked out.
|
|
# TWO_FACTOR_REQUIRED_ROLES=true
|
|
|
|
# ─── Server ───────────────────────────────────────────────────────────────────
|
|
PORT=5000
|
|
NODE_ENV=development
|
|
|
|
# Set this if the app runs behind a reverse proxy (e.g. nginx on a separate
|
|
# server) so rate limiting reads the real client IP instead of the proxy's.
|
|
# Accepts a hop count ("1"), "true"/"false", or comma-separated IP(s)/CIDR(s)
|
|
# of your trusted proxy (e.g. "10.0.0.5" or "10.0.0.0/8"). Leave unset if the
|
|
# app is not behind a proxy.
|
|
# TRUST_PROXY=1
|
|
|
|
# ─── CORS ─────────────────────────────────────────────────────────────────────
|
|
# Comma-separated list of allowed frontend origins
|
|
FRONTEND_URL=http://localhost:3000
|
|
|
|
# ─── Email (SMTP) — optional fallbacks ───────────────────────────────────────
|
|
# Preferred: configure SMTP via Admin → Site Settings (stored AES-256 encrypted).
|
|
# These env vars are used as fallbacks if no SMTP settings are saved in the DB.
|
|
# EMAIL_HOST=smtp.example.com
|
|
# EMAIL_PORT=587
|
|
# EMAIL_USER=your_email@example.com
|
|
# EMAIL_PASS=your_email_password
|
|
# EMAIL_FROM=no-reply@example.com
|
|
|
|
# ─── Payments (Yoco) ──────────────────────────────────────────────────────────
|
|
YOCO_SECRET_KEY=your_yoco_secret_key
|
|
YOCO_WEBHOOK_SECRET=your_yoco_webhook_secret
|
|
|
|
# ─── Public URLs ──────────────────────────────────────────────────────────────
|
|
# Used to build links in emails (password reset, activation, etc.)
|
|
APP_BASE_URL=https://your-frontend-domain.com
|
|
# Used to serve ticket PDFs to WhatsApp (must be publicly reachable)
|
|
BACKEND_URL=https://your-backend-domain.com
|
|
|
|
# ─── WhatsApp (WAWP) — optional, preferred stored via Admin → Site Settings ───
|
|
# These are env-var fallbacks. Use the admin panel to manage them at runtime.
|
|
WAWP_ACCESS_TOKEN=your_wawp_access_token
|
|
WAWP_INSTANCE_ID=your_wawp_instance_id
|
|
|
|
# ─── Background workers ───────────────────────────────────────────────────────
|
|
DAILY_SUMMARY_ENABLED=true
|
|
SCHEDULED_EMAILS_ENABLED=true
|
|
SCHEDULED_EMAILS_INTERVAL_MS=30000
|
|
# Daily 09:00 parental-consent job: reminders, and deleting medical details after events
|
|
CONSENT_JOBS_ENABLED=true
|
|
# Nightly database backup at 02:00 (requires the `pg_dump` binary on this host).
|
|
# Retention count is set via Admin → Site Settings → Backups (default 14).
|
|
BACKUP_ENABLED=true
|
|
|
|
# ─── Error monitoring (Sentry) — optional ─────────────────────────────────────
|
|
# Leave unset to disable entirely (a no-op, not an error). Set NEXT_PUBLIC_SENTRY_DSN
|
|
# in frontend/.env too if you want frontend errors captured.
|
|
# SENTRY_DSN=https://xxxxx@oxxxxxx.ingest.sentry.io/xxxxx
|
|
|
|
# ─── Note ─────────────────────────────────────────────────────────────────────
|
|
# The following are managed via Admin → Site Settings and stored in the database:
|
|
# - Organisation name, tagline, contact details, branding colour, logo
|
|
# - Registration notification emails
|
|
# - SMTP settings (username and password stored AES-256-GCM encrypted, key
|
|
# derived from JWT_SECRET — do not change JWT_SECRET after saving SMTP creds)
|
|
# - Legal page content (operator name, Information Officer, website URL, etc.)
|
|
# The first-time setup wizard handles initial configuration on fresh deployments.
|
|
# You no longer need ORG_NAME, ORG_TAGLINE, EMAIL_HEADER_COLOR, REGISTRATIONS_EMAIL,
|
|
# or SMTP vars in this file (they still work as fallbacks if the DB entry is absent). |