# ๐Ÿ“ฐ 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: ```bash git clone https://github.com/RiccardoSenica/newsletter-hackernews cd hackernews-newsletter ``` 2. Install dependencies: ```bash yarn install ``` 3. Set up Vercel: ```bash # Install Vercel CLI yarn add -g vercel@latest # Link to your Vercel project yarn vercel:link # Pull environment variables yarn vercel:env ``` 4. Set up the database: ```bash # Push Prisma schema to database yarn db:push # Generate Prisma client yarn prisma:generate ``` ### ๐Ÿ”ง Development Run locally with Docker: ```bash docker-compose up --build ``` ### ๐Ÿ—„๏ธ Database Management Reset database (โš ๏ธ caution: this will delete all data): ```bash yarn db:reset ``` ## ๐Ÿ™ Acknowledgments - ๐ŸŽจ [Gradient Buttons](https://gradientbuttons.colorion.co/) - โœจ [Custom Animation Effects](https://codepen.io/alphardex/pen/vYEYGzp)