Visual-HN with preview images/Open Graph metadata, descriptions, zoom, position trends, and more — a FastAPI proxy that enriches hcker.news (itself a Hacker News clone) stories with Open Graph imagery and metadata, then serves them to a browser extension that overlays the feed.
Live: hn.is-ai-good-yet.com
- ✅ Proxies the hcker.news homepage and injects preview assets into the response
- ✅ Fetches Open Graph metadata (
og:image,og:description) for every story - ✅ Downloads and resizes images to a consistent 16:9 thumbnail (max 640px JPEG)
- ✅ Tracks each story's position trend over time (rising / falling / steady)
- ✅ Exposes story metadata and image assets through the Visual-HN API
- ✅ Async SQLite persistence via SQLAlchemy + aiosqlite
- Backend: Python 3.10+, FastAPI, SQLAlchemy, aiosqlite, aiohttp, curl_cffi
- Scraping: curl_cffi (TLS fingerprint impersonation), BeautifulSoup4, Pillow, Playwright
- Frontend: Proxied hcker.news runtime; legacy HTML/Tailwind page (retired)
- Database: SQLite with async access
The proxy/scraper runs on Ubuntu. See
docs/DEPLOYMENT.mdfor the full operational guide. Commands below are VPS-only (Ubuntu/bash).
git clone https://github.com/ilyaizen/visual-hn.git
cd visual-hn
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadOpen http://localhost:8000.
Load visual-hn-previews/ unpacked:
- Open
chrome://extensions - Enable Developer mode
- Click Load unpacked
- Select the
visual-hn-previews/directory - Open hcker.news
See visual-hn-previews/README.md for extension settings, keyboard shortcuts, and dev tests.
| File | Purpose |
|---|---|
main.py |
FastAPI app, routes, lifespan setup |
hcker_proxy.py |
hcker.news proxy with preview asset injection |
hn_scraper.py |
Fetches top stories from the HN Firebase API |
metadata.py |
Open Graph parsing, image download/resize |
database.py |
Async persistence, trend calculation |
residential_fetcher.py |
Headless Chrome fallback (nodriver, residential node) |
filter_lists.py |
Content-blocker filter list compilation |
models.py |
SQLAlchemy ORM models |
templates/ |
Legacy HTML templates |
static/ |
CSS, images, favicon |
visual-hn-previews/ |
Chrome/Edge extension for hcker.news |
scripts/ |
Residential-fetcher service + watchdog (Win) |
docs/ |
Deployment, node setup, rebrand runbooks |
Contributions are welcome. Current focus is the hcker.news proxy, preview assets, and the Visual-HN API.
MIT
