Welcome to the Jose Madrid Salsa developer docs — explore features, APIs, and deployment guides.
Jose Madrid SalsaJMS Docs

Environment Setup

Configure your environment variables for José Madrid Salsa

Environment Setup

This guide covers all environment variables required to run the José Madrid Salsa platform in development and production.

Quick Start

  1. Copy .env.example to .env.local
  2. Generate MASTER_KEY: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
  3. Fill in required values
  4. Run migrations: npm run db:migrate
  5. Seed permissions: npm run db:seed

Core Configuration

Database

DATABASE_URL="postgres://..."           # PostgreSQL connection string
PRISMA_DATABASE_URL="prisma+postgres://..." # Prisma Accelerate URL (optional)

Authentication

NEXTAUTH_URL="http://localhost:3000"    # App URL (change for production)
NEXTAUTH_SECRET="your-secret-key-here"  # Strong random string (32+ chars)
NEXTAUTH_COOKIE_DOMAIN=".josemadrid.net" # (Optional) Share session cookies across apex + subdomains

Encryption (Admin Panel)

MASTER_KEY="your-master-encryption-key" # AES-256 master key (64 hex chars)

Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Payment Processing

Stripe

STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."

Email Service

Resend

RESEND_API_KEY="re_..."
FROM_EMAIL="orders@josemadridsalsa.com"
RESEND_WEBHOOK_SECRET="whsec_..."
CRON_SECRET="bearer-token-for-cron-jobs"
UNSUBSCRIBE_SECRET="secret-for-unsubscribe-tokens"

Customer Experience & Marketing

Public Site Contact + Reviews

NEXT_PUBLIC_SUPPORT_EMAIL="mike@josemadrid.net"                 # Footer contact email
NEXT_PUBLIC_SUPPORT_PHONE="(740) 521-4304"                      # Footer phone number
NEXT_PUBLIC_HQ_LOCATION="601 Putnam Ave, Zanesville, OH 43701"  # Displayed in footer
NEXT_PUBLIC_GOOGLE_BUSINESS_URL="https://g.page/..."            # Review link
GOOGLE_REVIEW_URL="https://g.page/..."                          # Optional override

Social Media

NEXT_PUBLIC_FACEBOOK_HANDLE="@JoseMadridSalsa"
NEXT_PUBLIC_INSTAGRAM_HANDLE="@JoseMadridSalsa"
NEXT_PUBLIC_TWITTER_HANDLE="@JoseMadridSalsa"
NEXT_PUBLIC_TIKTOK_HANDLE="@JoseMadridSalsa"
NEXT_PUBLIC_GMB_SHORTNAME="Jose Madrid Salsa"

Merchandise Fulfillment

NEXT_PUBLIC_FULFILLMENT_PARTNER="SpiceLine Fulfillment"         # Partner name
NEXT_PUBLIC_FULFILLMENT_EMAIL="partner-support@domain.com"      # Partner email
NEXT_PUBLIC_FULFILLMENT_PORTAL_URL="https://portal.partner.com" # Partner portal

File Upload

UploadThing

UPLOADTHING_SECRET="sk_..."
UPLOADTHING_APP_ID="..."

Development vs Production

For development, copy .env.example to .env.local and fill in the values.

For production, set these in your hosting platform:

vercel env add MASTER_KEY
vercel env add NEXTAUTH_SECRET
# ... add all other variables

Security Notes

  1. NEVER commit .env files to version control
  2. Rotate secrets regularly (especially NEXTAUTH_SECRET and MASTER_KEY)
  3. Use different keys for development, staging, and production
  4. Store production secrets in Vercel environment variables
  5. OAuth tokens are stored encrypted in the database using MASTER_KEY

Testing Environment Variables

Required for running tests:

DATABASE_URL="postgresql://..."  # Test database
MASTER_KEY="test-key-32-chars-hex"
NEXTAUTH_SECRET="test-secret"

Validation

Run this script to verify all required environment variables are set:

npm run verify-env

How is this guide?

Edit on GitHub

Last updated on

On this page