edtech / .env.example
CognxSafeTrack
feat: admin auth login, real WhatsApp Cloud API, Cloudflare R2 storage
0349430
# Environment Variables β€” EdTech
# Copy this file to .env and fill in the values.
# NEVER commit the real .env file to git.
# ─── API Auth ──────────────────────────────────────────────────────────────────
ADMIN_API_KEY= # Strong random secret, e.g. openssl rand -hex 32
# ─── WhatsApp / Meta ───────────────────────────────────────────────────────────
WHATSAPP_VERIFY_TOKEN= # Token you set in the Meta App dashboard
WHATSAPP_APP_SECRET= # App Secret from Meta App Settings > Basic
WHATSAPP_ACCESS_TOKEN= # Permanent System User token from Meta Business
WHATSAPP_PHONE_NUMBER_ID= # Phone Number ID from Meta App > WhatsApp > Getting Started
# ─── Database ──────────────────────────────────────────────────────────────────
DATABASE_URL=postgresql://user:password@localhost:5432/edtech?schema=public
# ─── Redis ─────────────────────────────────────────────────────────────────────
REDIS_URL= # e.g. redis://default:password@host:6379
# Or individual connection params (if REDIS_URL is not set):
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_USERNAME=default
# REDIS_PASSWORD=
# REDIS_TLS=false
# ─── Stripe ────────────────────────────────────────────────────────────────────
STRIPE_SECRET_KEY= # sk_live_... (or sk_test_... for dev)
STRIPE_WEBHOOK_SECRET= # whsec_... from Stripe dashboard > Webhooks
# ─── OpenAI / AI ───────────────────────────────────────────────────────────────
OPENAI_API_KEY= # sk-...
# ─── Cloudflare R2 Storage ────────────────────────────────────────────────────
R2_ACCOUNT_ID= # Cloudflare Account ID
R2_ACCESS_KEY_ID= # R2 API token Access Key ID
R2_SECRET_ACCESS_KEY= # R2 API token Secret Access Key
R2_BUCKET= # R2 bucket name (e.g. edtech-docs)
R2_PUBLIC_URL= # Public URL of the bucket (e.g. https://pub-xxx.r2.dev)
# ─── Frontend ──────────────────────────────────────────────────────────────────
VITE_CLIENT_URL=https://your-frontend.netlify.app
VITE_WHATSAPP_NUMBER=221771234567 # Without + prefix, for wa.me links
# ─── Internal (Worker β†’ API) ───────────────────────────────────────────────────
API_URL=http://localhost:3001 # In prod: full URL of the Fastify API