@juadariasmar/strapi-plugin-typesense
v1.0.0
Published
Typesense full-text, vector, and hybrid search integration for Strapi 5
Readme
⚡ Features
- 🔍 Full-Text Keyword Search: Lightning fast indexing & search powered by Typesense.
- 🧠 Vector & Semantic Search: Native vector search support for AI embeddings (
float[]). - 🔀 Hybrid Search: Combine keyword relevance (
q) and vector similarity (vector_query) seamlessly. - 🤖 Auto-Embeddings: Built-in support for Typesense auto-embedding models (e.g.
ts/all-MiniLM-L6-v2). - 🔄 Real-Time Lifecycle Sync: Automatic indexing on entry creation, update, and deletion in Strapi 5.
- 🎨 Admin UI Dashboard: Built with
@strapi/design-systemfor status monitoring and collection mapping. - 🔐 Secure Proxy Endpoint: Public
/api/typesense/searchendpoint without exposing admin API keys.
📦 Installation
In your Strapi v5 project:
npm install strapi-plugin-typesense
# or
yarn add strapi-plugin-typesense⚙️ Configuration
Enable and configure the plugin in config/plugins.js or config/plugins.ts:
module.exports = ({ env }) => ({
typesense: {
enabled: true,
config: {
apiKey: env("TYPESENSE_API_KEY"),
nodes: [
{
host: env("TYPESENSE_HOST", "localhost"),
port: env.int("TYPESENSE_PORT", 8108),
protocol: env("TYPESENSE_PROTOCOL", "http"),
},
],
collections: {
"api::article.article": {
name: "articles",
facets: ["category"],
vectorField: {
name: "embedding",
numDim: 384,
autoEmbed: true,
embedFrom: ["title", "content"],
modelName: "ts/all-MiniLM-L6-v2",
},
},
},
},
},
});🌐 Public Search API
The plugin exposes a secure content API endpoint at GET /api/typesense/search:
curl -X GET "http://localhost:1337/api/typesense/search?collection=articles&q=strapi"Hybrid Search Example
curl -X GET "http://localhost:1337/api/typesense/search?collection=articles&q=strapi&vector_query=embedding:([0.12,0.45,...],k:10)"🚀 Publishing to NPM & Strapi Marketplace
1. Build and Verify Package
npm run build
npm run verify2. Commit & Push
git add .
git commit -m "feat: initial release of strapi-plugin-typesense for Strapi 5"
git push origin main3. Publish to NPM
npm login
npm publish --access public4. Submit to Strapi Marketplace
Visit Strapi Marketplace Submission and submit your repository:
- Package Name:
strapi-plugin-typesense - Repository:
https://github.com/cartulina/strapi-plugin-typesense
📄 License
MIT © Juan David Arias
