ChefsStack
A recipe platform whose recommendations come from vector similarity
- Role
- Backend & recommendation engine
- Period
- 2025 — 2026
- Status
- Live
- Links
- Visit site ↗
By the numbers
<50ms<50ms - similar-recipe query
1,000+1,000+ - interaction events processed
00 - hand-written recommendation rules
Overview
chefsstack.com is a recipe site: categories, nutrition lookup, special occasions, allergy-friendly recipes, popular and latest. I built the backend. Recommendations are not hand-written rules; they come from vector similarity between recipes, and user interactions flow through Kafka to update feeds in Redis. The site is live; the user and content base is still small.
- Every recipe is embedded and stored in a pgvector column in PostgreSQL; the 'similar recipes' query returns in under 50 ms through FastAPI.
- View, save and like events land on Kafka; a consumer service uses them to update the personal feed and the popular list in Redis.
- Nutrition lookup and the allergy filter are separate endpoints. The front end is Turkish and English, built with Next.js.
01
Problem
Recipe sites usually recommend with a 'five more from the same category' rule. That approach needs a new rule for every category and does not capture content similarity. The goal was an engine that recommends by ingredient and cooking-method similarity and updates from user behaviour.
02
Approach
Each recipe's title, ingredients and steps are embedded and kept in a pgvector column. The 'similar recipes' query runs on cosine similarity. I didn't set up a separate vector database; at this scale pgvector is enough and everything stays in one PostgreSQL.
When a user views, saves or likes a recipe, an event is written to Kafka. A consumer service turns those events into the personal feed and the 'popular' list in Redis. When a page opens it just reads a list from Redis; nothing is computed on the request.
Embedding generation and the read path are separate. If the model slows down, the read path is unaffected; a new recipe is simply indexed a little later.
03
Architecture
- Client
- Next.js (TR / EN)
- API
- FastAPI
- Öneri servisi
- Besin değeri
- Event stream
- Kafka
- Etkileşim tüketicisi
- Data
- PostgreSQL + pgvector
- Redis (akış · popüler)
- Embedding işi
04
Key decisions
- 01
pgvector instead of a separate vector database
Instead of running Qdrant or Pinecone I added an extension to PostgreSQL. I can join, there's one backup, one transaction. With millions of rows I would consider a separate vector database; at this scale it was not needed.
- 02
Precompute the popular list
Rather than running a 'most viewed in the last 24 hours' query on every request, the consumer keeps the list fresh all the time. The read side stays simple and fast.
Outcome
The site is live in Turkish and English. Recommendations and the popular list are fed by the Kafka-Redis pipeline, and more than a thousand interaction events have gone through it. The content base is still small; the technical side is ready and growth depends on content.
What I learned
“Setting up an event-driven architecture from the start makes later features cheap. The 'popular' list was added quickly because interaction events were already flowing through Kafka.”
Related projects
- AI / MLOpen source
Mobile Price Classification
Classifying phone price tiers from hardware specifications
A classification study predicting a phone's price tier from hardware specs such as RAM, battery, screen and camera; includes a data-collection script, Jupyter analysis and a containerized prediction service.
- Python
- Pandas
- Scikit-Learn
- Jupyter
- Docker
Open - AI / MLOpen source
Traffic Accident Severity Prediction
Route-risk prediction trained on 100,000+ accident records
Route-risk prediction trained on 100,000+ historical accident records, issuing real-time alerts at 85%+ accuracy using OpenRouteService and weather APIs.
- 100K+
- accident records
- 85%+
- accuracy
- Python
- Scikit-Learn
- XGBoost
- Pandas
- Flask
- React
Open - AI / MLOpen source
Appliances Energy Prediction
Comparing regression models for smart-home energy consumption
Predicting appliance energy use from 19,735 ten-minute readings in the UCI dataset. Random Forest, XGBoost, LightGBM and linear regression were compared; LightGBM led with R² ≈ 0.76.
- 19.735
- sensor rows
- 0.76
- R² (LightGBM)
- Python
- Pandas
- Scikit-Learn
- LightGBM
- XGBoost
- Jupyter
Open
