Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Typesense Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Which Scout major(s) and Laravel/PHP versions are supported, and is that pinned in composer.json?
  • Is this a fork of the official Typesense engine? If so, what was changed and why not contribute upstream?
  • Which Typesense server versions are validated against?
  • Are soft deletes, custom collection schemas, geo search, synonyms, curation/overrides, and multi-search supported, or silently dropped?
  • Is there a test suite and CI, and does it run against a live Typesense container?
  • Who maintains it, and what is the release cadence over the last 12 months?

Integration Approach

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:

  1. Install the package and publish config in a non-production branch.
  2. Point at a staging Typesense instance and index a single low-risk model.
  3. Validate query parity against the current search implementation (result relevance, pagination, filtering, sorting) with a fixed golden-query set.
  4. Enable queue-based indexing (SCOUT_QUEUE=true) before importing production-scale data.
  5. Roll out model-by-model behind the driver switch, keeping the previous driver (database or Algolia) as a config-level fallback.

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.

Operational Impact

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:

  • Typesense unavailable: reads fail. Writes should not — with queued indexing, writes succeed and the queue drains on recovery. Without a queue, model saves fail alongside search. This alone justifies SCOUT_QUEUE=true.
  • Schema drift: adding or retyping a model field after initial indexing is silently ignored by Typesense until the collection is dropped and recreated. Requires a reindex runbook.
  • Index drift: partial import failures leave collections inconsistent with the database; needs a reconciliation job and an index-health check.
  • API key exposure: admin key in env is a full-index compromise; enforce search-only keys for read paths.
  • Reindex downtime: full reimports on large datasets are slow and, without alias swapping, visible to users. Confirm whether the engine supports collection aliases.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect