Skip to main content
Create a .env file in the root directory. Use .env.example as a starting point.

Required Variables

Optional Variables

Getting API Keys

  1. Sign up at finnhub.io
  2. Get your free API key from the dashboard
  3. Set it as NEXT_PUBLIC_FINNHUB_API_KEY
  1. Enable 2-Factor Authentication on your Gmail account
  2. Go to Google App Passwords
  3. Generate a new app password for “Mail”
  4. Use this password as NODEMAILER_PASSWORD
Generate a secure secret:
Set the output as BETTER_AUTH_SECRET.

Environment-Specific Behavior

When NODE_ENV=development:
  • Email verification is disabled (auto sign-in after signup)
  • Verification and reset URLs are logged to console
  • Uses NEXT_PUBLIC_BASE_URL as the base URL

MongoDB URI

The MONGODB_URI must include the database name in the connection string. Without it, data defaults to the test database.