Environment Variables

Comprehensive reference for all configuration options across the VeriWorkly ecosystem.

Environment Variables

VeriWorkly utilizes environment variables for secure, flexible configuration across its multiple services. This guide provides a detailed breakdown of all available configuration keys.


Frontend and Shared Configuration

These variables should be defined in the root .env file for local development.

VariableRequiredDescriptionExample / Default
SITE_URLYesThe primary public URL of the application.https://veriworkly.com
NEXT_PUBLIC_BACKEND_URLYesThe public API endpoint utilized by the browser.http://localhost:8080/api/v1
BACKEND_INTERNAL_URLNoInternal API address utilized by the frontend for Server-Side Rendering (SSR).http://api:8080/api/v1
ADMIN_EMAILYesPrimary administrator email for system notifications.[email protected]
AUTH_SECRETYesSecurity secret for session encryption (must match backend).secure-random-string

Server and API Configuration

These variables are specific to the backend service and should be placed in apps/server/.env.

Core Runtime

VariableDescriptionDefault
NODE_ENVOperational environment (development or production).development
PORTPort the API server listens on.8080
TRUST_PROXYSet to true when operating behind a reverse proxy.true
ALLOWED_ORIGINSComma-separated list of permitted CORS origins.http://localhost:3000

Database and Persistence

VariableRequiredDescriptionExample
DATABASE_URLYesPostgreSQL connection string.postgresql://user:pass@host:5432/db
REDIS_URLNoConnection string for rate limiting and API caching.redis://localhost:6379
REDIS_HOSTNoRedis hostname (if URL is not utilized).localhost
REDIS_PORTNoRedis port (if URL is not utilized).6379

Authentication (Better-Auth)

VariableDescriptionDefault / Example
AUTH_SECRETSecurity secret (must match frontend).
AUTH_BASE_URLThe base URL of the API for authentication callbacks.http://localhost:8080
AUTH_SESSION_TTL_SECONDSMaximum session duration (seconds).2592000 (30 days)
AUTH_OTP_TTL_SECONDSValidity duration for Email OTP tokens (seconds).600 (10 minutes)
AUTH_OTP_ALLOWED_ATTEMPTSMaximum permitted failed verification attempts.3

API Key Security

VariableDescriptionDefault / Example
API_KEY_HASH_SECRETSecret used to hash API keys before storage.strong-random-secret
API_KEY_AUTH_CACHE_TTL_SECONDSRedis cache TTL for successful auth lookups.300
API_KEY_LAST_USED_TOUCH_INTERVAL_SECONDSMinimum interval between lastUsed DB updates for a given key.300
API_KEY_DEFAULT_RATE_LIMITDefault per-key limit if none is provided at creation.20
API_KEY_DEFAULT_SCOPESComma-separated default scopes for new keys.user:read
API_KEY_DEFAULT_LIFETIME_DAYSDefault key lifetime when no expiry is supplied.365

Email Infrastructure

VariableDescriptionExample
AUTH_EMAIL_FROMDispatcher email address and display name.VeriWorkly <[email protected]>
AUTH_EMAIL_PROVIDEREmail driver selection (smtp, resend, etc.).smtp
AUTH_SMTP_HOSTSMTP server address.smtp.resend.com
AUTH_SMTP_PORTSMTP server port.587
AUTH_SMTP_USER / PASSSMTP authentication credentials.


Optional Service Integrations

GitHub Roadmap Sync

VariableDescriptionDefault
GITHUB_SYNC_ENABLEDEnables automated synchronization with GitHub.false
GITHUB_TOKENPersonal Access Token with repository scope.
GITHUB_OWNER / REPOTarget repository for synchronization.
GITHUB_SYNC_CRONCron schedule for the synchronization task.0 0,12 * * *

On this page

Edit on GitHub