Skip to content

Environment Variables

api.myeasyguide.com

Database

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgresql://user:pass@localhost:5432/walkthroughnepal

Authentication

VariableDescriptionExample
JWT_SECRETJWT signing secret for users/suppliersyour-secret-key
JWT_SECRET_ADMINJWT signing secret for adminsyour-admin-secret
COOKIE_AGEAuth cookie max age in ms604800000 (7 days)
COOKIE_DOMAINCookie domain.myeasyguide.com
JWT_EXPIRYJWT token expiry in ms604800000

URLs

VariableDescriptionExample
BASE_URLAPI base URLhttp://localhost:3000/api/v1
FRONTEND_BASE_URLFrontend base URLhttp://localhost:3001
UPLOADS_BASE_URLUploaded files URLhttp://localhost:3000/api/v1
VERIFICATION_LINKEmail verification linkhttp://localhost:3000/verify
RESET_LINKPassword reset linkhttp://localhost:3000/reset

Email (Resend)

VariableDescriptionExample
RESEND_API_KEYResend API keyre_xxxxxxxx
VERIFICATION_TOKENEmail verification token secretyour-token
EMAIL_UNSUB_SECRETUnsubscribe secretyour-secret

Stripe

VariableDescriptionExample
STRIPE_SECRET_KEYStripe secret keysk_test_... or sk_live_...
STRIPE_PUB_KEYStripe publishable keypk_test_... or pk_live_...
STRIPE_WHSEC_KEYStripe webhook signing secretwhsec_...

Cloudflare Images

VariableDescriptionExample
CF_ACCOUNT_IDCloudflare account ID
CF_API_TOKENCloudflare API token
CF_ACCOUNT_HASHCloudflare account hash
IMAGE_BASE_URLCloudflare Images delivery URLhttps://imagedelivery.net/{hash}

Typesense (Currently Disabled)

VariableDescriptionExample
TYPESENSE_HOSTTypesense server hostlocalhost
TYPESENSE_PORTTypesense server port8108
TYPESENSE_PROTOCOLTypesense protocolhttp
TYPESENSE_API_KEYTypesense API key

Claude AI

VariableDescriptionExample
CLAUDE_API_KEYAnthropic Claude API keysk-ant-...
CLAUDE_MODELClaude model nameclaude-opus-4-7

Recombee (Recommendations)

VariableDescriptionExample
RECOMBEE_DBRecombee database ID
RECOMBEE_API_TOKENRecombee API token

General

VariableDescriptionExample
NODE_ENVEnvironmentdevelopment, production

cms-myeasyguide

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgresql://user:pass@localhost:5432/cms_myeasyguide
ANTHROPIC_API_KEYClaude API key for AI generationsk-ant-...
JWT_SECRETJWT signing secret for CMS authchange-me-to-a-random-secret-in-production

myeasyguide.com

VariableDescriptionExample
NEXT_PUBLIC_API_BASE_URLExpress API URLhttp://localhost:3000/api/v1
NEXT_PUBLIC_POST_URLCMS URLhttps://cms.myeasyguide.com

Note: NEXT_PUBLIC_* variables are public (exposed to the browser). Never put secrets here.

Environment Setup Checklist

New Developer Setup

bash
# 1. API
cd api.myeasyguide.com
cp .env.example .env
# Edit .env with your database credentials and API keys

# 2. CMS
cd cms-myeasyguide
# Create .env.local with:
# DATABASE_URL=postgresql://user:pass@localhost:5432/cms_myeasyguide
# ANTHROPIC_API_KEY=sk-ant-...
# JWT_SECRET=your-secret

# 3. Frontend
cd myeasyguide.com
# Create .env with:
# NEXT_PUBLIC_API_BASE_URL=http://localhost:3000/api/v1
# NEXT_PUBLIC_POST_URL=http://localhost:3002

New Server Setup

bash
# Create .env files in each project directory
# Set production values for all variables
# Run prisma migrate to set up database schemas
# Configure PM2 ecosystem file or start processes manually

Built with VitePress