Skip to content

← Back to standards

Algolia

Algolia is our hosted search layer for fast, typo-tolerant lookup over documents and knowledge bases—not a database replacement, but the index users query in the UI.

APIs sync data into Algolia; front-ends use search-only keys. Standards here are still developing.


UsePlain English
Knowledge / document searchAPIs index content after create/update/delete (e.g. Atlas knowledge base)
Admin and portal UIsReact apps call Algolia from the browser with a search-only key
Index configurationOne-time or scripted setup for index settings and replicas

Not every repo uses Algolia—check each project’s .env.example before assuming these secrets exist.

Set with fly secrets set on each tier’s app—same as other runtime secrets on the Fly checklist.

SecretPurpose
ALGOLIA_APP_IDAlgolia application ID
ALGOLIA_ADMIN_API_KEYServer-side index/write access—never ship to the browser
ALGOLIA_INDEX_NAMEIndex name for that product (e.g. knowledge_base)

The admin API key can modify indexes and records. Keep it on the API only.

Admin and static apps often use Vite-prefixed variables at build time (Cloudflare Pages, etc.)—not GitHub Actions deploy secrets for Fly APIs:

VariablePurpose
VITE_ALGOLIA_APP_IDSame app ID, safe to expose in the client bundle
VITE_ALGOLIA_SEARCH_API_KEY or VITE_ALGOLIA_SEARCH_KEYSearch-only key for in-browser queries
VITE_ALGOLIA_INDEX_NAMEIndex the UI searches

Use Algolia’s search-only API key in front-ends. Do not put ALGOLIA_ADMIN_API_KEY in a VITE_* variable.

  • Prefer separate indexes or API keys per tier (staging / UAT / production) where product policy requires it—do not point staging UIs at production indexes by mistake.
  • Align index names with Naming conventions (repo name + tier when you split indexes).

Algolia admin and search keys are app-specific secrets on the Rotation inventory—priority and schedule TBD. Rotating the admin key requires updating Fly secrets and redeploying APIs that sync to Algolia; rotating search keys requires rebuilding front-end apps that embed them.