Environment Variables
Complete list of environment variables required for each application in BISO Sites.
Environment Variables
This guide lists all required environment variables for each application.
Variables per app
# Appwrite Configuration NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_project_id NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1 APPWRITE_API_KEY=your_server_api_key # Vipps Payment VIPPS_CLIENT_ID=your_client_id VIPPS_CLIENT_SECRET=your_client_secret VIPPS_SUBSCRIPTION_KEY=your_subscription_key VIPPS_MERCHANT_SERIAL_NUMBER=your_merchant_serial VIPPS_SYSTEM_NAME=BISO-Sites VIPPS_SYSTEM_VERSION=1.0.0 # Application NEXT_PUBLIC_BASE_URL=http://localhost:3000 NEXT_PUBLIC_APPWRITE_DATABASE_ID=your_database_id # Optional: AI Features OPENAI_API_KEY=your_openai_key
⚠️
Security
Never commit .env.local files to version control. Use .env.example as a template.
Verify your setup
Copy the templates
Run cp apps/web/.env.example apps/web/.env.local (and similar for admin) so you never edit the example files directly.
Start the dev servers
Run bun run dev --filter=web and check the terminal. Missing environment variables are logged immediately.
Trigger a real request
Visit an authenticated route or make a payment test call—Appwrite or Vipps errors will confirm whether secrets are valid.
Obtaining Credentials
Appwrite
- Sign up at cloud.appwrite.io or self-host
- Create a project
- Get Project ID from project settings
- Create API key with required scopes
Vipps
- Register at Vipps Developer Portal
- Create merchant account
- Obtain API credentials from portal
Production Setup
Use your hosting provider's environment variable settings:
- Vercel: Project Settings → Environment Variables
- Netlify: Site Settings → Build & Deploy → Environment
- Docker: Use
.envfile or docker-compose environment
Storage recommendations
- Local development:
.env.localfiles kept out of Git—share updates through 1Password or another secure vault. - Secrets management: Mirror production values in a shared vault and note who has access to Appwrite, Vipps, and hosting consoles.
- Rotation checklist: Update this page and the vault whenever keys rotate so the next maintainer can trace changes.
