Smart Living
Deterministic recipe recommendations from leftover ingredients: FastAPI engine, Next.js demo, 719 automated tests.
- FastAPI
- Python
- Next.js
- TypeScript
- Docker
- pytest
- Playwright

Overview
Deterministic recipe recommendations from leftover ingredients: FastAPI engine, Next.js demo, 719 automated tests.
Problem
Home cooks waste food and money because recipe sites work backwards: pick a dish, then hand you a shopping list. The real need is the reverse: start from ingredients already in the fridge.
Solution
API-first platform: type what you have, get recipes ranked by match percentage with missing ingredients listed. Deterministic pipeline (normalization, scoring, ranking) plus a Next.js demo as one client of the API.
Technology
- FastAPI
- Python
- Next.js
- TypeScript
- Docker
- pytest
- Playwright
Implementation
Layered backend (routes, schemas, services, framework-free domain, repositories) with AST-enforced architecture boundaries and contract-delta tests guarding three product decisions: staple-ingredient exclusion, unknown-ingredient passthrough, and transparent normalization. Five CI jobs (dataset, api, web, docker, e2e); web and API deployed as two Vercel projects from one repo.
Result
518 backend plus 201 frontend tests with a 100% coverage gate, p50 1.1 ms recommendation latency, and 60 curated Indonesian recipes with explainable match percentages.