How Search works

Gateway combines a bundled local index with optional, sourced open-data discovery. It runs without a Gateway backend and does not use generative AI.

Local index

Gateway ships with a local index of real, verified websites. It is loaded directly into your browser and stored in IndexedDB. Local matching and ranking do not require a request; the current bundled index contains 50,000 entries, each on its own domain, and every one was contacted over HTTP when the index was built to confirm the site answers.

Live discovery

For a search, Gateway can ask Wikipedia's public API for matching article extracts and current external links. Wikidata provides structured claims such as release dates, founders, headquarters, and official websites. These requests disclose the searched subject to the public API provider; no full history is sent.

Quick Wiki

Quick Wiki is deterministic, not generative. Gateway recognizes common question patterns, matches a Wikipedia article, reads a relevant Wikidata claim when one exists, and formats the value with its property identifier. If structured data is unavailable, it displays a direct extract and labels that fallback clearly.

Ranking

Every result is scored with one hybrid function, so bundled pages, live Wikipedia articles, official sites and cited web links compete on identical terms:

FinalScore = (BM25_Score × 0.8) + (Authority_Score × 0.2)

Matching is whole-token rather than substring, and common words are removed from the query before scoring.

Safety & Filtering

Every result passes through a safety layer before it reaches you:

Custom index

You can upload your own JSON index via Settings -> Upload Index. The uploaded index replaces the built-in one and persists across page reloads in IndexedDB, allowing you to customise Gateway with your own data.

For a bounded, dependency-free crawl of public pages, use npm run build:web-index. It reads seeds.txt, follows links to the configured depth, respects robots.txt by default, and writes a merged JSON index without an AI model or search API.

Dark Mode

Dark mode is stored in localStorage and applied before the page renders, so there is no white flash. The toggle works instantly and persists across sessions.

Performance

Gateway is designed to be fast without a Gateway server:

Open Source

Gateway is built by XPDevs. The full source is available on GitHub. You can inspect, fork, or self-host it.