diff --git a/docs/specs/2026-05-19-typeahead-search-design.md b/docs/specs/2026-05-19-typeahead-search-design.md new file mode 100644 index 0000000..06f7efe --- /dev/null +++ b/docs/specs/2026-05-19-typeahead-search-design.md @@ -0,0 +1,154 @@ +# Type-Ahead Search for Roux + +Date: 2026-05-19 + +## Overview + +Add a search box to the recipe index page that filters recipes by title or filename as the user types. The index page will be client-rendered from embedded JSON data, with progressive enhancement via a small vanilla JS script. + +## Motivation + +As the recipe collection grows, finding a recipe by scanning an alphabetical list becomes tedious. A type-ahead search box provides instant filtering with no page reloads. + +## Scale Assumption + +The recipe collection is assumed to be small — hundreds, at most ~1000 recipes. All data is embedded in the page at load time. No pagination or server-side search queries are needed. + +## Architecture + +### Data flow + +1. **Server** (Haskell / `Html.hs`) renders the index page shell — navbar, search `` element, and two JSON blobs in `