From 0b22cdf965a319454918fa33d36e1a07c5e0f4bc Mon Sep 17 00:00:00 2001 From: Nalwoga Date: Tue, 21 Apr 2026 16:34:52 +0300 Subject: [PATCH] docs: populate env.example with all required variables for issue #40 - Added database, JWT, OAuth configuration - Added email, Redis, logging settings - Added API documentation and rate limiting configs --- env.example | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/env.example b/env.example index 9a0b23b..35f3214 100644 --- a/env.example +++ b/env.example @@ -148,3 +148,69 @@ BACKUP_ENABLED=true BACKUP_RETENTION_DAYS=30 BACKUP_COMPRESSION=true BACKUP_PATH=./backups + + +# ============================================ +# GreenCode Environment Configuration +# ============================================ + +# ===== Server Configuration ===== +SERVER_PORT=8080 +SERVER_CONTEXT_PATH=/api + +# ===== Database Configuration ===== +# PostgreSQL (default) +DB_HOST=localhost +DB_PORT=5432 +DB_NAME=greencode_db +DB_USER=greencode_user +DB_PASSWORD=changeme + +# ===== JWT Authentication ===== +JWT_SECRET=your-super-secret-jwt-key-change-this-in-production +JWT_EXPIRATION_MS=86400000 +JWT_REFRESH_EXPIRATION_MS=604800000 + +# ===== OAuth Configuration (Optional) ===== +# Google OAuth +GOOGLE_CLIENT_ID= +GOOGLE_CLIENT_SECRET= + +# GitHub OAuth +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= + +# ===== Frontend Configuration ===== +FRONTEND_URL=http://localhost:3000 +CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8080 + +# ===== Email Configuration (for password reset) ===== +EMAIL_HOST=smtp.gmail.com +EMAIL_PORT=587 +EMAIL_USERNAME=your-email@gmail.com +EMAIL_PASSWORD=your-app-password +EMAIL_FROM=noreply@greencode.com + +# ===== Redis Configuration (Optional) ===== +REDIS_HOST=localhost +REDIS_PORT=6379 +REDIS_PASSWORD= + +# ===== Logging ===== +LOG_LEVEL=INFO +LOG_FILE=logs/greencode.log + +# ===== API Documentation ===== +SWAGGER_ENABLED=true +API_TITLE=GreenCode API +API_DESCRIPTION=Environmental and Sustainability Project API +API_VERSION=1.0.0 + +# ===== Rate Limiting ===== +RATE_LIMIT_ENABLED=true +RATE_LIMIT_REQUESTS=100 +RATE_LIMIT_DURATION=60 + +# ===== File Upload ===== +MAX_FILE_SIZE=10MB +UPLOAD_DIR=./uploads