Initial commit: Daily tech newsletter worker
A Node.js/TypeScript worker that sends daily AI-generated summaries of tech news from X/Twitter via Nitter RSS feeds. Features: - Fetches tweets from 40+ curated tech accounts via Nitter RSS - Filters and categorizes by topic (AI/ML, SWE, General Tech) - Generates AI summaries using OpenRouter (Claude/GPT-4) - Sends professional HTML email via Brevo SMTP - Runs on cron schedule inside Docker container - Instance rotation for Nitter reliability - Graceful degradation if AI fails Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
52
.env.example
Normal file
52
.env.example
Normal file
@@ -0,0 +1,52 @@
|
||||
# =============================================================================
|
||||
# APPLICATION
|
||||
# =============================================================================
|
||||
NODE_ENV=production
|
||||
LOG_LEVEL=info # debug, info, warn, error
|
||||
|
||||
# =============================================================================
|
||||
# RSS CONFIGURATION
|
||||
# =============================================================================
|
||||
# Comma-separated list of Nitter instances (will rotate on failure)
|
||||
NITTER_INSTANCES=https://nitter.poast.org,https://xcancel.com,https://nitter.privacydev.net
|
||||
RSS_FETCH_TIMEOUT=30000 # 30 seconds
|
||||
RSS_MAX_TWEETS_PER_ACCOUNT=50
|
||||
|
||||
# =============================================================================
|
||||
# OPENROUTER AI
|
||||
# =============================================================================
|
||||
OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
||||
OPENROUTER_MODEL=anthropic/claude-3-sonnet-20240229
|
||||
# Alternative models: openai/gpt-4-turbo, anthropic/claude-3-opus, google/gemini-pro
|
||||
OPENROUTER_MAX_TOKENS=2000
|
||||
OPENROUTER_SITE_URL=https://your-newsletter.com
|
||||
OPENROUTER_SITE_NAME=Tech Newsletter
|
||||
|
||||
# =============================================================================
|
||||
# BREVO SMTP
|
||||
# =============================================================================
|
||||
BREVO_SMTP_HOST=smtp-relay.brevo.com
|
||||
BREVO_SMTP_PORT=587
|
||||
BREVO_SMTP_USER=your-brevo-login-email
|
||||
BREVO_SMTP_KEY=your-brevo-smtp-api-key
|
||||
EMAIL_FROM_ADDRESS=newsletter@yourdomain.com
|
||||
EMAIL_FROM_NAME=Daily Tech Digest
|
||||
# Comma-separated recipient list
|
||||
EMAIL_RECIPIENTS=you@example.com
|
||||
|
||||
# =============================================================================
|
||||
# SCHEDULER
|
||||
# =============================================================================
|
||||
# Cron expression: minute hour day month weekday
|
||||
# Default: Every day at 7:00 AM
|
||||
CRON_SCHEDULE=0 7 * * *
|
||||
CRON_TIMEZONE=Europe/Warsaw
|
||||
|
||||
# =============================================================================
|
||||
# FEATURE FLAGS
|
||||
# =============================================================================
|
||||
ENABLE_AI_SUMMARIES=true
|
||||
INCLUDE_RETWEETS=false
|
||||
INCLUDE_REPLIES=false
|
||||
# Set true to skip email sending (for testing)
|
||||
DRY_RUN=false
|
||||
Reference in New Issue
Block a user