| name | algolia-deploy-integration |
| description | Deploy Algolia-powered apps to Vercel, Fly.io, and Cloud Run with proper
API key management and InstantSearch frontend integration.
Trigger: "deploy algolia", "algolia Vercel", "algolia production deploy",
"algolia Cloud Run", "algolia Fly.io", "algolia InstantSearch".
|
| allowed-tools | Read, Write, Edit, Bash(vercel:*), Bash(fly:*), Bash(gcloud:*), Bash(npm:*) |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","search","algolia"] |
| compatibility | Designed for Claude Code |
Algolia Deploy Integration
Overview
Deploy Algolia-powered applications to production platforms with proper API key separation (Admin on backend, Search-Only on frontend) and InstantSearch widget integration.
Prerequisites
- Algolia App ID + Admin key (backend) + Search-Only key (frontend)
- Platform CLI installed (vercel, fly, or gcloud)
algoliasearch v5 for backend, react-instantsearch or instantsearch.js for frontend
Instructions
Step 1: Backend API Key Configuration
Vercel
vercel env add ALGOLIA_APP_ID production
vercel env add ALGOLIA_ADMIN_KEY production
vercel env add ALGOLIA_SEARCH_KEY production
vercel env add NEXT_PUBLIC_ALGOLIA_APP_ID production
vercel env add NEXT_PUBLIC_ALGOLIA_SEARCH_KEY production
Fly.io
fly secrets set \
ALGOLIA_APP_ID=YourApplicationID \
ALGOLIA_ADMIN_KEY=your_admin_key \
ALGOLIA_SEARCH_KEY=your_search_key
Google Cloud Run
echo -n "your_admin_key" | gcloud secrets create algolia-admin-key --data-file=-
echo -n "your_search_key" | gcloud secrets create algolia-search-key --data-file=-
gcloud run deploy search-service \
--image gcr.io/$PROJECT_ID/search-service \
--set-secrets=ALGOLIA_ADMIN_KEY=algolia-admin-key:latest,ALGOLIA_SEARCH_KEY=algolia-search-key:latest \
--region us-central1
Step 2: Backend Search API (Next.js API Route)
import { algoliasearch } ;
{ , } ;
client = (
process..!,
process..!
);
() {
query = request...() || ;
page = (request...() || );
{ hits, nbHits, nbPages } = client.({
: ,
: {
query,
: ,
page,
: [, , , ],
: [],
},
});
.({ hits, : nbHits, : nbPages, page });
}