{"id":31465539,"url":"https://github.com/rubix-studios-pty-ltd/payload-typesense","last_synced_at":"2026-05-26T17:01:14.257Z","repository":{"id":317289153,"uuid":"1066776166","full_name":"rubix-studios-pty-ltd/payload-typesense","owner":"rubix-studios-pty-ltd","description":"A production-ready search plugin that integrates Typesense with Payload CMS, offering fast, typo-tolerant search with real-time synchronization.","archived":false,"fork":false,"pushed_at":"2026-05-22T16:53:00.000Z","size":924,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-22T20:28:22.090Z","etag":null,"topics":["payload","payload-plugin","payloadcms","payloadcms-3","payloadcms-v3","plugin","search","search-engine","typescript","typesense"],"latest_commit_sha":null,"homepage":"https://rubixstudios.com.au/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubix-studios-pty-ltd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"rubixvi","buy_me_a_coffee":"rubixstudios"}},"created_at":"2025-09-30T00:21:44.000Z","updated_at":"2026-05-22T16:53:02.000Z","dependencies_parsed_at":"2026-03-11T20:04:16.502Z","dependency_job_id":null,"html_url":"https://github.com/rubix-studios-pty-ltd/payload-typesense","commit_stats":null,"previous_names":["rubix-studios-pty-ltd/payload-typesense"],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/rubix-studios-pty-ltd/payload-typesense","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-typesense","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-typesense/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-typesense/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-typesense/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubix-studios-pty-ltd","download_url":"https://codeload.github.com/rubix-studios-pty-ltd/payload-typesense/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-typesense/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33525966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["payload","payload-plugin","payloadcms","payloadcms-3","payloadcms-v3","plugin","search","search-engine","typescript","typesense"],"created_at":"2025-10-01T17:31:58.891Z","updated_at":"2026-05-26T17:01:14.250Z","avatar_url":"https://github.com/rubix-studios-pty-ltd.png","language":"TypeScript","funding_links":["https://github.com/sponsors/rubixvi","https://buymeacoffee.com/rubixstudios"],"categories":[],"sub_categories":[],"readme":"# PayloadCMS + Typesense Plugin\n\nForked from FrontTribe’s Typesense Search Plugin, Rubix Studios implementation has been substantially re-engineered to meet stricter production, deployment, and TypeScript standards. The codebase has been streamlined for improved maintainability, enhanced type safety, and predictable behaviour under load, while preserving full compatibility with Payload CMS and Typesense.\n\nThe fork introduces meaningful architectural improvements, including more efficient caching strategies with race-condition mitigation, improved request handling, and deployment-safe defaults. The result is a lighter, more resilient integration.\n\nWith a modular, tree-shakable structure and optional support for advanced search capabilities such as vector-based querying, the plugin is designed to scale from simple content search implementations to more complex, search-driven applications without unnecessary bloat.\n\nThis project is actively maintained by Rubix Studios and is intended for production environments where performance, stability, and code quality are critical.\n\n[![install size](https://packagephobia.com/badge?p=@rubixstudios/payload-typesense)](https://packagephobia.com/result?p=@rubixstudios/payload-typesense)\n**PayloadCMS + Typesense Plugin**\n\n[![install size](https://packagephobia.com/badge?p=typesense-search-plugin)](https://packagephobia.com/result?p=typesense-search-plugin)\n**FrontTribe's Typesense Search Plugin**\n\n[![npm version](https://img.shields.io/npm/v/@rubixstudios/payload-typesense.svg)](https://www.npmjs.com/package/@rubixstudios/payload-typesense)\n![Release](https://github.com/rubix-studios-pty-ltd/payload-typesense/actions/workflows/release.yml/badge.svg)\n\n## Installation\n\n```sh\npnpm add @rubixstudios/payload-typesense\n```\n\n```typescript\n// payload.config.ts\nimport { buildConfig } from 'payload/config'\nimport { typesenseSearch } from '@rubixstudios/payload-typesense'\n\nexport default buildConfig({\n  plugins: [\n    typesenseSearch({\n      typesense: {\n        apiKey: 'xyz',\n        nodes: [\n          {\n            host: 'localhost',\n            port: 8108,\n            protocol: 'http',\n          },\n        ],\n      },\n      collections: {\n        posts: {\n          enabled: true,\n          searchFields: ['title', 'content'],\n          facetFields: ['category', 'status'],\n          displayName: 'Blog Posts',\n          icon: '📝',\n          syncLimit: 500, // Overrides the default sync limit of 1000\n        },\n      },\n      // This feature is experimental\n      vectorSearch: {\n        enabled: true, // Enables vector-based semantic search\n        embedFrom: ['title', 'content'], // Omit to fall back to collection searchFields\n        embeddingModel: 'azure/text-embedding-ada-002',\n        modelConfig: {\n          api_key: 'your-api-key',\n          url: 'https://modelendpoint.com/openai',\n        },\n    }),\n  ],\n})\n```\n\n```tsx\nimport { HeadlessSearchInput } from '@rubixstudios/payload-typesense'\n\nexport function GlobalSearchPage() {\n  return (\n    \u003cHeadlessSearchInput\n      baseUrl=\"http://localhost:3000\"\n      theme=\"modern\" // Available themes: \"modern\" | \"dark\"\n      placeholder=\"Search everything...\"\n      onResultClick={(result) =\u003e {\n        console.log('Selected document:', result.document)\n      }}\n    /\u003e\n  )\n}\n\nexport function CollectionSearch() {\n  return (\n    \u003cHeadlessSearchInput\n      baseUrl=\"http://localhost:3000\"\n      collections={['posts', 'products']}\n      placeholder=\"Search posts and products...\"\n      onResultClick={(result) =\u003e {\n        console.log('Selected document:', result.document)\n      }}\n    /\u003e\n  )\n}\n\nexport function VectorSearch() {\n  return (\n    \u003cHeadlessSearchInput\n      baseUrl=\"http://localhost:3000\"\n      vector={true} // Vector search enabled\n      collections={['posts', 'products']}\n      placeholder=\"Search posts and products...\"\n      onResultClick={(result) =\u003e {\n        console.log('Selected document:', result.document)\n      }}\n    /\u003e\n  )\n}\n```\n\n## Features\n\n- **Performance**  \n  Sub-millisecond search responses with optimized request handling.\n- **Flexible Search**  \n  Single-collection, multi-collection, or universal search using one component.\n- **Vector Search**  \n  Optional semantic search using embeddings, with graceful fallback to keyword search.\n- **Modern UI**  \n  Headless, responsive implementation compatible with Tailwind CSS.\n- **Real-Time Synchronisation**  \n  Continuous indexing and sync with Payload CMS.\n- **Efficient Caching**  \n  In-memory caching with configurable TTL and race-condition safeguards.\n- **Production Ready**  \n  Robust error handling, deployment-safe defaults, and platform compatibility.\n- **Tree-Shakable Architecture**  \n  Modular design enabling smaller bundles and selective feature usage.\n\n## Endpoints\n\n- `GET /api/search` - Universal search across all collections\n- `GET /api/search/{collection}` - Search specific collection\n- `POST /api/search/{collection}` - Advanced search with filters\n- `GET /api/search/{collection}/suggest` - Search suggestions\n- `GET /api/search/collections` - Collection metadata\n- `GET /api/search/health` - Health check\n\n## Components\n\n- **HeadlessSearchInput**: Single component supporting all search patterns:\n- **Collections**: `collections={['posts', 'products']}` - Smart filtering with universal search\n- **Universal Search**: No collection props - Search across all collections\n- **Complete UI Control**: Customizable rendering with comprehensive theme system\n\n## Themes\n\nThe plugin includes a powerful theme system with 2 pre-built themes and unlimited customization:\n\n### Pre-built\n\n```tsx\n// Modern theme (default)\n\u003cHeadlessSearchInput theme=\"modern\" /\u003e\n\n// Dark theme\n\u003cHeadlessSearchInput theme=\"dark\" /\u003e\n```\n\n### Custom\n\n```tsx\nconst customTheme = {\n  theme: 'modern',\n  colors: {\n    inputBorderFocus: '#10b981',\n    inputBackground: '#f0fdf4',\n    resultsBackground: '#f0fdf4',\n  },\n  spacing: {\n    inputPadding: '1rem 1.25rem',\n    inputBorderRadius: '1.5rem',\n  },\n  enableAnimations: true,\n  enableShadows: true,\n}\n\n\u003cHeadlessSearchInput theme={customTheme} /\u003e\n```\n\n### Theme Features\n\n- **2 Pre-built Themes**: Modern, Dark\n- **Unlimited Customization**: Override any color, spacing, typography, or animation\n- **Performance Options**: Disable animations/shadows for better performance\n- **Responsive Design**: Automatic mobile optimization\n- **CSS Variables**: Advanced styling with CSS custom properties\n- **TypeScript Support**: Full type safety for all theme configurations\n\n## Production\n\n- **Race Condition Protection**: `ensureCollection` prevents startup crashes\n- **Type Safety**: Proper Payload CMS types prevent runtime errors\n- **Document Validation**: Filters malformed data before sync\n- **Graceful Degradation**: Silent failures don't break Payload operations\n\n## Developer\n\n- **Smaller Components**: Easier to understand and maintain\n- **Maintainable**: Single Responsibility Principle enforced\n- **Well-Documented**: Clear separation of concerns\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support or inquiries:\n\n- LinkedIn: [rubixvi](https://www.linkedin.com/in/rubixvi/)\n- Website: [Rubix Studios](https://rubixstudios.com.au)\n\n## Author\n\nRubix Studios  \n[https://rubixstudios.com.au](https://rubixstudios.com.au)\n\n## Acknowledgments\n\n- [FrontTribe](https://github.com/FrontTribe/typesense-search)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubix-studios-pty-ltd%2Fpayload-typesense","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubix-studios-pty-ltd%2Fpayload-typesense","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubix-studios-pty-ltd%2Fpayload-typesense/lists"}