Developer builds fully client-side semantic search for 796 pages using no server or AI calls
A developer at artwaste.land built a fully browser-based semantic search engine for their 796-page static website, hosted on Cloudflare, without any server, vector database, or runtime AI model. The system was driven by a strict site rule prohibiting user input from being sent to third parties, which ruled out standard embedding API approaches. Instead of shipping a full transformer model to the browser, the team used a Model2Vec technique — running the model once at build time to produce a static word-vector lookup table distilled from Xenova/all-MiniLM-L6-v2. The entire search engine consists of three static JSON files totalling under 5.4 MB compressed and 401 lines of vanilla JavaScript with no external dependencies. The approach trades some accuracy for zero query-time latency, no per-call costs, and complete user privacy.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in