.env (client-side) and .dev.vars (server-side) for local development.
Client-side variables
Client-side variables use theVITE_ prefix and are bundled into the frontend. Only include non-sensitive values.
Sanity CMS
Your Sanity project ID. Find this in your Sanity project settings.Example:
usl8dp6jThe Sanity dataset to use (typically
production or development).Default: productionBrand kit
Public URL for the brand kit CTA button. Should point to Phil’s scheduler (Calendly, Zoom, etc.).Example:
https://calendly.com/phil-howard/meetingServer-side variables
Server-side variables are stored in.dev.vars for local development and configured via Cloudflare Dashboard or wrangler secret for production.
AI providers
Google Gemini API key for primary agentic AI operations.Get your key: https://aistudio.google.com/apikeyUsed for: PRF generation, metadata extraction, visual suggestions, fact-checking
Anthropic Claude API key as fallback when Google key is not set.Format:
sk-ant-...OpenRouter API key for embedding generation.Format:
sk-or-...Used for: Vector embeddings for Pinecone RAGImage generation
Kie.ai API key for image generation using Nano Banana Pro.Get your key: Contact Kie.ai supportUsed for: Infographics, quote cards, career timelines, YouTube thumbnails
LinkedIn scraping
RapidAPI key for LinkedIn profile scraping.Get your key: https://rapidapi.comUsed for: Guest career history extraction, profile data caching
Knowledge base
Pinecone API key for vector database operations.Used for: Brand guidelines, infographic design database, writing guidelines
Full Pinecone index URL including region.Format:
https://your-index-name.svc.region.pinecone.ioSanity CMS
Sanity API token with editor permissions for write access.Permissions: Editor role requiredSecurity: Never expose this client-side. Keep server-side only.
Authentication
Secret key for JWT token signing. Must be at least 32 characters.Generate with:Production setup:
Email (password reset)
Resend API key for sending password reset emails.Format:
re_...Get your key: https://resend.com/api-keysVerified sender email address for password reset emails.Format:
Pulse Studio <[email protected]>Note: Must be verified in your Resend accountBase URL for the application, used in password reset links.Local:
http://localhost:5173Production: https://production.youvebeenheard.comYBH sales platform integration
URL for YBH Sales Platform API for guest auto-sync.Example:
https://api.youvebeenheard.comOptional but recommendedAPI key for authenticating with YBH Sales Platform.Must match:
WEBHOOK_API_KEY or one of KANBAN_API_KEYS in ybh-sales-platformOptional dedicated key to protect
/api/ybh/backfill-guests endpoint.Fallback: Uses YBH_SALES_API_KEY if not setSocial scheduling
Late API key for social media scheduling.Used for: LinkedIn, Twitter, Instagram post scheduling
Bot access
API key for server-to-server bot authentication.Usage: Include in header
X-Pulse-Bot-Api-Key when calling /api/late/* endpointsOptional: Only needed for automated botsMedia processing
AssemblyAI API key for video transcription.Get your key: https://www.assemblyai.com/dashboardUsed for:
/api/media/transcribe endpoint for video-to-text conversionBase64-encoded JSON of Google Cloud service account key for Drive access.Get your key: https://console.cloud.google.com/iam-admin/serviceaccountsUsed for: Pulling transcripts from shared Google Drive folderSetup:
Environment setup
Local development
Production deployment
Set client-side variables
Configure in Cloudflare Pages project settings under Environment Variables:
VITE_SANITY_PROJECT_IDVITE_SANITY_DATASETVITE_BRANDKIT_CTA_URL
Set non-secret environment variables
Configure in Cloudflare Pages project settings:
PINECONE_HOSTRESEND_FROM_EMAILAPP_BASE_URLYBH_SALES_API_URL(optional)YBH_SALES_API_KEY(optional)
Session tokens expire after 24 hours. All team members must sign in with
@popularit.net email addresses.Variable reference by feature
Content generation
GOOGLE_GENERATIVE_AI_API_KEY- Primary AI providerANTHROPIC_API_KEY- Fallback AI providerOPENROUTER_API_KEY- Embeddings for RAGPINECONE_API_KEY- Knowledge basePINECONE_HOST- Vector database connection
Image generation
KIEAI_API_KEY- Kie.ai Nano Banana Pro
Guest data
RAPIDAPI_KEY- LinkedIn profile scrapingSANITY_API_TOKEN- Guest profile storage
Authentication & security
JWT_SECRET- Session token signingRESEND_API_KEY- Password reset emailsRESEND_FROM_EMAIL- Email sender identityAPP_BASE_URL- Reset link generation
Integrations
YBH_SALES_API_URL- Sales platform syncYBH_SALES_API_KEY- Sales platform authLATE_API_KEY- Social media schedulingGOOGLE_DRIVE_SA_KEY- Transcript retrievalASSEMBLYAI_API_KEY- Video transcription
Security best practices
- Use different API keys for development and production environments
- Rotate JWT secrets periodically
- Store production secrets only in Cloudflare Dashboard or via
wrangler secret - Never expose
SANITY_API_TOKENclient-side - Use verified sender identities for
RESEND_FROM_EMAIL - Keep
YBH_SALES_API_KEYvalues in sync between platforms