.env file in the root directory. Use .env.example as a starting point.
Required Variables
Optional Variables
Getting API Keys
Finnhub API
Finnhub API
- Sign up at finnhub.io
- Get your free API key from the dashboard
- Set it as
NEXT_PUBLIC_FINNHUB_API_KEY
Gmail App Password
Gmail App Password
- Enable 2-Factor Authentication on your Gmail account
- Go to Google App Passwords
- Generate a new app password for “Mail”
- Use this password as
NODEMAILER_PASSWORD
Better Auth Secret
Better Auth Secret
Generate a secure secret:Set the output as
BETTER_AUTH_SECRET.Environment-Specific Behavior
- Development
- Production
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_URLas the base URL