The backend services for hackernewsalerts.com. A web application that sends email notifications when someone replies to one of your comments or posts on Hacker News.
I run 2 Python Django services:
- A Django Ninja REST API that handles email signups - see views.py
- A Django Q2 scheduled worker that checks for updates and sends emails when necessary - see tasks.py
Both services use the same Postgres database backend, and are deployed with CapRover - see the captain-definition
JSON files.
See Makefile
ALLOWED_HOSTS
andCORS_ALLOWED_ORIGINS
in prod should only allow for frontend prod
The scheduled worker sends email alerts to the admin user every time there's a failure. I sometimes get these alerts because of missing data, but the data usually becomes available after a couple of hours.