Configure and manage OpenEvidence integrations across development, staging, and production environments with proper isolation, secret management, and promotion strategies.
| Environment | API Endpoint | Purpose | Data |
|---|---|---|---|
| Development | sandbox.openevidence.com | Local development | Synthetic |
| Staging | sandbox.openevidence.com | Integration testing | Synthetic |
| Production | api.openevidence.com | Live clinical use | Real (PHI) |
Define per-environment settings for baseUrl, timeout, retries, rate limiting, cache TTL, logging level, and feature flags (deepConsult, webhooks, auditLogging).
Create a config loader that selects the right environment config based on NODE_ENV, with env var overrides for apiKey, orgId, baseUrl, and timeout.
Implement OpenEvidenceClientFactory with per-environment singleton instances and test injection support.
Use .env for development, GCP Secret Manager for staging/production. Define secret paths per environment with separate projects.
Build GitHub Actions workflow for staging-to-production promotion with version validation, smoke tests, and gradual traffic shifting (10% -> 50% -> 100%).
Create environment-aware health check that validates OpenEvidence connectivity, cache status, and database health.
| Environment Issue | Detection | Resolution |
|---|---|---|
| Wrong API endpoint | Health check fails | Verify baseUrl in config |
| Secret not found | Startup failure | Check Secret Manager permissions |
| Config mismatch | Unexpected behavior | Validate config loading |
| Promotion failure | CI/CD error | Check version tagging |
See detailed implementation for advanced patterns.