A newsletter project to receive the top stories from the Hacker News forum via email
  • TypeScript 91.7%
  • CSS 3.7%
  • HTML 2.7%
  • JavaScript 0.9%
  • Dockerfile 0.7%
  • Other 0.3%
Find a file
2026-02-15 10:30:08 +00:00
.gitea/workflows fix: correct infrastructure path 2026-01-22 17:44:36 +00:00
.github/workflows feat: use vercel ai gateway (#38) 2025-10-11 16:37:36 +02:00
.husky chore: add audit script 2024-09-12 12:40:38 +02:00
.vscode feat: base pages and news fetching with cron job 2023-11-25 09:20:38 +01:00
app feat: switch to umami 2026-01-31 22:50:00 +01:00
components revert: restore lucide-react icons for emails 2026-01-29 19:42:21 +01:00
contexts refactor: renames, rewrite some file, function names and texts 2024-06-18 12:03:56 +02:00
hooks chore: code cleaning (#21) 2024-11-23 09:13:15 +01:00
prisma feat: migrate AI to llama and use local db 2026-01-19 21:25:38 +01:00
public revert: restore lucide-react icons for emails 2026-01-29 19:42:21 +01:00
utils feat: switch back to meta llama 2026-02-15 10:30:08 +00:00
.env.example feat: switch to sweego 2026-01-30 18:12:29 +01:00
.eslintrc.json refactor: improve news and email handling, style, folder structure (#16) 2024-06-04 12:04:54 +02:00
.gitignore feat: add summary using Anthropic API 2024-09-20 02:52:16 +02:00
.prettierrc style: linting and formatting 2023-11-29 19:44:39 +01:00
.yarnrc.yml refactor: improve news and email handling, style, folder structure (#16) 2024-06-04 12:04:54 +02:00
commitlint.config.ts fix: removed client-side Link from server components 2024-02-23 16:17:18 +01:00
docker-compose.yml feat: migrate AI to llama and use local db 2026-01-19 21:25:38 +01:00
Dockerfile chore: update privacy 2026-01-28 19:56:07 +01:00
LICENSE Initial commit 2023-11-25 08:56:01 +01:00
middleware.ts feat: add middleware to redirect http to https 2024-08-31 21:09:29 +02:00
next.config.js ci: add bundle analyzer 2024-07-17 13:44:54 +02:00
package-lock.json feat: switch to umami 2026-01-31 22:50:00 +01:00
package.json feat: switch to umami 2026-01-31 22:50:00 +01:00
postcss.config.js Review adjustments (#11) 2024-01-20 03:00:31 +01:00
README.md feat: use vercel ai gateway (#38) 2025-10-11 16:37:36 +02:00
tailwind.config.ts refactor: improve news and email handling, style, folder structure (#16) 2024-06-04 12:04:54 +02:00
tsconfig.json refactor: renames, rewrite some file, function names and texts 2024-06-18 12:03:56 +02:00
vercel.json feat: set Vercel functions timeout to 30 seconds 2024-10-18 10:59:16 +02:00
yarn.lock feat: switch to umami 2026-01-31 22:50:00 +01:00

📰 HackerNews Newsletter

A Next.js application that aggregates HackerNews stories and delivers them as personalized daily newsletters.

Features

  • 📧 Daily newsletter containing curated HackerNews stories
  • ☁️ Vercel hosting integration

🚀 Future improvements

  • Cron every 10 minutes and reduce time delta to 10 minutes: people are more likely to open the newsletter if delivered around the time when they subscribed (if cron becomes not enough, then the cost of sending all the emails might be a bigger issue)

🛠️ Tech Stack

  • Next.js
  • 🗄️ Prisma (Database ORM)
  • 🚀 Vercel (Hosting)
  • 📝 Custom email templates

🏁 Getting Started

📋 Prerequisites

  • 📦 Node.js
  • 🐳 Docker
  • 🔧 Vercel CLI
  • 🧶 Yarn package manager

💻 Installation

  1. Clone the repository:
git clone https://github.com/RiccardoSenica/newsletter-hackernews
cd hackernews-newsletter
  1. Install dependencies:
yarn install
  1. Set up Vercel:
# Install Vercel CLI
yarn add -g vercel@latest

# Link to your Vercel project
yarn vercel:link

# Pull environment variables
yarn vercel:env
  1. Set up the database:
# Push Prisma schema to database
yarn db:push

# Generate Prisma client
yarn prisma:generate

🔧 Development

Run locally with Docker:

docker-compose up --build

🗄️ Database Management

Reset database (⚠️ caution: this will delete all data):

yarn db:reset

🙏 Acknowledgments