You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer setting up a new deployment, I want a complete .env.example that documents every env var the app actually uses, and I want unused integrations removed, so that configuration is straightforward and the codebase reflects current reality.
The Pexels integration (scripts/fetch-pexels.js, scripts/lib/resolve-pexels.js) is unused and was gated behind PEXELS_API_KEY being set. It should be removed along with the env var.
Acceptance criteria
Happy path
Given this issue is merged When a developer reads .env.example Then every env var the app uses is documented with its purpose, whether it is required or optional, and which feature area it belongs to — and PEXELS_API_KEY is absent
Given this issue is merged When a developer runs grep -r "pexels\|PEXELS" . --include="*.ts" --include="*.js" --include="*.tsx" (excluding node_modules) Then zero results are returned
Edge case
Given a developer has PEXELS_API_KEY in their local .env.local When they run edit-transcript.js after this issue is merged Then no Pexels-related code runs (it has been removed) and no error occurs
Out of scope
Changing any non-Pexels application logic
Adding runtime env var validation beyond what already exists
Secret management tooling
Technical context
Files to DELETE:
scripts/fetch-pexels.js
scripts/lib/resolve-pexels.js
Files to EDIT:
scripts/edit-transcript.js — remove the PEXELS_API_KEY conditional block (~lines 2030–2036) and any import of resolve-pexels.js
package.json — remove the pexels:fetch script entry
.env.example — remove PEXELS_API_KEY; add all new env vars grouped by feature
Remove the conditional block starting at ~line 2030 that checks process.env.PEXELS_API_KEY and imports resolve-pexels.js. Confirm no other Pexels references remain in the file.
3. Edit package.json
Remove the "pexels:fetch" entry from the scripts block.
4. Rewrite .env.example with all current env vars, grouped by feature:
# ── Carousel tool ─────────────────────────────────────────────────────────────
# Required for AI-powered features
ANTHROPIC_API_KEY=
# Optional: defaults to claude-sonnet-4-20250514
# CLAUDE_MODEL=claude-sonnet-4-20250514
# ── Subscriber email gate ──────────────────────────────────────────────────────
# Required: Resend API credentials for subscriber enrolment and welcome emails
RESEND_API_KEY=
[email protected]
RESEND_SEGMENT_ID=
# Comma-separated topic IDs to subscribe new contacts to
RESEND_TOPICS=
# Min 32 characters — signs the subscriber session cookie
SUBSCRIBER_COOKIE_SECRET=
# ── Internal API guard (local/internal deployment only) ───────────────────────
# Required on internal instances: Bearer token for editor and camera save routes
INTERNAL_API_SECRET=
Additional test scenarios
grep -r "pexels\|PEXELS" scripts/ app/ remotion/ — zero results after merge
npm run dev starts without errors after removing PEXELS_API_KEY from local .env.local
package.json scripts block no longer contains pexels:fetch
Hard constraints
.env.example must never contain real secret values — only placeholder strings or comments
Variable names must exactly match what the code references (case-sensitive)
No other scripts/ or app/ behaviour should change beyond the Pexels removal
User story
As a developer setting up a new deployment, I want a complete .env.example that documents every env var the app actually uses, and I want unused integrations removed, so that configuration is straightforward and the codebase reflects current reality.
Background
Two problems:
.env.examplecurrently only documentsPEXELS_API_KEY, but several env vars added by Issues feat(auth): add modular Resend subscriber email gate for carousel and get-youtube-captions #77 and feat(api): add secret token guard to internal filesystem-writing API routes #79 (RESEND_API_KEY, SUBSCRIBER_COOKIE_SECRET, etc.) need to be documented.scripts/fetch-pexels.js,scripts/lib/resolve-pexels.js) is unused and was gated behindPEXELS_API_KEYbeing set. It should be removed along with the env var.Acceptance criteria
Happy path
Given this issue is merged
When a developer reads
.env.exampleThen every env var the app uses is documented with its purpose, whether it is required or optional, and which feature area it belongs to — and PEXELS_API_KEY is absent
Given this issue is merged
When a developer runs
grep -r "pexels\|PEXELS" . --include="*.ts" --include="*.js" --include="*.tsx"(excluding node_modules)Then zero results are returned
Edge case
Given a developer has
PEXELS_API_KEYin their local.env.localWhen they run
edit-transcript.jsafter this issue is mergedThen no Pexels-related code runs (it has been removed) and no error occurs
Out of scope
Technical context
Files to DELETE:
scripts/fetch-pexels.jsscripts/lib/resolve-pexels.jsFiles to EDIT:
scripts/edit-transcript.js— remove the PEXELS_API_KEY conditional block (~lines 2030–2036) and any import of resolve-pexels.jspackage.json— remove thepexels:fetchscript entry.env.example— remove PEXELS_API_KEY; add all new env vars grouped by featureImplementation details
1. Delete Pexels files
2. Edit scripts/edit-transcript.js
Remove the conditional block starting at ~line 2030 that checks
process.env.PEXELS_API_KEYand importsresolve-pexels.js. Confirm no other Pexels references remain in the file.3. Edit package.json
Remove the
"pexels:fetch"entry from the scripts block.4. Rewrite .env.example with all current env vars, grouped by feature:
Additional test scenarios
grep -r "pexels\|PEXELS" scripts/ app/ remotion/— zero results after mergenpm run devstarts without errors after removing PEXELS_API_KEY from local .env.localpackage.jsonscripts block no longer containspexels:fetchHard constraints
.env.examplemust never contain real secret values — only placeholder strings or commentsDependency issues