|
1 | | -# Example env vars; copy to .env.local or set in deployment |
| 1 | +# ToolBox Environment Variables |
| 2 | +# Copy this file to .env and fill in your values |
| 3 | +# NEVER commit .env to git! |
2 | 4 |
|
3 | | -# Core |
| 5 | +# ============================================================================== |
| 6 | +# REQUIRED - App will not start without these |
| 7 | +# ============================================================================== |
| 8 | + |
| 9 | +# MongoDB connection string |
| 10 | +# Development: Use local MongoDB or Atlas free tier |
| 11 | +# Production: Use MongoDB Atlas or managed instance |
4 | 12 | MONGODB_URI=mongodb://127.0.0.1:27017/toolbox |
| 13 | + |
| 14 | +# NextAuth configuration |
| 15 | +# Development: http://localhost:3000 |
| 16 | +# Production: Your actual domain (e.g., https://toolbox.example.com) |
5 | 17 | NEXTAUTH_URL=http://localhost:3000 |
6 | | -NEXTAUTH_SECRET=change-me |
7 | 18 |
|
8 | | -# Dev admin (Credentials provider) |
9 | | -ADMIN_EMAIL=admin@local |
10 | | -ADMIN_PASSWORD=admin123 |
| 19 | +# NextAuth secret for JWT signing |
| 20 | +# ⚠️ CRITICAL: Generate a strong random secret! |
| 21 | +# Run: openssl rand -base64 32 |
| 22 | +# This must be at least 32 characters long |
| 23 | +NEXTAUTH_SECRET= |
| 24 | + |
| 25 | +# ============================================================================== |
| 26 | +# ADMIN CREDENTIALS - REQUIRED |
| 27 | +# ============================================================================== |
| 28 | + |
| 29 | +# Admin user email (used to log into /admin dashboard) |
| 30 | +ADMIN_EMAIL= |
| 31 | + |
| 32 | +# Admin password |
| 33 | +# ⚠️ SECURITY WARNING: |
| 34 | +# - MUST be at least 16 characters long |
| 35 | +# - Use a strong, randomly generated password |
| 36 | +# - Generate with: openssl rand -base64 24 |
| 37 | +# - NEVER use default passwords like "admin123" |
| 38 | +ADMIN_PASSWORD= |
11 | 39 |
|
12 | | -# Feature flags |
13 | | -ENABLE_SPAM_CHECK=false |
| 40 | +# ============================================================================== |
| 41 | +# PRODUCTION REQUIRED - Optional in development |
| 42 | +# ============================================================================== |
14 | 43 |
|
15 | | -# Optional providers |
| 44 | +# Upstash Redis (required for rate limiting in production) |
| 45 | +# Without this, rate limiting will not work in multi-instance deployments |
| 46 | +# Sign up at: https://upstash.com (free tier available) |
16 | 47 | # UPSTASH_REDIS_REST_URL= |
17 | 48 | # UPSTASH_REDIS_REST_TOKEN= |
| 49 | + |
| 50 | +# ============================================================================== |
| 51 | +# OPTIONAL FEATURES |
| 52 | +# ============================================================================== |
| 53 | + |
| 54 | +# Gemini AI API key (for AI-powered features) |
| 55 | +# Get your key at: https://makersuite.google.com/app/apikey |
| 56 | +# NEXT_PUBLIC_GEMINI_API_KEY= |
| 57 | + |
| 58 | +# Spam check feature (currently not implemented) |
| 59 | +# ENABLE_SPAM_CHECK=false |
| 60 | + |
| 61 | +# Akismet spam detection (if implementing spam check) |
18 | 62 | # AKISMET_API_KEY= |
19 | 63 | # AKISMET_SITE_URL= |
| 64 | + |
| 65 | +# ============================================================================== |
| 66 | +# SETUP CHECKLIST |
| 67 | +# ============================================================================== |
| 68 | +# |
| 69 | +# Before starting the app: |
| 70 | +# [ ] Copy this file to .env |
| 71 | +# [ ] Set MONGODB_URI (local or Atlas) |
| 72 | +# [ ] Generate NEXTAUTH_SECRET: openssl rand -base64 32 |
| 73 | +# [ ] Set ADMIN_EMAIL to your email |
| 74 | +# [ ] Generate ADMIN_PASSWORD: openssl rand -base64 24 |
| 75 | +# [ ] Set NEXTAUTH_URL to your domain (production) or localhost (dev) |
| 76 | +# [ ] (Production) Set up Upstash Redis and add credentials |
| 77 | +# [ ] Verify .env is in .gitignore |
| 78 | +# |
| 79 | +# ============================================================================== |
0 commit comments