cuatrolabs-spa-ms / .env.example
MukeshKapoor25's picture
feat(dashboard): implement 3-tier caching architecture for mobile performance
fd7ec1d
# Spa Microservice Environment Configuration
# Application Configuration
APP_NAME=Spa Microservice
APP_VERSION=1.0.0
DEBUG=false
# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017
# For MongoDB Atlas: mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority
MONGODB_DB_NAME=cuatrolabs
# PostgreSQL Configuration
DB_PROTOCOL=postgresql+asyncpg
DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_HOST=localhost
DB_PORT=5432
DB_NAME=cuatrolabs
DB_SSLMODE=disable
POSTGRES_MIN_POOL_SIZE=5
POSTGRES_MAX_POOL_SIZE=20
POSTGRES_CONNECT_MAX_RETRIES=20
POSTGRES_CONNECT_INITIAL_DELAY_MS=500
POSTGRES_CONNECT_BACKOFF_MULTIPLIER=1.5
DATABASE_URL=postgresql+asyncpg://your-db-user:your-db-password@localhost:5432/cuatrolabs
# Redis Configuration (for caching and session management)
# If REDIS_URL is set, it will be used; otherwise REDIS_HOST/REDIS_PORT are used.
REDIS_URL=redis://:your-redis-password@localhost:6379/0
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your-redis-password
REDIS_DB=0
# JWT Configuration
SECRET_KEY=your-secret-key-here-change-in-production
ALGORITHM=HS256
TOKEN_EXPIRATION_HOURS=8
# OTP Configuration
OTP_TTL_SECONDS=600
OTP_RATE_LIMIT_MAX=10
OTP_RATE_LIMIT_WINDOW=600
# Twilio Configuration (SMS)
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
# SMTP Configuration (Email)
SMTP_HOST=
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM_EMAIL=
SMTP_USE_TLS=true
# Logging Configuration
LOG_LEVEL=INFO
# Dashboard Cache Configuration
# Redis cache TTL (how long dashboard data is cached in Redis)
DASHBOARD_REDIS_TTL_SECONDS=60
# MongoDB TTL (optional - for automatic cleanup of stale summaries)
# Set DASHBOARD_ENABLE_MONGO_TTL=true to enable automatic expiration
DASHBOARD_ENABLE_MONGO_TTL=false
DASHBOARD_MONGO_TTL_HOURS=3
# CORS Settings
CORS_ORIGINS=["http://localhost:3000","http://localhost:8000","http://localhost:8002"]