This is a Next.js project bootstrapped with create-next-app
.
It uses Nodemailer and Notion APIs in order to retrieve birthday data from a Notion database and, considering the current day, send an email saying whose birthday is.
-
Install dependencies with
pnpm
-
Run the development server using
pnpm dev
Open http://localhost:3000 to see placeholder page.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
This project has a /api/birthday-reminder
GET endpoint, it retrieves data and send text messages.
You also need to configure a secret in order to bypass the security header x-birthday-secret
.
This app is deployed on Netlify and has a Google Scheduler cronjob attached to it. This cronjob is executed everyday in order to update the birthday reminder of your loved people (: