Environment Variables
api.myeasyguide.com
Core
| Variable | Required | Notes |
|---|---|---|
DATABASE_URL | yes | PostgreSQL connection string to myeasyguide_prod |
NODE_ENV | yes | development or production |
PORT | no | Defaults to 3000 |
BASE_URL | yes in prod | Absolute API URL (e.g. https://api.myeasyguide.com) |
FRONTEND_BASE_URL | yes in prod | Absolute frontend URL (e.g. https://myeasyguide.com) |
UPLOADS_BASE_URL | no | Optional base for local uploads |
FRONTEND_ORIGINS | no | Comma-separated extra origins allowed by CORS |
Auth
| Variable | Required | Notes |
|---|---|---|
JWT_SECRET | yes | For user and supplier tokens |
JWT_SECRET_ADMIN | yes | For admin tokens (separate secret) |
JWT_EXPIRY | no | Seconds passed to jsonwebtoken. Defaults to 604800 (7 days) |
COOKIE_AGE | no | Cookie max age in milliseconds. Defaults to 604800000 (7 days) |
COOKIE_DOMAIN | no | Defaults to .myeasyguide.com. Set on cookies in production |
Email (Resend)
| Variable | Required | Notes |
|---|---|---|
RESEND_API_KEY | prod | API key |
RESEND_FROM | prod | Verified sender, e.g. MyEasyGuide <no-reply@myeasyguide.com> |
RESEND_AUDIENCE_ID | no | Newsletter audience for sync (fails soft if missing) |
PROBLEM_REPORT_TO | no | Recipient for the "Report a problem" dialog. Defaults to meetgrowfore@gmail.com |
INQUIRY_RELAY_DOMAIN | yes for inquiries | Domain that receives inquiry-<id>@<domain> replies (e.g. relay.myeasyguide.com). Enable inbound on this subdomain in Resend. |
RESEND_WEBHOOK_SECRET | yes for inquiries | Signing secret for POST /api/v1/resend/received (Svix/Resend) |
EMAIL_UNSUB_SECRET | yes | Signs unsubscribe tokens |
VERIFICATION_TOKEN | no | Email verification token secret |
VERIFICATION_LINK | no | Legacy/base link used by email helpers |
RESET_LINK | no | Legacy/base link used by email helpers |
Payments
| Variable | Required | Notes |
|---|---|---|
STRIPE_SECRET_KEY | yes | sk_test_... or sk_live_... |
STRIPE_PUB_KEY | yes | Publishable key |
STRIPE_WHSEC_KEY | yes | Webhook signing secret for /api/v1/stripe/webhook |
PLATFORM_COMMISSION_RATE | no | Defaults to 0.3 (30%). Must be between 0 and 1. |
MIN_PAYOUT_AMOUNT | no | Defaults to 50. Must be positive. |
Bot protection
| Variable | Required | Notes |
|---|---|---|
TURNSTILE_SECRET | yes for protected actions | Cloudflare Turnstile secret key |
TURNSTILE_HOSTNAMES | no | Comma-separated allowlist. In development, mismatches can fail closed depending on setup; in production the allowlist should cover your domains. Actions: trip_inquiry, problem_report, supplier_contact. |
Media
| Variable | Required | Notes |
|---|---|---|
CF_ACCOUNT_ID | no | Cloudflare Images |
CF_API_TOKEN | no | Cloudflare Images |
CF_ACCOUNT_HASH | no | Cloudflare Images account hash; delivery URLs are built as https://imagedelivery.net/{hash}/{id}/public |
Integrations (optional)
| Variable | Required | Notes |
|---|---|---|
RECOMBEE_DB | no | Recombee database ID |
RECOMBEE_API_TOKEN | no | Recombee API token |
CLAUDE_API_KEY | no | Used by legacy blog generation paths if still present |
CLAUDE_MODEL | no | Defaults to claude-sonnet-4-20250514 |
TYPESENSE_HOST/PORT/PROTOCOL/API_KEY | no | Currently disabled in the running app. Do not rely on it. |
Database tuning (optional)
| Variable | Required | Notes |
|---|---|---|
DB_POOL_MAX | no | Prisma/pg pool max. Defaults to 10 |
DB_STATEMENT_TIMEOUT_MS | no | Defaults to 15000 |
DB_SLOW_QUERY_MS | no | Logged as slow queries. Defaults to 300 |
Seeding
| Variable | Required | Notes |
|---|---|---|
SEED_ADMIN_EMAIL | no | For pnpm seed:admin |
SEED_ADMIN_PASSWORD | no | For pnpm seed:admin. If unset, a password is generated. |
cms.myeasyguide.com
| Variable | Required | Notes |
|---|---|---|
DATABASE_URL | yes | PostgreSQL connection string to cms_myeasyguide |
JWT_SECRET | yes | Signs CMS auth tokens |
ANTHROPIC_API_KEY | yes for AI | Used for batch generation |
CLAUDE_API_KEY | no | Fallback |
CLAUDE_MODEL | no | Model for AI generation |
FRONTEND_URL | yes | Public frontend URL (e.g. https://myeasyguide.com) used for revalidation |
REVALIDATION_SECRET | yes | Header x-revalidation-secret sent to POST {FRONTEND_URL}/api/revalidate |
NODE_ENV | yes | development or production |
myeasyguide.com
| Variable | Required | Notes |
|---|---|---|
NEXT_PUBLIC_API_BASE_URL | yes | API base, e.g. https://api.myeasyguide.com/api/v1 (also used by rewrites) |
NEXT_PUBLIC_POST_URL | yes | CMS base, e.g. https://cms.myeasyguide.com |
NEXT_PUBLIC_SITE_URL | yes | Site origin for metadata and sitemaps |
NEXT_PUBLIC_TURNSTILE_SITEKEY | yes for protected forms | Public Turnstile key |
NEXT_PUBLIC_TAWK_PROPERTY_ID | no | Chat widget |
NEXT_PUBLIC_TAWK_WIDGET_ID | no | Chat widget |
REVALIDATION_SECRET | yes if CMS revalidates | Must match the CMS REVALIDATION_SECRET |
NODE_ENV | yes | development or production |
Setup notes
- Create
.envfiles per app from their examples (or set them in your process manager). Never commit secrets. NEXT_PUBLIC_*values are baked at build time. Rebuild after changing them.- The API validates required URLs in production and warns if optional email/Stripe pieces are missing. The CMS will fail auth/revalidation if
JWT_SECRETorREVALIDATION_SECRETare wrong. - In development, copy values from
.env.examplewhere present and fill in keys for the features you are testing.