Notebook Studio
Local Environment

Environment Variables

All environment variables required for local development

Open your .env.local file and fill in each value. A complete reference lives in .env.example at the project root.

# ── Convex ─────────────────────────────────────────────
# Printed by `npx convex dev` (also configured automatically)
NEXT_PUBLIC_CONVEX_URL=
# Site URL used to build owner identifiers and auth URLs
NEXT_PUBLIC_CONVEX_SITE_URL=

# ── Better Auth ────────────────────────────────────────
# Generate with: openssl rand -base64 32
BETTER_AUTH_SECRET=

# ── Google Gemini ──────────────────────────────────────
# Public key used by the client and Convex actions
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=
# Server-side fallback key (optional)
GOOGLE_GENERATIVE_AI_API_KEY=

# ── Stripe ─────────────────────────────────────────────
# Recurring prices are created dynamically from the plan amount.
STRIPE_SECRET_KEY=
# Webhook signing secret for subscription lifecycle events.
STRIPE_WEBHOOK_SECRET=

# ── PayPal ─────────────────────────────────────────────
# Sandbox: https://api-m.sandbox.paypal.com | Production: https://api-m.paypal.com
PAYPAL_API_URL=https://api-m.sandbox.paypal.com
NEXT_PUBLIC_PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
# Webhook id for subscription lifecycle events.
PAYPAL_WEBHOOK_ID=

# ── Razorpay ───────────────────────────────────────────
NEXT_PUBLIC_RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
# Webhook signing secret for subscription lifecycle events.
RAZORPAY_WEBHOOK_SECRET=

# ── Flutterwave ────────────────────────────────────────
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=
FLUTTERWAVE_SECRET_KEY=
# Webhook verif-hash for subscription lifecycle events.
FLUTTERWAVE_SECRET_HASH=

# ── Dodo Payments ──────────────────────────────────────
# test_mode or live_mode (also the UI feature gate).
NEXT_PUBLIC_DODO_ENV=test_mode
# Recurring products/prices are created through the Dodo API.
DODO_PAYMENTS_API_KEY=
# Webhook signing key for subscription lifecycle events.
DODO_PAYMENTS_WEBHOOK_KEY=

# ── Paddle ─────────────────────────────────────────────
# sandbox or production (also the UI feature gate).
NEXT_PUBLIC_PADDLE_ENV=sandbox
# Client-side token used by the Paddle overlay checkout.
NEXT_PUBLIC_PADDLE_CLIENT_TOKEN=
# Recurring prices are created through the Paddle API.
PADDLE_API_KEY=
# Webhook secret for subscription lifecycle events.
PADDLE_WEBHOOK_SECRET=

# ── App ────────────────────────────────────────────────
NEXT_PUBLIC_APP_URL=http://localhost:3000

# ── Docs (optional) ────────────────────────────────────
# Set to "true" to enable the docs site and its header/footer links.
# Disabled (hidden) by default.
NEXT_PUBLIC_SHOW_DOCS=false

# ── Resend (email) ─────────────────────────────────────
RESEND_API_KEY=
RESEND_SENDER_EMAIL=Notebook Studio <noreply@yourdomain.com>

# ── Better Auth Analytics (add only AFTER deploying) ───
# BETTER_AUTH_API_KEY=

The app builds and runs with most of these empty. Convex, Better Auth (BETTER_AUTH_SECRET), and Gemini are required for a full experience. Payment keys are only needed when you test checkout.