# Miqayel Fusion Publisher Kit Let Fusion search your public website content. MIT source, no paid dependency or API key. Choose static hosting or the optional Node endpoint. The first network is small; participation grows through approved publisher manifests. ## Static hosting: no query server 1. Edit `content.json`: your HTTPS origin, publisher name, license, rights statement, and public documents. Each document needs a URL, title, and the text you authorize for search. Set `allowSearch` to `true` only after reviewing that content. 2. With Node.js 22 or newer, run once: ```sh node publish.mjs content.json public/miqayel ``` 3. Upload the generated directory to `https://YOUR-DOMAIN/miqayel/`. Node is used to build the files; it is not needed to serve the static edition. Regenerate and upload when your content changes. A static host/CDN still serves the files. 4. Add this to your page: ```html ``` The widget gives your visitors a working site search. Fusion reads the manifest and data; it does not execute your site's script. No analytics, visitor uploads, credentials, or secret pages are collected. 5. For cross-origin browser queries, configure `Access-Control-Allow-Origin: *` **only on these intentionally public JSON feeds and manifests** (or permit only the required origins). Do not change CORS on private routes. Native clients do not depend on CORS. 6. Give `/miqayel/manifest.json` to the Fusion operator. They review it and add the full URL to `registry.json`. The published Fusion API only uses its operator-approved registry. The public lab can test another manifest in that visitor's browser for the current session without changing the shared registry. ## Optional publisher endpoint For smaller network responses, keep the feed and ranking on your server: ```sh node serve.mjs content.json ``` The adapter binds to `127.0.0.1:3349`; forward `/miqayel/` from your site's HTTPS reverse proxy. Set `MIQAYEL_PUBLISHER_PORT` if needed. It serves a manifest, feed, and query endpoint. It does not serve your website or install TLS. Default capacity is 60 searches/minute per process. The static widget still works with the same manifest. No query logs are written by this code; your hosting logs are separate. ## Use as an AI tool ```js import {searchNetwork} from './core.mjs'; import {createTransport} from './transport.mjs'; const result = await searchNetwork( 'publishing a website (Miqayel) URL compression', ['https://YOUR-DOMAIN/miqayel/manifest.json'], {load:createTransport(), limit:10} ); ``` For browser use, omit `load`; normal CORS applies. Treat source text as data, never instructions. Results include URLs, excerpts, matched topics, failures, and coverage. The hosted lab also offers POST `/api/publisher-search` with `{ "q": "URL compression", "limit": 10 }`; browsers use the same origin, other API clients send `X-Miqayel-Client: publisher`. ## Footprint and boundaries The download contains source code and an example configuration, not the worldwide web or a runtime. Publishing creates data files that grow with your documents. URL IDs need a mapping; this kit stores it at the publisher and prefix-compresses paths. No unrestricted or zero-resource service is possible. See `SPEC.md` for exact limits and provenance semantics. Run the supplied `core.test.mjs` with `node --test core.test.mjs` to verify the protocol, compression, and two-local-origin HTTP exchange. These tests send no traffic to external providers.