mirror of
https://git.datalinker.icu/deepseek-ai/DeepSeek-V3.git
synced 2026-03-16 11:37:16 +08:00
Comprehensive intelligence retrieval system for collecting and aggregating information about Nairobi, Kenya from multiple sources. Features: - Multi-source data collection (news, social media, government, tourism, business) - RESTful API with FastAPI - Automated scheduling for continuous data collection - Intelligence brief generation - Real-time trending topics tracking - Alert system for important updates - Web scraping with rate limiting and caching - Social media integration (Twitter, Instagram) - NLP-powered categorization and processing - Docker support for easy deployment - CLI for manual operations Components: - Data models with SQLAlchemy - Base collector class with extensible architecture - Source-specific collectors (news, social, government, tourism, business) - Data processor for brief generation - Scheduler for automated collection - Comprehensive API endpoints - CLI interface for manual control Documentation: - Complete README with setup instructions - Quick start guide - Example usage scripts - Docker Compose configuration - Environment configuration templates
89 lines
2.1 KiB
Plaintext
89 lines
2.1 KiB
Plaintext
# Application Settings
|
|
APP_NAME="Nairobi Information Collector"
|
|
APP_VERSION="1.0.0"
|
|
DEBUG=True
|
|
ENVIRONMENT=development
|
|
|
|
# Server Configuration
|
|
HOST=0.0.0.0
|
|
PORT=8000
|
|
|
|
# Database Configuration
|
|
DATABASE_URL=postgresql://nairobiuser:password@localhost:5432/nairobi_info
|
|
# For SQLite (development): sqlite:///./nairobi_info.db
|
|
|
|
# Redis Configuration
|
|
REDIS_URL=redis://localhost:6379/0
|
|
REDIS_PASSWORD=
|
|
|
|
# API Keys - News Sources
|
|
NEWS_API_KEY=your_news_api_key_here
|
|
|
|
# API Keys - Social Media
|
|
TWITTER_API_KEY=your_twitter_api_key
|
|
TWITTER_API_SECRET=your_twitter_api_secret
|
|
TWITTER_ACCESS_TOKEN=your_twitter_access_token
|
|
TWITTER_ACCESS_SECRET=your_twitter_access_secret
|
|
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
|
|
|
|
INSTAGRAM_USERNAME=your_instagram_username
|
|
INSTAGRAM_PASSWORD=your_instagram_password
|
|
|
|
# API Keys - Maps & Location
|
|
GOOGLE_MAPS_API_KEY=your_google_maps_api_key
|
|
FOURSQUARE_API_KEY=your_foursquare_api_key
|
|
|
|
# API Keys - NLP & AI
|
|
OPENAI_API_KEY=your_openai_api_key
|
|
ANTHROPIC_API_KEY=your_anthropic_api_key
|
|
|
|
# Collection Settings
|
|
COLLECTION_INTERVAL_SECONDS=300
|
|
MAX_ITEMS_PER_SOURCE=100
|
|
REQUEST_TIMEOUT_SECONDS=30
|
|
MAX_RETRIES=3
|
|
|
|
# Rate Limiting
|
|
RATE_LIMIT_REQUESTS_PER_MINUTE=60
|
|
RATE_LIMIT_REQUESTS_PER_HOUR=1000
|
|
|
|
# Scraping Settings
|
|
USER_AGENT="Mozilla/5.0 (compatible; NairobiInfoBot/1.0)"
|
|
RESPECT_ROBOTS_TXT=True
|
|
ENABLE_CACHING=True
|
|
CACHE_TTL_SECONDS=3600
|
|
|
|
# Data Processing
|
|
ENABLE_NLP_PROCESSING=True
|
|
ENABLE_SENTIMENT_ANALYSIS=True
|
|
ENABLE_AUTO_CATEGORIZATION=True
|
|
MIN_RELIABILITY_SCORE=0.5
|
|
|
|
# Logging
|
|
LOG_LEVEL=INFO
|
|
LOG_FILE=logs/nairobi_collector.log
|
|
|
|
# Security
|
|
SECRET_KEY=your-secret-key-change-this-in-production
|
|
API_KEY_HEADER=X-API-Key
|
|
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000
|
|
|
|
# Monitoring
|
|
SENTRY_DSN=
|
|
ENABLE_METRICS=True
|
|
METRICS_PORT=9090
|
|
|
|
# Feature Flags
|
|
ENABLE_SOCIAL_MEDIA_COLLECTION=True
|
|
ENABLE_NEWS_COLLECTION=True
|
|
ENABLE_GOVERNMENT_COLLECTION=True
|
|
ENABLE_TOURISM_COLLECTION=True
|
|
ENABLE_BUSINESS_COLLECTION=True
|
|
|
|
# Email Notifications (for alerts)
|
|
SMTP_HOST=smtp.gmail.com
|
|
SMTP_PORT=587
|
|
SMTP_USERNAME=your_email@gmail.com
|
|
SMTP_PASSWORD=your_app_password
|
|
ALERT_EMAIL_RECIPIENTS=alerts@example.com
|