Documentation is currently in beta. Report issues →
Getting StartedEnvironment Setup

Environment Setup

Y3NKO requires several environment variables to function. Create a .env.local file in the project root.

Required Variables

.env.local
# Database (Supabase PostgreSQL)
DATABASE_URL="postgresql://postgres.[project-ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres?pgbouncer=true"
DIRECT_URL="postgresql://postgres.[project-ref]:[password]@aws-0-[region].pooler.supabase.com:5432/postgres"

# Supabase
NEXT_PUBLIC_SUPABASE_URL="https://[project-ref].supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJ..."
SUPABASE_SERVICE_ROLE_KEY="eyJ..."

# Application
NEXT_PUBLIC_APP_URL="http://localhost:3000"

# Paystack (Payments)
PAYSTACK_SECRET_KEY="sk_test_..."
PAYSTACK_PUBLIC_KEY="pk_test_..."
PAYSTACK_WEBHOOK_SECRET="whsec_..."

# Cloudinary (Images)
CLOUDINARY_CLOUD_NAME="your-cloud-name"
CLOUDINARY_API_KEY="123456789012345"
CLOUDINARY_API_SECRET="abcdefghij..."
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="your-cloud-name"
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET="y3nko-uploads"

# Resend (Emails)
RESEND_API_KEY="re_..."

Variable Reference

Database

VariableDescriptionExample
DATABASE_URLPooled connection string (for Prisma)postgresql://...?pgbouncer=true
DIRECT_URLDirect connection string (for migrations)postgresql://...
⚠️

For Supabase, always use the pooler connection (port 6543) for DATABASE_URL and the direct connection (port 5432) for DIRECT_URL.

Supabase

VariableDescriptionWhere to Find
NEXT_PUBLIC_SUPABASE_URLProject URLSettings > API
NEXT_PUBLIC_SUPABASE_ANON_KEYPublic anon keySettings > API
SUPABASE_SERVICE_ROLE_KEYService role key (server only)Settings > API

Paystack

VariableDescription
PAYSTACK_SECRET_KEYServer-side API key (starts with sk_)
PAYSTACK_PUBLIC_KEYClient-side key (starts with pk_)
PAYSTACK_WEBHOOK_SECRETFor verifying webhook signatures

Use test keys (prefixed with sk_test_ and pk_test_) for development. Switch to live keys for production.

Cloudinary

VariableDescription
CLOUDINARY_CLOUD_NAMEYour cloud name
CLOUDINARY_API_KEYAPI key for server-side uploads
CLOUDINARY_API_SECRETAPI secret (never expose to client)
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAMECloud name for client-side
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESETUnsigned upload preset name

Resend

VariableDescription
RESEND_API_KEYAPI key for sending emails

Google OAuth (Optional)

If using Google OAuth for authentication:

GOOGLE_CLIENT_ID="123456789-xxx.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="GOCSPX-..."

Configure redirect URIs in Google Cloud Console:

  • Development: http://localhost:3000/api/auth/callback/google
  • Production: https://y3nko.travel/api/auth/callback/google

Production vs Development

EnvironmentKey Differences
DevelopmentTest API keys, localhost URLs, verbose logging
ProductionLive API keys, production URLs, error tracking

Never commit .env.local to version control. It’s already in .gitignore.

Verifying Configuration

Run the development server to verify all variables are set:

npm run dev

Check the console for any warnings about missing environment variables.