Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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