Build Algolia

KINDAback to the verdict

0%0 of 18 items done

Saved on this device only. Tick prerequisites first, then work the phases in order · do not start one until the checks above it pass.

Instant, typo-tolerant search over your own content without writing a search engine: Meilisearch on a small box behind Caddy, an idempotent indexing script, a search-only key for the browser, and a search box under 5 KB that works without JavaScript too.

estimated effort weekendthe files for this build are in the project pack

EngineMeilisearchIndexerA Node scriptHostingA VPS with a few GB of RAM behind Caddy

Before step 1

Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.

  1. installfree

    Why Everything in this build runs on it: the server, the scripts, the tests.

    Get it Download the LTS installer from nodejs.org, or install with your package manager (brew install node, or nvm install 22). Restart the terminal afterwards. open ↗

    Verify node --version prints v22 or higher

  2. installfree

    Why Every step below is a command you type or a file you edit.

    Get it VS Code (code.visualstudio.com), Cursor or Zed. Open a folder for the project and use the editor's built-in terminal. open ↗

    Verify You can open a folder and run a command in its terminal

  3. installfree

    Why History for your code, and the way most hosts deploy.

    Get it Install from git-scm.com or with your package manager, then run git init in the project folder once it exists. open ↗

    Verify git --version prints a version

  4. about $6 to $12 a month

    Why Meilisearch holds the index in memory.

    Get it Hetzner CX22 or similar, Ubuntu 24.04. open ↗

  5. installfree

    Why The engine.

    Get it curl -L https://install.meilisearch.com | sh, or the Docker image getmeili/meilisearch. open ↗

    Verify meilisearch --version prints

  6. have readyfree

    Why The indexer reads it.

    Get it Markdown files, a JSON export, or a database connection string.

  7. roughly $10 a year, or free on an existing domain

    Why search.yourdomain.com for the API.

    Get it Register at Cloudflare Registrar, Porkbun or Namecheap, or use a subdomain of one you already own. You add one DNS record in the deploy phase. open ↗

  8. installfree

    Why Automatic HTTPS in front of the Node process. Without TLS the browser features this relies on (and your visitors' trust) do not work.

    Get it On the VPS: follow the install steps at caddyserver.com/docs/install for Ubuntu. One Caddyfile with your domain and a reverse_proxy line is the whole config. open ↗

    Verify caddy version prints a version on the server

Environment variables

These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.

VariableNeededExampleWhere the value comes from
MEILI_MASTER_KEYsecretrequiredlong-randomopenssl rand -base64 32; admin key, server-side only.
MEILI_URLrequiredhttps://search.yourdomain.comPublic API address behind Caddy.
MEILI_SEARCH_KEYoptional...Generated in Phase 3; safe for the browser.
CONTENT_DIRrequired./contentWhere the indexer reads from.

The build, in order

  1. Run it

    Meilisearch bound to localhost with a master key, Caddy in front.

    1. terminal
      meilisearch --master-key $MEILI_MASTER_KEY --http-addr 127.0.0.1:7700
    2. Files Caddyfile

    done when · tick each as it passes
  2. Index

    Documents with id, title, url, body and tags; idempotent.

    1. terminal
      mkdir search-index && cd search-index && git init && npm init -y && npm pkg set type=module && npm install meilisearch@0.4
      mkdir -p content && cp .env.example .env
    done when · tick each as it passes
  3. Keys

    A search-only key for the browser; the master key never leaves the server.

    done when · tick each as it passes
  4. The box

    Results as you type, highlighted, keyboard-driven, under 5 KB, degrades to a form.

    done when · tick each as it passes
  5. Operate

    Service, snapshots, reindex on deploy.

    1. Files README.md

    done when · tick each as it passes
what this build does not replace
after v1, if you want it

Need the files? The project pack on the verdict page hands your agent the whole brief · more ai search.