environment-and-config

Documents and manages every environment variable for a Next.js video portal on Vercel.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/MarineTeam/fable-video --skill environment-and-config-marineteam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: environment-and-config
Source: https://github.com/MarineTeam/fable-video/tree/main/.claude/skills/environment-and-config
Command: npx skills add https://github.com/MarineTeam/fable-video --skill environment-and-config-marineteam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? This Skill eliminates guesswork when configuring the Marine Video Portal, a Next.js app where every behavioral switch is an environment variable with no config files or feature flags. It answers which var controls what, what breaks when a var is missing, and how to stand up a working environment from scratch. ## Core Features & Use Cases - Complete env var inventory: A grep-verified table of every variable (Auth0, bunny.net, Upstash Redis, Resend, VAPID, Sentry, geo-whitelists) with exact consuming file/line, required status, secret classification, and unset behavior. - Degraded-mode matrix: Shows exactly what still works when each var group is missing, e.g. admins can still watch videos when Redis is down because approval fails closed. - Setup and add-a-var runbooks: Step-by-step local setup from a fresh clone, Vercel scoping and redeploy rules, and a 7-step checklist for adding a new variable without half-wiring it. - Use Case: You see "Redis client was initialized without url or token" in production. This Skill explains the suffix-resolution logic in lib/redis.js, why Vercel prefixes storage vars when multiple stores are connected, and how to fix it deterministically. ## Quick Start Ask the AI to list every environment variable required to run this project locally and generate a working .env.local from the template.

Frequently Asked Questions about environment-and-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up environment variables for a Next.js app on Vercel?

Copy the provided env.local.template to .env.local, fill in Auth0, ADMIN_EMAILS, Redis, and bunny.net values, then run npm run dev. On Vercel, set each var under Settings → Environment Variables with the correct Production/Preview/Development scope and redeploy, since changes only apply to new deployments.

Why does "Redis client was initialized without url or token" happen on Vercel?

Vercel prefixes storage env vars with the store name when multiple databases are connected, so plain KV_REST_API_URL never appears. The app resolves these by suffix matching, but with two same-kind stores the match is ambiguous; fix it by setting the exact unprefixed names explicitly.

What is the minimum env config to run this Next.js app locally?

For login you need the five Auth0 vars (AUTH0_SECRET, AUTH0_DOMAIN, AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, APP_BASE_URL). Add KV_REST_API_URL, KV_REST_API_TOKEN, and ADMIN_EMAILS for the admin panel; bunny.net credentials are only needed for actual video playback.

Can I put secrets in NEXT_PUBLIC_ environment variables?

No. Anything prefixed NEXT_PUBLIC_ is bundled into client-side JavaScript and world-readable. Only non-secret values like NEXT_PUBLIC_SITE_NAME, NEXT_PUBLIC_SENTRY_DSN, and the VAPID public key use this prefix; secrets like VAPID_PRIVATE_KEY must stay server-only.

Why do Vercel environment variable changes not take effect immediately?

Env var changes in Vercel apply only to new deployments; a running deployment keeps its old values. After adding or editing any variable you must trigger a redeploy of the same commit or push a new one for the change to take effect.

What still works when Redis or bunny.net env vars are missing?

Without Redis, the admin panel fails and viewer approval fails closed, but admins listed in ADMIN_EMAILS can still watch videos. Without bunny.net vars, video features break but auth, approval, and sharing plumbing still work; missing BUNNY_CDN_HOSTNAME only disables thumbnails.