# Quick Start Guide Get Munich News Daily running in 5 minutes! ## Prerequisites - Docker & Docker Compose installed - 4GB+ RAM (for Ollama AI models) - (Optional) NVIDIA GPU for 5-10x faster AI processing ## Setup ### 1. Configure Environment ```bash # Copy example environment file cp backend/.env.example backend/.env # Edit with your settings (required: email configuration) nano backend/.env ``` **Minimum required settings:** ```env SMTP_SERVER=smtp.gmail.com SMTP_PORT=587 EMAIL_USER=your-email@gmail.com EMAIL_PASSWORD=your-app-password ``` ### 2. Start System ```bash # Option 1: Auto-detect GPU and start (recommended) ./start-with-gpu.sh # Option 2: Start without GPU docker-compose up -d # View logs docker-compose logs -f # Wait for Ollama model download (first time only, ~2-5 minutes) docker-compose logs -f ollama-setup ``` **Note:** First startup downloads the phi3:latest AI model (2.2GB). This happens automatically. ### 3. Add RSS Feeds ```bash mongosh munich_news db.rss_feeds.insertMany([ { name: "Süddeutsche Zeitung München", url: "https://www.sueddeutsche.de/muenchen/rss", active: true }, { name: "Merkur München", url: "https://www.merkur.de/lokales/muenchen/rss/feed.rss", active: true } ]) ``` ### 4. Add Subscribers ```bash mongosh munich_news db.subscribers.insertOne({ email: "your-email@example.com", active: true, tracking_enabled: true, subscribed_at: new Date() }) ``` ### 5. Test It ```bash # Test crawler docker-compose exec crawler python crawler_service.py 5 # Test newsletter docker-compose exec sender python sender_service.py test your-email@example.com ``` ## What Happens Next? The system will automatically: - **Backend API**: Runs continuously at http://localhost:5001 for tracking and analytics - **6:00 AM Berlin time**: Crawl news articles - **7:00 AM Berlin time**: Send newsletter to subscribers ## View Results ```bash # Check articles mongosh munich_news db.articles.find().sort({ crawled_at: -1 }).limit(5) # Check logs docker-compose logs -f crawler docker-compose logs -f sender ``` ## Common Commands ```bash # Stop system docker-compose down # Restart system docker-compose restart # View logs docker-compose logs -f # Rebuild after changes docker-compose up -d --build ``` ## New Features ### GPU Acceleration (5-10x Faster) Enable GPU support for faster AI processing: ```bash ./check-gpu.sh # Check if GPU is available ./start-with-gpu.sh # Start with GPU support ``` See [docs/GPU_SETUP.md](docs/GPU_SETUP.md) for details. ### Send Newsletter to All Subscribers ```bash # Send newsletter to all active subscribers curl -X POST http://localhost:5001/api/admin/send-newsletter \ -H "Content-Type: application/json" \ -d '{"max_articles": 10}' ``` ### Security Features - ✅ Only Backend API exposed (port 5001) - ✅ MongoDB internal-only (secure) - ✅ Ollama internal-only (secure) - ✅ All services communicate via internal Docker network ## Need Help? - **Documentation Index**: [docs/INDEX.md](docs/INDEX.md) - **GPU Setup**: [docs/GPU_SETUP.md](docs/GPU_SETUP.md) - **API Reference**: [docs/ADMIN_API.md](docs/ADMIN_API.md) - **Security Guide**: [docs/SECURITY_NOTES.md](docs/SECURITY_NOTES.md) - **Full Documentation**: [README.md](README.md) ## Next Steps 1. ✅ **Enable GPU acceleration** - [docs/GPU_SETUP.md](docs/GPU_SETUP.md) 2. Set up tracking API (optional) 3. Customize newsletter template 4. Add more RSS feeds 5. Monitor engagement metrics 6. Review security settings - [docs/SECURITY_NOTES.md](docs/SECURITY_NOTES.md) That's it! Your automated news system is running. 🎉