devloopsnet/laravel-typesense
Laravel integration for Typesense, the open-source typo-tolerant search engine. Index Eloquent models, run typed queries, and manage collections from your app with an expressive API built for fast, relevant full-text search.
Architecture fit. The package slots into Laravel Scout's pluggable engine contract, which is the correct integration seam: Scout owns model indexing events (Searchable trait), queued import pipelines (scout:import), and the Search facade, while the engine only translates Scout calls into Typesense REST operations. This is architecturally clean — it means adoption does not require touching domain code, only adding the trait and swapping SCOUT_DRIVER. The risk is contract surface: Scout's Engine interface has changed across majors (notably paginate return types, mapIds, keys, and soft-delete handling in Scout 9/10). A third-party engine that pins to one Scout major is a hard gate on framework upgrades.
Integration feasibility. Mechanically straightforward: Composer require, service provider auto-discovery, publish a config file, set SCOUT_DRIVER=typesense plus TYPESENSE_HOST/PORT/PROTOCOL/API_KEY env vars, then scout:import the target models. No database migrations. The real work is not installation but re-indexing existing data and validating schema inference (Typesense infers collection schema from the first indexed document, which is a common source of field-type drift).
Technical risk — high, and driven by adoption signals rather than code. Zero stars, zero dependents, and a zero package score mean there is effectively no external validation, no issue backlog to mine for known failure modes, and no evidence of CI. The critical unanswered question is whether this is a maintained project or a thin fork of the vendor-blessed typesense/laravel-scout-typesense-engine. If it is a fork, we inherit divergence risk with no upstream merge path. There is also unverified compatibility with the Typesense server API version, which does introduce breaking changes.
Key questions to resolve before commitment:
composer.json?Stack fit. Laravel + Scout + Typesense is a well-trodden combination, and Typesense's Algolia-compatible API surface reduces translation risk. Typesense can be self-hosted (Docker, single binary, or 3-node cluster) or consumed via Typesense Cloud, so infrastructure fit is flexible. The engine itself is a thin HTTP client wrapper; there are no exotic runtime dependencies beyond Guzzle and the Typesense PHP SDK.
Migration path. Adopt incrementally rather than as a cutover:
SCOUT_QUEUE=true) before importing production-scale data.Compatibility. Two hard compatibility cliffs: the Scout Engine contract version and the Typesense server API version. Both should be pinned explicitly in composer.json and in infrastructure-as-code. Because the package has no dependents, we cannot infer supported ranges from the ecosystem — we must verify by reading the source and running the index/query path against our exact versions in a spike.
Sequencing. Treat this as a two-phase effort. Phase 1 (spike, ~1–2 days): prove install, schema inference, indexing, and query parity on one model. Phase 2 (productionisation, 1–2 sprints): queue-based indexing, reindex runbook, monitoring, key rotation, and multi-model rollout. Do not sequence Typesense adoption behind other search work; the driver swap is independently reversible.
Maintenance. This is the dominant concern. A zero-star, zero-dependent package has no bus factor beyond the author and no community patch velocity. Realistic options are: (a) fork and vendor it internally with a named owner, (b) budget engineering time to track Scout/Typesense breaking changes ourselves, or (c) benchmark against the official Typesense Scout engine and prefer that unless this package offers a specific capability we need. Choosing (c) is the low-regret default; the burden of proof is on this package.
Support. No vendor SLA, no commercial support, no documented deprecation policy. Any incident response depends on internal Laravel/PHP engineers reading the source. This is acceptable for a non-critical search surface and unacceptable for anything customer-facing without a fallback path.
Scaling. Typesense is memory-resident and index size is bounded by RAM, so capacity planning is about document count × field count, not request volume. Scout's queued indexing is mandatory at scale — synchronous indexing on model save will add Typesense round-trip latency to every write and will amplify failures during bulk operations. Batch sizes for scout:import need tuning; the default chunk size is frequently too large for wide documents. For HA, Typesense requires a 3-node cluster with a search-only and admin key split.
Failure modes to design for:
SCOUT_QUEUE=true.Ramp-up. Low for developers already fluent in Scout — the mental model (Searchable trait, ::search(), scout:import) transfers directly, roughly half a day to productivity. The genuine ramp-up cost is Typesense operations: cluster topology, memory sizing, key management, snapshot/restore, and upgrade procedures. That is a new operational surface for most Laravel teams and should be staffed explicitly rather than absorbed implicitly by the application team.
How can I help you explore Laravel packages today?