# Cidadão.AI Backend - Environment Configuration Template # Copy this file to .env and fill in your values # ============================================================================== # 🔐 SECURITY & AUTHENTICATION # ============================================================================== # JWT Configuration JWT_SECRET_KEY=your-super-secret-jwt-key-here-change-this SECRET_KEY=your-general-secret-key-here-change-this API_SECRET_KEY=your-api-secret-key-here-change-this # Session & Token Configuration ACCESS_TOKEN_EXPIRE_MINUTES=30 REFRESH_TOKEN_EXPIRE_DAYS=7 # ============================================================================== # 🌐 API KEYS & EXTERNAL SERVICES # ============================================================================== # Portal da Transparência (Brazilian Government API) TRANSPARENCY_API_KEY=your-transparency-api-key-here # Dados.gov.br (Brazilian Open Data Portal) DADOS_GOV_API_KEY=your-dados-gov-api-key-here # Optional - only if the API requires authentication # AI/LLM Providers GROQ_API_KEY=your-groq-api-key-here OPENAI_API_KEY=your-openai-api-key-here MARITACA_API_KEY=your-maritaca-api-key-here # Vector Database (if using external ChromaDB) CHROMADB_HOST=localhost CHROMADB_PORT=8000 # ============================================================================== # 📊 DATABASE CONFIGURATION # ============================================================================== # PostgreSQL (Production) DATABASE_URL=postgresql+asyncpg://username:password@localhost:5432/cidadao_ai POSTGRES_USER=cidadao_ai POSTGRES_PASSWORD=your-postgres-password POSTGRES_DB=cidadao_ai # Redis (Cache & Queue) REDIS_URL=redis://localhost:6379/0 # ============================================================================== # 🚀 APPLICATION CONFIGURATION # ============================================================================== # Environment APP_ENV=development # development, staging, production DEBUG=true # Server Configuration HOST=0.0.0.0 PORT=8000 # CORS Configuration ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000,https://your-domain.com # ============================================================================== # 📈 MONITORING & OBSERVABILITY # ============================================================================== # Metrics ENABLE_METRICS=true METRICS_PORT=9090 # Logging LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR STRUCTURED_LOGGING=true # ============================================================================== # ☁️ CLOUD & DEPLOYMENT # ============================================================================== # HuggingFace Spaces (if deploying there) SPACE_ID=your-hf-space-id # Docker Configuration COMPOSE_PROJECT_NAME=cidadao-ai # ============================================================================== # 🔧 OPTIONAL FEATURES # ============================================================================== # Background Tasks ENABLE_BACKGROUND_TASKS=true CELERY_BROKER_URL=redis://localhost:6379/1 # Email Configuration (for notifications) SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=your-email@gmail.com SMTP_PASSWORD=your-app-password # File Storage STORAGE_TYPE=local # local, s3, gcs S3_BUCKET=your-s3-bucket S3_REGION=us-east-1 AWS_ACCESS_KEY_ID=your-aws-access-key AWS_SECRET_ACCESS_KEY=your-aws-secret-key # ============================================================================== # 🧪 DEVELOPMENT SETTINGS # ============================================================================== # Testing TEST_DATABASE_URL=postgresql+asyncpg://test_user:test_pass@localhost:5432/cidadao_ai_test # Development Tools HOT_RELOAD=true AUTO_MIGRATE=true