Segmento-Pulse-Backend / .env.example
SHAFI
Phase 2: Appwrite Database Layer Implementation
c5f1000
# SegmentoPulse Backend - Environment Configuration
Copy this file to `.env` and add your API keys.
# Environment
ENVIRONMENT=development
# Multi-Provider News APIs
# Sign up for free API keys at:
# - GNews: https://gnews.io (100 requests/day)
# - NewsAPI: https://newsapi.org (100 requests/day)
# - NewsData: https://newsdata.io (200 requests/day)
GNEWS_API_KEY=your_gnews_api_key_here
NEWSAPI_API_KEY=your_newsapi_key_here
NEWSDATA_API_KEY=your_newsdata_key_here
# Provider Priority (comma-separated, in order of preference)
# Options: gnews, newsapi, newsdata, google_rss
NEWS_PROVIDER_PRIORITY=gnews,newsapi,newsdata,google_rss
# Legacy News API (optional)
NEWS_API_KEY=your_newsapi_key_here
# Firebase (from seg-pulse project)
# Database and Project ID are pre-configured
# You need to download firebase-credentials.json from Firebase Console
# See FIREBASE_SETUP.md for instructions
FIREBASE_DATABASE_URL=https://dbsegpulse-fbc35-default-rtdb.asia-southeast1.firebasedatabase.app
FIREBASE_PROJECT_ID=dbsegpulse-fbc35
FIREBASE_CREDENTIALS_PATH=./firebase-credentials.json
# Redis (optional - for caching)
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=
# Server
HOST=0.0.0.0
PORT=8000
CORS_ORIGINS=http://localhost:3000,https://segmento.in
# Cache Settings
CACHE_TTL=600 # seconds (Phase 1: increased from 120 to 600)
# Appwrite Database (Phase 2)
# Sign up at: https://cloud.appwrite.io
# Create a project and get your credentials
APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
APPWRITE_PROJECT_ID=your_appwrite_project_id_here
APPWRITE_API_KEY=your_appwrite_api_key_here
APPWRITE_DATABASE_ID=segmento_db
APPWRITE_COLLECTION_ID=articles
# Brevo Email (optional - for newsletter subscriptions)
BREVO_API_KEY=your_brevo_api_key_here
BREVO_SENDER_EMAIL=info@segmento.in
BREVO_SENDER_NAME=SegmentoPulse
FRONTEND_URL=https://segmento.in