How Findish is built
The About page explains it as a small search engine: collect, index, search. This is the technical version, with links into the code.
The numbers
- Recipes
- 6,031
- Videos
- 5,700
- Creators
- 9
- Search server
- none
Collect, index, search
- A polite crawler.
crawler/crawl.mjsruns every Monday on GitHub Actions. It reads each site's robots.txt and follows it, reads the sitemap, and fetches only pages that are new or changed, one at a time, seconds apart. It keeps the recipe data sites publish for search engines (name, link, photo link, ingredients, time, cuisine) and never the method or the writing around it. - Newsletters through their feeds only. One RSS request per run; a post is kept only if it has a run of ingredient lines with amounts and a sign it's a recipe. Videos come from the official YouTube Data API.
- One index.
scripts/build-index.mjspacks it all intoindex.json, matching every ingredient line to KitchenCatalog, the grocery list the food projects share, so "scallions" and "green onions" are one thing. It also sorts each recipe into a course (scripts/course.mjs): sites label courses about 185 ways, so their labels fold into nine plain ones, a clear dish name decides when there's no label, and anything unclear stays unlabeled rather than guessed. Each recipe also keeps the day the crawler first found it, which is how "New this week" knows what's new. If the index comes out with far fewer recipes or videos than the last crawl counted, or with one of its sites or channels missing, the build stops and the site keeps the one it has. - No search server. The browser downloads the index and searches it locally. Its copy is packed smaller (
src/lib/index-format.mjs) and comes in two files: the recipes first, about 290 kilobytes as sent, so search works about two and a half seconds into a slow phone connection, then the videos, about 170 kilobytes. Each file is named after what's in it, so your browser keeps it and downloads it again only after a crawl changes it. Unpacked, it's exactlyindex.json, which feeds the MCP server (src/pages/mcp.ts) and the Grocery Deals lookup (api/with.ts), the only parts that run on the server.
How results are ranked
A word in a recipe's name counts most, and more when the name is little else: search mapo tofu
and the recipes called exactly that come before Spicy Mapo Tofu Noodle Soup
. A word found only in a recipe's keywords, cuisine or ingredients counts for much less. Sauces, drinks and how-to pages sit lower unless you ask for one (dumpling sauce
), so a search for dumplings starts with dumplings. With two or more ingredient tags and no words, the recipes that use the most of them come first, then the ones that need the fewest other things. Ties go to a recipe with a photo, then the one opened more, then the name. The popularity boost comes from a daily count of how often each recipe was opened in the last 90 days: counts only, nothing about who. It is small, and smaller still for a recipe that only matched by a keyword.
Before any of that, the words are tidied. Plurals and spellings that mean the same thing are one word (cookie and cookies, chili and chilli, lasagne and lasagna). A word the index has never seen is swapped for the closest one that finds something, two words are joined or one split when that is how the recipes write it (pot sticker
, stirfry
), and a fix that would find nothing is not made. Names in Chinese, Japanese, Korean and Thai are matched as written.
All of this is one file, src/lib/search-core.mjs, which the page, the server for AI assistants and Ask all run, so the three find and rank the same way. A fixture of everyday dish searches (src/lib/ranking.test.mjs) checks the top of each list on every change.
Choices worth knowing
- Small on purpose. A hand-picked list of cooks instead of the web means the whole index fits in a browser, so there's nothing to run, pay for or log.
- Photos from the source. Recipe photos load straight from each creator's site, with no referrer. A photo shared by five or more recipes is a site's stand-in, so it's dropped.
- Pantry data never comes here. The Grocery Deals lookup sends a few catalog ids, never typed text, and nothing is logged or cached.
The stack
- Site: Astro on its own Cloudflare Worker; the pages and index are static files.
- Crawler: Node on GitHub Actions, weekly, committing results that redeploy the site.
- MCP: Cloudflare's Agents SDK with the MCP SDK, stateless, two read-only tools.
- How I work: the principles every project follows are in how I build.