Skip to content

adugan-do/Daily-Digest

Repository files navigation

Daily Digest API

A FastAPI-based daily digest service that aggregates information from multiple sources (emails, calendar, news, weather, traffic, todos) and provides AI-powered summaries using Claude AI.

Features

  • 📧 Email Integration - Fetch unread emails from Gmail
  • 📅 Calendar Events - Get today's schedule from Google Calendar
  • 📰 News Aggregation - Top headlines from NewsAPI
  • 🌤️ Weather - Current weather and forecast
  • 🚗 Traffic - Real-time traffic using Google Routes API
  • Todo Lists - Today's tasks from Todoist
  • 🤖 AI Summaries - Intelligent summaries powered by Claude AI

Architecture

This API is designed to run on-demand (not scheduled) for maximum flexibility. You can trigger it via:

  • External schedulers (cron, GitHub Actions, etc.)
  • Webhooks
  • Manual API calls
  • Third-party automation tools (Zapier, IFTTT, etc.)

Setup

🚀 Quick Install (Ubuntu/Debian)

One-line installation - handles everything automatically:

curl -fsSL https://raw.githubusercontent.com/adugan-do/daily-digest/main/install.sh | bash

The installer will:

  • Install all dependencies
  • Set up Python environment
  • Interactively ask for API keys
  • Configure systemd service
  • Start the application

See INSTALL.md for details.

📦 Manual Installation

# Clone or download the project
git clone https://github.com/adugan-do/daily-digest.git
cd daily-digest

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

2. Configure API Keys (Optional)

The app works with sample data without ANY API keys! Great for testing.

For real integrations, you have two options:

Option A: Automatic Setup (Recommended for Google OAuth)

For Gmail & Calendar (requires one-time browser authentication):

  1. Download OAuth credentials from Google Cloud Console
  2. Save as: setup/google_credentials/credentials.json
  3. Start the app - it will auto-open your browser for one-time authentication
  4. Click "Allow" - tokens are saved automatically
  5. All future starts are fully automatic!

See GOOGLE_SETUP.md for detailed instructions.

Option B: Manual .env Configuration

Create .env file and add your keys:

cp env.example .env
# Edit .env with your favorite editor

Quick Setup Guides:

API Keys Available:

  • Anthropic (Claude AI): Get key - AI summaries
  • Gmail API: Auto-setup via OAuth (see above)
  • Google Calendar: Auto-setup via OAuth (same as Gmail)
  • NewsAPI: Get key - News headlines
  • OpenWeatherMap: Get key - Weather
  • Google Routes API: Setup guide - Traffic data
  • Todoist: Get key - Todo lists

3. Run the Application

Quick start (checks for credentials automatically):

./quickstart.sh

Or manually:

# Development mode with auto-reload
uvicorn main:app --reload

# Production mode
uvicorn main:app --host 0.0.0.0 --port 8000

First Run with Google Credentials?

  • Browser will open automatically for authentication
  • Click "Allow" once
  • Tokens saved - never needed again!

The API will be available at http://localhost:8000

API Endpoints

GET /

Health check

GET /health

Detailed health check with service status

POST /digest

Generate full daily digest

Request Body:

{
  "include_email": true,
  "include_news": true,
  "include_calendar": true,
  "include_weather": true,
  "include_traffic": true,
  "include_todos": true,
  "location": "New York, NY"
}

Response:

{
  "summary": "AI-generated summary...",
  "details": {
    "emails": [...],
    "calendar": [...],
    "news": [...],
    "weather": {...},
    "traffic": {...},
    "todos": [...]
  },
  "timestamp": "2026-02-19T10:30:00"
}

POST /digest/quick

Generate digest with default settings (all sources enabled)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors