finds.dev

groveco/content-engine

A very simple content-based recommendation engine. Great for learning, but also ready for real-world use.

View on GitHub

★ 539Pythonupdated Jan 2021

// the take

A minimal Flask REST service that recommends similar products using TF-IDF and cosine similarity on text descriptions, with precomputed results cached in Redis. Aimed at people who want to see a content-based recommender end-to-end without wading into a bigger ML framework.

The core logic in engine.py is short enough to read in five minutes and actually understand what TF-IDF + cosine similarity is doing, which is the whole point if you're learning. Precomputing similarities in /train and just looking them up in /predict is the right split for a read-heavy recommendation workload. Comes with a sample CSV and curl examples so you can see it working in under a minute.

Last pushed in January 2021 and pinned to Anaconda plus a Heroku conda buildpack that's effectively unmaintained territory now — expect friction getting a working environment. Only one file of tests, no coverage of the Redis-backed prediction path or edge cases like unknown item IDs. It's called 'production-ready' but there's no auth beyond a hardcoded-looking API token check, no input validation on the CSV, and no handling for the /train endpoint being hit while a stale cache is still being served.

We read the README, the directory tree and a key source file in September 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
539
Forks
163
Language
Python
Last commit
11 Jan 2021

// nearby

If content-engine isn't quite it.

All repos →