Skip to content
cnu.name
Go back

HNTLDR: Hacker News TL;DR Summarizer

Python Flask SQLAlchemy OpenAI API Docker
GitHub →

HNTLDR is a Hacker News reader that summarizes articles so you don’t have to read the full thing. It fetches the top stories from the Hacker News home page and generates concise summaries using OpenAI’s GPT-3.5 API.

The application has three main components:

Data Collector — A module that fetches the top stories from Hacker News using their API and stores them in a database. It can be run on demand or scheduled to fetch stories periodically.

Data Analyser — A background process that picks up stories from the database and generates summaries using OpenAI’s GPT-3.5 APIs. Summaries are stored alongside the original story data for fast retrieval.

Web Application — A Flask-based frontend that displays the stories. When a user wants to read a story’s summary, they click the summarize button. If a summary already exists in the database, it’s displayed instantly. If not, it’s generated on-the-fly by the data analyser.

The project uses SQLAlchemy as the ORM, making it easy to swap between SQLite for local development and PostgreSQL for production. It’s containerized with Docker and includes a Procfile for easy deployment to platforms like Heroku or Railway.