A sophisticated daily AI news briefing platform that automatically aggregates content from multiple RSS feeds and delivers curated insights directly to subscribers' inboxes. The system features automated daily news collection, processing, and email distribution with robust error handling and monitoring capabilities.
- Automated Daily News Collection: Fetches articles from multiple RSS sources daily
- Email Subscription System: Manage subscriber lists with Resend contacts API
- Cron-Scheduled Broadcasting: Automatically sends daily newsletters at scheduled times
- RSS Feed Processing: Supports both direct RSS feeds and RSSHub routes
- Database Integration: Stores articles and source information in Supabase
- Error Handling & Monitoring: Comprehensive logging and error reporting
- News Categorization: Organizes content by source and category
- HTML Email Templates: Rich, formatted email content with responsive design
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS 4
- Email Service: Resend (with broadcasts and contacts API)
- Task Queue: Inngest (for cron jobs and background processing)
- Database: Supabase (PostgreSQL)
- RSS Parsing: rss-parser
- Icons: Lucide React
- Notifications: Sonner
- UI Components: Custom components with Tailwind CSS
The application follows a modern server-side architecture with:
- Frontend: Next.js 16 with Client Components for interactive UI
- Backend API Routes: For subscription management and Inngest integration
- Task Scheduling: Inngest functions for cron-based news aggregation and email delivery
- Database Layer: Supabase PostgreSQL with dedicated modules for news sources and articles
- Email Delivery: Resend for transactional emails and broadcast newsletters
Create a .env.local file with the following variables:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# Resend Configuration
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=your_verified_sender_email
RESEND_SEGMENT_ID=your_resend_segment_id
# Inngest Configuration
INNGEST_EVENT_KEY=your_inngest_event_key
INNGEST_SIGNING_KEY=your_inngest_signing_key
# RSSHub Configuration (optional)
RSSHUB_BASE_URL=https://your-rsshub-instance.com # defaults to https://rss.appree.com- Install dependencies:
npm install
# or
bun install- Set up environment variables (create
.env.local):
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
RESEND_API_KEY=your_resend_api_key
RESEND_FROM_EMAIL=your_verified_sender_email
RESEND_SEGMENT_ID=your_resend_segment_id
INNGEST_EVENT_KEY=your_inngest_event_key
INNGEST_SIGNING_KEY=your_inngest_signing_key- Run the development server:
npm run devOpen http://localhost:3000 to see the result.
The application includes an automated daily newsletter system that:
- Runs daily at 4:15 AM UTC (12:15 PM Beijing time) via Inngest cron
- Fetches articles from all active RSS sources in the database
- Processes up to 10 most recent articles per source
- Aggregates content from the past 3 days (configurable)
- Formats articles into HTML email templates
- Sends newsletters via Resend broadcasts to all subscribers
The cron schedule "15 4 * * *" means the job runs at 4:15 UTC daily. You can adjust this in inngest/functions.ts.
The application uses Supabase PostgreSQL with two main tables:
- Manages RSS feed configurations
- Tracks source status (active/inactive)
- Supports both direct RSS feeds and RSSHub routes
- Includes priority levels for processing order
- Stores processed articles from RSS feeds
- Maintains publication dates and content
- Links to source information
- Prevents duplicate entries
The system supports two types of RSS sources:
- Direct Feeds: Standard RSS feed URLs
- RSSHub Routes: RSSHub endpoints with configurable parameters
Each source includes:
- Name and category information
- Type designation (direct_feed or rsshub)
- Priority level for processing order
- Active status flag
- Statistics tracking (success/failure counts)
This project is ready for deployment on Vercel:
- Push your code to GitHub
- Import your repository on Vercel
- Add environment variables in Vercel dashboard
- Configure the Inngest Dev Server (optional, for local development)
- Deploy
For production deployments, ensure your domain is properly configured with Resend for email delivery.
During development, you can trigger the daily news function manually using Inngest Dev Server:
- Install Inngest CLI:
npm install -g inngest-cli - Run the dev server:
inngest dev - Send test events to trigger functions
