Skip to content

feat: migrate video services to Sanity config system (Phase B)#612

Merged
codercatdev merged 1 commit intodevfrom
feat/phase-b-video-config-v3
Mar 5, 2026
Merged

feat: migrate video services to Sanity config system (Phase B)#612
codercatdev merged 1 commit intodevfrom
feat/phase-b-video-config-v3

Conversation

@codercatdev
Copy link
Contributor

Phase B Config Migration — Video Services

Migrates configurable values in video pipeline services from direct process.env reads to getConfigValue() from the Sanity config system. All values use env var fallbacks for backward compatibility.

Changes (3 files, +26/-27)

File Config Values Migrated Secrets (still process.env)
lib/services/remotion.ts awsRegion, serveUrl, functionNameremotion_config AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
lib/services/elevenlabs.ts voiceIdpipeline_config.elevenLabsVoiceId ELEVENLABS_API_KEY
lib/services/gcs.ts bucketName, projectIdgcs_config GCS_CLIENT_EMAIL, GCS_PRIVATE_KEY

Migration Pattern

All values use getConfigValue(table, key, envFallback) — if Sanity config singletons aren't created yet, the env var fallback ensures existing behavior is preserved.

Notable Renames

  • getConfig() in elevenlabs.ts → getElevenLabsConfig() (avoids collision with config module)
  • RemotionConfig interface in remotion.ts → RemotionLambdaConfig (avoids collision with config type)

Not Changed

  • lib/services/pexels.ts — only uses PEXELS_API_KEY (secret), no configurable values to migrate
  • No cron routes or sponsor/distribution files (those belong to @research and @content)

- remotion.ts: awsRegion, serveUrl, functionName → getConfigValue('remotion_config')
- elevenlabs.ts: voiceId → getConfigValue('pipeline_config', 'elevenLabsVoiceId')
- gcs.ts: bucketName, projectId → getConfigValue('gcs_config')
- All use env var fallbacks for migration safety
- Secrets (API keys, AWS credentials) remain as process.env
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
codingcat-dev Ignored Ignored Mar 5, 2026 6:11am

@codercatdev codercatdev merged commit 2e92162 into dev Mar 5, 2026
2 of 3 checks passed
@codercatdev codercatdev deleted the feat/phase-b-video-config-v3 branch March 5, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant