Environment Variables
Bloomberry requires a set of environment variables to connect to external services. These are split between the Next.js frontend (dashboard) and the Node.js backend.
Never commit secrets
Never commit
.env files to version control. Use .env.local for local development (it is gitignored by default in Next.js projects).Frontend — dashboard/.env.local
Backend — backend/.env
Variable reference
| Variable | Service | Required | Notes |
|---|---|---|---|
NEXT_PUBLIC_BACKEND_URL | Internal | Yes | Backend API URL; http://localhost:3001 for local dev |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Clerk | Yes | Safe to expose; starts with pk_ |
CLERK_SECRET_KEY | Clerk | Yes | Keep secret; starts with sk_ |
GEMINI_API_KEY | Google AI | Yes | Primary generation model |
OPENAI_API_KEY | OpenAI | Optional | Fallback model; used if Gemini fails |
SUPABASE_URL | Supabase | Yes | Project URL from Supabase dashboard |
SUPABASE_SERVICE_KEY | Supabase | Yes | Service role key — bypasses RLS; backend only |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase | Yes | Anon key — respects RLS; safe to expose |
STRIPE_SECRET_KEY | Stripe | Yes for billing | Backend only; starts with sk_ |
STRIPE_WEBHOOK_SECRET | Stripe | Yes for billing | From Stripe CLI or webhook endpoint dashboard |
TWITTER_CLIENT_ID | X (Twitter) | Yes for X | From developer.twitter.com |
LINKEDIN_CLIENT_ID | Yes for LinkedIn | From LinkedIn developer portal |
Production environment
For production deployment (Vercel, Railway, or similar):
- Add all frontend variables to your Vercel project environment variables
- Add all backend variables to your backend service (Railway, Render, etc.)
- Update all callback URLs to your production domain
- Use production keys (not test keys) for Stripe, Clerk, and OAuth apps
- Ensure
NEXT_PUBLIC_BACKEND_URLpoints to your deployed backend
Stripe webhooks in production
In production, register your webhook endpoint at
https://your-domain.com/api/billing/webhook in the Stripe dashboard and copy the generated STRIPE_WEBHOOK_SECRET.