This guide covers all environment variables for Python backend, Node.js API, and Next.js frontend components of Weam AI.

Service-Specific Variables

Required Configuration

These environment variables must be configured for Weam AI to function properly.

Database Settings

Configure MongoDB and Redis connections for data storage and caching:
# MongoDB Database
MONOGODB_URI=mongodb://localhost:27017
DB_DATABASE=Weam AIdb

# Redis Cache and Queues
REDIS_HOST=localhost
REDIS_PORT=6379
CELERY_BROKEN_URL=redis://localhost:6379
CELERY_RESULT_BACKEND=redis://localhost:6379

Security Configuration

Generate and configure secure keys for authentication and encryption:
# JWT Authentication
JWT_SECRET=your-super-secure-jwt-secret-here
JWT_REFRESH_SECRET=your-super-secure-refresh-secret-here

# Application Security
SECURITY_KEY=your-16-byte-security-key
CSRF_TOKEN_SECRET=your-csrf-token-secret
Generate secure keys:
# Linux/macOS
openssl rand -hex 32

# Python
python -c "import secrets; print(secrets.token_urlsafe(32))"

Service URLs

Configure service endpoints and domain settings:
# Frontend Application
NEXT_PUBLIC_DOMAIN_URL=http://localhost:3000
FRONT_URL=http://localhost:3000

# Backend Services
BASE_URL=http://localhost:4050
PYTHON_API_URL=http://localhost:9089

File Storage Configuration

Choose between local MinIO storage or AWS S3 for file management:
BUCKET_TYPE=MINIO
MINIO_ENDPOINT=http://localhost:9000
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET=Weam AI-media
Benefits:
  • No external dependencies
  • Free for development
  • Easy local testing

Vector Database Settings

Configure Qdrant for AI embeddings and vector search:
# Qdrant Vector Database
LOCAL_QDRANT_URL=http://localhost:6333
QDRANT_DASHBOARD_PORT=6333

Optional Configuration

These settings enhance functionality but aren’t required for basic operation.

Email Notifications

Configure SMTP for user notifications and account management:
# Email Service
EMAIL_PROVIDER=SMTP
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SENDER_EMAIL=noreply@yourdomain.com
Popular SMTP providers:
  • Gmail: smtp.gmail.com:587 (requires app password)
  • SendGrid: smtp.sendgrid.net:587
  • AWS SES: Regional endpoints available

External Service Integration

Configure OAuth credentials for third-party integrations:
SLACK_CLIENT_ID=your-slack-client-id
SLACK_CLIENT_SECRET=your-slack-client-secret
NEXT_PUBLIC_SLACK_CLIENT_ID=your-slack-client-id
NEXT_PUBLIC_SLACK_CLIENT_SECRET=your-slack-client-secret
Enable Slack workspace integration for team collaboration.

Development Tools

Configure debugging and development utilities:
# Python Debugger
WDB_SOCKET_SERVER=localhost
WDB_PORT=1984
WDB_NO_BROWSER_AUTO_OPEN=True

# Environment Mode
Weam AI_ENVIRONMENT=development

Environment-Specific Settings

Configure different settings for development and production environments.

Local Development Environment

# Development Configuration
NEXT_PUBLIC_APP_ENVIRONMENT=dev
NEXT_PUBLIC_HTTPS_PROTOCOL=false
NEXT_PUBLIC_DOMAIN_URL=http://localhost:3000

# Local Service URLs
NEXT_PUBLIC_BACKEND_API_URL=http://localhost:4050
NEXT_PUBLIC_PYTHON_API_URL=http://localhost:9089

Production Deployment Environment

# Production Configuration
NEXT_PUBLIC_APP_ENVIRONMENT=production
NEXT_PUBLIC_HTTPS_PROTOCOL=true
NEXT_PUBLIC_DOMAIN_URL=https://your-domain.com

# Production Service URLs
NEXT_PUBLIC_BACKEND_API_URL=https://your-domain.com
NEXT_PUBLIC_PYTHON_API_URL=https://your-domain.com

Configuration Validation

Verify your environment variable configuration:
# Check required variables exist
grep -E "(JWT_SECRET|MONOGODB_URI|REDIS_HOST)" .env

# Verify no placeholder values remain
grep -E "(your-|placeholder|example)" .env

# Test database connection
docker exec Weam AI-mongodb mongosh --eval "db.runCommand('ping')"

Next Steps