Product Roadmap
Search
Meilisearch — implemented; remaining polish and UX improvements
Status: implemented
Meilisearch is live — SearchService in apps/back indexes products, with reindexAll as the recovery hatch. What remains below is operational hardening (tracked in Operations §7) and UX polish.
Why Meilisearch (decision record)
| Criteria | Meilisearch | Elasticsearch |
|---|---|---|
| Setup | Single binary, zero config | JVM, cluster management |
| RAM | ~50MB for 50k docs | 1–2GB minimum |
| Typo tolerance | Built-in, excellent | Plugin required |
| Latency | <50ms | ~100–200ms |
| Best for | <10M documents | >10M documents |
For 5k–50k products, Meilisearch is the clear winner.
Operational rules (enforce — see plan)
- Every product mutation path updates the index (create/update/delete/updateSpecs/import) — audit
ProductsServiceand the scraper import path. MEILISEARCH_API_KEYrequired in production (env.config.tsshould enforce it likeJWT_SECRET).- Deals search stays Postgres-
ILIKEfor now (fine at current volume). When deal volume justifies it, index deals through the sameSearchServicerather than a second client. - Fallback: if Meilisearch is down, fall back to a PostgreSQL
ILIKEquery.
Remaining UX improvements
- Instant search-as-you-type in the header search bar (replace the 300ms debounced query) with highlighted matching text.
- Search suggestions / autocomplete dropdown.
- Faceted category counts in the product browse page ("Frame (42)", "Motor (89)") — Meilisearch facets are built-in.
- Frontend integration choice: direct Meilisearch access with a search-only key is fastest (<20ms, supports CORS + tenant tokens); the backend proxy adds latency but centralizes auth/logging. Direct-with-search-key is the recommendation if/when instant search ships.
Later
- Index deals in a separate Meilisearch index (same
SearchService), enabling typo-tolerant deal search and facets over condition/price. - Public price-history data joined into search results once the scraper price history exists.