🚀
Full Typesense API Support
Complete TypeScript API client auto-generated from Typesense OpenAPI spec with all endpoints available.
A powerful Nuxt module for integrating Typesense - a lightning-fast, typo-tolerant search engine
Install the module:
pnpm add @sfxcode/nuxt-typesensenpm install @sfxcode/nuxt-typesenseyarn add @sfxcode/nuxt-typesenseAdd it to your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@sfxcode/nuxt-typesense'],
typesense: {
url: process.env.TYPESENSE_URL,
apiKey: process.env.TYPESENSE_API_KEY,
}
})Start using it in your components:
<script setup lang="ts">
const { collectionsApi, documentsApi } = useTypesenseApi()
// Get collections
const collections = await collectionsApi.getCollections()
// Search documents
const results = await documentsApi.multiSearch({
searches: [{
collection: 'products',
q: 'laptop',
queryBy: 'name,description'
}]
})
</script>