From 11c26df11638b77799b5452d4bd7d916315e8916 Mon Sep 17 00:00:00 2001 From: Riccardo Senica Date: Sat, 18 Jan 2025 12:41:26 +0100 Subject: [PATCH] docs: update README.md --- README.md | 78 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 795a499..d8a524a 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,76 @@ -# Hackernews newsletter +# ๐Ÿ“ฐ HackerNews Newsletter -## Future improvements +A Next.js application that aggregates HackerNews stories and delivers them as personalized daily newsletters. -- 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) +## โœจ Features +- ๐Ÿ“ง Daily newsletter containing curated HackerNews stories +- โ˜๏ธ Vercel hosting integration -## Some resources used +## ๐Ÿš€ 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) -https://gradientbuttons.colorion.co/ -https://codepen.io/alphardex/pen/vYEYGzp +## ๐Ÿ› ๏ธ Tech Stack +- โšก Next.js +- ๐Ÿ—„๏ธ Prisma (Database ORM) +- ๐Ÿš€ Vercel (Hosting) +- ๐Ÿ“ Custom email templates -## Commands +## ๐Ÿ Getting Started -Install vercel cli +### ๐Ÿ“‹ Prerequisites +- ๐Ÿ“ฆ Node.js +- ๐Ÿณ Docker +- ๐Ÿ”ง Vercel CLI +- ๐Ÿงถ Yarn package manager +### ๐Ÿ’ป Installation + +1. Clone the repository: ```bash +git clone [repository-url] +cd hackernews-newsletter +``` + +2. Install dependencies: +```bash +yarn install +``` + +3. Set up Vercel: +```bash +# Install Vercel CLI yarn add -g vercel@latest -``` -Link to vercel - -```bash +# Link to your Vercel project yarn vercel:link -``` -Pull env variables from vercel - -```bash +# Pull environment variables yarn vercel:env ``` -Push Prisma schema to vercel - +4. Set up the database: ```bash +# Push Prisma schema to database yarn db:push -``` -Generate Prisma client - -```bash +# Generate Prisma client yarn prisma:generate ``` -Reset Prisma database +### ๐Ÿ”ง Development +Run locally with Docker: +```bash +docker-compose up --build +``` + +### ๐Ÿ—„๏ธ Database Management + +Reset database (โš ๏ธ caution: this will delete all data): ```bash yarn db:reset ``` -Run on Docker - -```bash -docker-compose up --build -``` +## ๐Ÿ™ Acknowledgments +- ๐ŸŽจ [Gradient Buttons](https://gradientbuttons.colorion.co/) +- โœจ [Custom Animation Effects](https://codepen.io/alphardex/pen/vYEYGzp) \ No newline at end of file