Skip to content

cauafsantosdev/yadn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YADN: Yet Another Daily Newsletter

Go Version Frontend Infrastructure Model Database License: MIT

Live Dashboard: yadn.cauafsantos.dev

YADN is a fully automated, AI-driven daily digest and web dashboard for software engineers. Built entirely on an AWS Serverless architecture, the pipeline scrapes top tech RSS feeds, evaluates and summarizes the content using LLMs, and delivers a high-signal, dark-mode newsletter directly to subscribers while persisting the data to a globally edge-cached Next.js web application.


System Architecture

The project runs on a decoupled, event-driven architecture designed to operate with near-zero idle costs while maintaining enterprise-grade reliability and edge performance.

1. Ingestion & AI Processing Layer (Go + Bedrock)

  • Scheduling: Managed by Amazon EventBridge, firing a cron job automatically at 10:00 AM UTC, Monday through Friday.
  • Scraping: An AWS Lambda function (written in Go) wakes up and concurrently fetches the latest articles from configured RSS feeds, utilizing a 72-hour lookback window to capture weekend news.
  • Evaluation: Raw articles are batched and sent to Amazon Bedrock (Claude 4.5 Haiku). The model is strictly prompted to filter out marketing fluff, score the technical depth of each article, and generate dense, technical summaries.
  • State & Storage: Cleaned summaries and LLM-generated relevance scores are written to a strictly-typed Amazon DynamoDB table (YADN_Articles).

2. Frontend & Edge Delivery (Next.js + CloudFront)

  • Static Export: A minimalist, dark-mode Next.js interface is statically generated and hosted in an Amazon S3 bucket.
  • Global CDN: Distributed via Amazon CloudFront with Origin Access Control (OAC), ensuring sub-millisecond load times worldwide.
  • CI/CD: GitHub Actions automatically builds the Next.js artifacts, syncs them to S3, and invalidates the CloudFront edge cache on every push to main.

3. API & Security Layer (API Gateway)

  • Secure Endpoints: A custom AWS HTTP API Gateway handles /subscribe, /unsubscribe, and /editions traffic.
  • Denial of Wallet (DoW) Protection: The API is hardened with strict Rate Limiting (20 req/sec) and Burst Limits to prevent malicious bot traffic from spinning up massive Lambda concurrency.
  • CORS Lockdown: Preflight OPTIONS requests are handled by the Go binary, strictly limiting origin access to the official CloudFront domain.
  • Dispatch: The final HTML email is distributed to subscribers via Amazon SES (Simple Email Service).

Key Features

  • High Signal, Zero Fluff: AI-curated summaries focused strictly on Cloud, AI, and Backend Architecture.
  • Weekday-Only Cadence: Respects the reader's time by aggregating weekend tech PR drops into a dense Monday edition.
  • Terminal UI Dashboard: Custom dark-mode web interface utilizing a system monospace font stack for a native IDE feel.
  • Dynamic Read Time: Automatically calculates the time commitment based on word count prior to rendering.
  • 100% Serverless: Requires no active server management and scales seamlessly from the backend to the global edge network.

Tech Stack

  • Core: Go (Golang)
  • Frontend: Next.js, React, Tailwind CSS
  • Compute & Events: AWS Lambda, Amazon EventBridge Scheduler
  • AI / Machine Learning: Amazon Bedrock (Anthropic Claude 4.5 Haiku)
  • State / Database: Amazon DynamoDB, Amazon S3
  • Delivery: Amazon CloudFront, Amazon SES
  • Infrastructure as Code (IaC): AWS SAM (Serverless Application Model)

Project Structure

yadn/
├── cmd/
│   ├── api/            # API Gateway handlers (Subscribe/Unsubscribe/Editions)
│   └── newsletter/     # Main EventBridge cron handler
├── frontend/           # Next.js web application and Tailwind styling
├── internal/
│   ├── ai/             # Amazon Bedrock (Claude) connection, prompts, and parsing
│   ├── db/             # DynamoDB CRUD operations and state deduplication
│   ├── delivery/       # SES dispatch and HTML templating
│   ├── models/         # Shared Go structs and schemas
│   └── scraper/        # Concurrent RSS feed parsing and HTTP client logic
├── template.yaml       # AWS SAM Infrastructure definition
├── samconfig.toml      # Deployment configurations
└── .github/workflows/  # CI/CD deployment pipeline for Go backend and Next.js frontend

How to Deploy

Prerequisites: Go 1.21+, Node.js 20+, AWS CLI configured with credentials, and the AWS SAM CLI.

1. Clone the Repository

git clone https://github.com/cauafsantosdev/yadn
cd yadn

2. Automated Deployment via CI/CD

This project uses GitHub Actions for continuous deployment. Pushing to the main branch will automatically:

  1. Build the Go binaries and deploy the AWS SAM infrastructure.
  2. Export the Next.js frontend as static HTML/JS.
  3. Sync the frontend assets to the S3 Bucket and invalidate the CloudFront CDN cache.

To deploy manually via CLI:

sam build
sam deploy --guided

Subscribe to the Newsletter

You can subscribe to the daily digest directly through the web dashboard:

👉 yadn.cauafsantos.dev


Engineering Decisions

1. Why Go for Serverless?

Go was chosen over Python specifically for its fast cold-start times in AWS Lambda. Because the daily cron job wakes the function up from a cold state, Go's compiled binary execution ensures the pipeline begins processing in milliseconds, keeping compute duration and costs to an absolute minimum. Memory allocation is highly optimized using strings.Builder to prevent memory thrashing during massive LLM prompt construction.

2. Why Claude 4.5 Haiku via Bedrock?

Haiku provides the optimal balance between cost and intelligence. For a pipeline running daily, using heavier models like Sonnet or GPT-4 would be cost-prohibitive. Haiku perfectly handles the strict XML-bounded prompts required to force a valid JSON array output, avoiding the parsing panics common in automated LLM pipelines.

3. Prompt-Level Content Evaluation

When passing up to 72 hours of tech news to Amazon Bedrock, hitting the max_tokens output limit is a constant risk. Instead of a programmatic Go slice, the prompt forces the LLM to act as a semantic filter—evaluating and scoring all articles silently in its attention layers, and only outputting summaries for the top 10. This creates a hard ceiling on output size, guaranteeing stable json.Unmarshal operations.

4. The 72-Hour Lookback & Weekday Cron

Major tech companies rarely publish critical architecture updates on weekends. Instead of sending low-value emails on Saturday and Sunday, the EventBridge cron is restricted to MON-FRI. The Go scraper's lookback window is set to 72 hours so Monday's email seamlessly catches up on anything published from late Friday afternoon.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Contact

Cauã Santos – LinkedIn Profilecauafsantosdev@gmail.com

Project Link: https://github.com/cauafsantosdev/yadn

About

A fully serverless AI newsletter and web dashboard for software engineers. Powered by a Go Lambda scraper, DynamoDB deduplication, LLM context-window optimization via Amazon Bedrock, and deployed globally with Next.js and CloudFront.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors