Skip to content

About

Example apps for Headband: Next.js, browser JS, Node, Python, Drizzle sync, connectors, multi-engine and A/B testing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Headband examples

Small, runnable apps that use Headband the way the docs describe (https://headband.dev/docs/integrate). Each folder has its own README with the exact commands and the output to expect.

Folder What it shows
nextjs/ Next.js 16 App Router search page with @headband/react 0.1.1
browser-js/ A plain HTML page that calls /v1/search with fetch(), no build
node-backend/ Node with plain fetch: index, settings, documents, search, a proxy
python-backend/ The same in Python, standard library only
drizzle-sync/ Postgres + Drizzle kept in sync with @headband/sync and the CLI
connectors/ Scripts that copy Postgres, MySQL, Shopify or Stripe records into an index
multi-engine/ The same data on four engines, equivalent settings, results side by side
ab-test/ An A/B test between two engines: assignment, tagged searches, events

Keys

Every example needs keys from your Headband project (the project's Keys tab):

  • an admin key (hb_adm_...) for creating indexes and writing documents. It stays on your machine or server, in a .env file that is gitignored.
  • a search key (hb_src_...) for searching. It is the only key that may appear in browser code.

The examples create an index called products by default (set HEADBAND_INDEX, or NEXT_PUBLIC_HEADBAND_INDEX in the Next.js app, to use another name) and delete it when they finish, or tell you the command that does.

About

Example apps for Headband: Next.js, browser JS, Node, Python, Drizzle sync, connectors, multi-engine and A/B testing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages