Skip to content

Commit bff487e

Browse files
NodeDiverclaude
andcommitted
Week 1 Task 5: Create comprehensive .env.example with detailed documentation
- Add complete environment variable documentation - Include setup instructions and getting started guide - Document all service integrations (Neon, Resend, Upstash, Sentry, Netlify) - Add setup checklist for required vs optional variables - Include generation commands for secrets - Add helpful comments for each section - Reference SETUP_INSTRUCTIONS.md for deployment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent bd5d557 commit bff487e

File tree

1 file changed

+93
-14
lines changed

1 file changed

+93
-14
lines changed

.env.example

Lines changed: 93 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,104 @@
1-
# Database Configuration
2-
# For local development with SQLite:
3-
DATABASE_URL="file:./dev.db"
1+
# ===================================
2+
# CommFlock Environment Configuration
3+
# ===================================
4+
# Copy this file to .env and fill in your values
5+
# NEVER commit .env to version control!
46

5-
# For PostgreSQL (local or Neon):
6-
# DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"
7-
# DIRECT_URL="postgresql://user:password@host:5432/database?sslmode=require"
7+
# ===================================
8+
# DATABASE
9+
# ===================================
10+
# Neon PostgreSQL (Production recommended)
11+
# Get your connection string from: https://console.neon.tech
12+
DATABASE_URL="postgresql://user:[email protected]/neondb?sslmode=require"
13+
DIRECT_URL="postgresql://user:[email protected]/neondb?sslmode=require"
814

9-
# Authentication
15+
# OR use SQLite for local development (not for production)
16+
# DATABASE_URL="file:./dev.db"
17+
18+
# ===================================
19+
# AUTHENTICATION (NextAuth.js)
20+
# ===================================
21+
# Your app's base URL
22+
# Production: https://yourapp.com
23+
# Development: http://localhost:3000
1024
NEXTAUTH_URL="http://localhost:3000"
11-
NEXTAUTH_SECRET="your-secret-key-here" # Generate with: openssl rand -base64 32
1225

13-
# Email Service (Resend)
26+
# Secret key for JWT signing and encryption
27+
# Generate a secure key: openssl rand -base64 32
28+
# IMPORTANT: Keep this secret and unique per environment
29+
NEXTAUTH_SECRET="your-secret-key-minimum-32-characters-long"
30+
31+
# ===================================
32+
# EMAIL SERVICE (Resend)
33+
# ===================================
34+
# Used for password reset emails
35+
# Sign up at: https://resend.com
36+
# Get your API key from: https://resend.com/api-keys
37+
# NOTE: If not configured, reset links will be logged to console (dev only)
1438
RESEND_API_KEY="re_xxxxxxxxxxxxx"
1539

16-
# Rate Limiting (Upstash Redis) - Optional in development
17-
# UPSTASH_REDIS_REST_URL="https://xxxxx.upstash.io"
18-
# UPSTASH_REDIS_REST_TOKEN="xxxxxxxxxxxxx"
40+
# ===================================
41+
# RATE LIMITING (Upstash Redis)
42+
# ===================================
43+
# Optional: Protects against abuse and DDoS
44+
# Sign up at: https://console.upstash.com
45+
# Get credentials from: Redis > Details
46+
# If not configured, rate limiting is disabled (NOT recommended for production)
47+
UPSTASH_REDIS_REST_URL="https://xxxxx.upstash.io"
48+
UPSTASH_REDIS_REST_TOKEN="xxxxxxxxxxxxx"
1949

20-
# Error Monitoring (Sentry) - Optional
50+
# ===================================
51+
# ERROR MONITORING (Sentry)
52+
# ===================================
53+
# Optional: Track errors and performance in production
54+
# Sign up at: https://sentry.io
55+
# Get your DSN from: Settings > Projects > [Your Project] > Client Keys
2156
# NEXT_PUBLIC_SENTRY_DSN="https://[email protected]/xxxxx"
57+
# SENTRY_AUTH_TOKEN="xxxxxxxxxxxxx"
58+
# SENTRY_ORG="your-org"
59+
# SENTRY_PROJECT="commflock"
2260

23-
# Deployment (Netlify)
61+
# ===================================
62+
# DEPLOYMENT (Netlify)
63+
# ===================================
64+
# Only needed for automated deployments
65+
# Get from: https://app.netlify.com/user/applications
2466
# NETLIFY_AUTH_TOKEN="xxxxxxxxxxxxx"
2567
# NETLIFY_SITE_ID="xxxxxxxxxxxxx"
68+
69+
# ===================================
70+
# DEVELOPMENT TOOLS
71+
# ===================================
72+
# Enable Prisma query logging (useful for debugging)
73+
# DEBUG="prisma:query"
74+
75+
# Node environment (auto-set by most platforms)
76+
# NODE_ENV="development" # or "production"
77+
78+
# ===================================
79+
# SETUP CHECKLIST
80+
# ===================================
81+
# Required for all environments:
82+
# ✓ DATABASE_URL
83+
# ✓ NEXTAUTH_URL
84+
# ✓ NEXTAUTH_SECRET
85+
#
86+
# Recommended for production:
87+
# ✓ RESEND_API_KEY (for email)
88+
# ✓ UPSTASH_REDIS_REST_URL + TOKEN (for rate limiting)
89+
#
90+
# Optional:
91+
# ○ SENTRY_DSN (error monitoring)
92+
# ○ NETLIFY tokens (automated deployment)
93+
94+
# ===================================
95+
# GETTING STARTED
96+
# ===================================
97+
# 1. Copy this file: cp .env.example .env
98+
# 2. Fill in required values (see checklist above)
99+
# 3. Generate NEXTAUTH_SECRET: openssl rand -base64 32
100+
# 4. Run database migrations: npx prisma migrate dev
101+
# 5. Seed initial data: npx prisma db seed
102+
# 6. Start dev server: npm run dev
103+
#
104+
# For production deployment guide, see: SETUP_INSTRUCTIONS.md

0 commit comments

Comments
 (0)