Typesense Webshop
Description
Typesense Webshop connects Enso webshop browsing to Typesense.
When the host application runs with scout.driver=typesense and Typesense is enabled, the package replaces the default webshop product and category filter services, swaps the sorting enum, uses the host application's Scout Typesense model settings, and reacts to EAV attribute updates so facets stay aligned with the product catalog.
Installation
This is a proprietary package distributed through the private Enso registry.
Make sure the host application already has:
laravel-enso/typesenselaravel-enso/webshop- indexed products in Typesense
No extra routes are published by this package.
The host application must declare the product collection schema and search parameters in config/scout.php, for example:
use LaravelEnso\Products\Models\Product as SearchableProduct;
use LaravelEnso\Products\Services\Search\SearchableAttributes;
use LaravelEnso\TypesenseWebshop\Services\Schema;
'typesense' => [
// ...
'model-settings' => [
SearchableProduct::class => [
'collection-schema' => array_merge(
['name' => 'solarlink-products'],
(new Schema())->build(),
),
'search-parameters' => [
'query_by' => implode(',', SearchableAttributes::get()),
],
],
],
],
Features
- Deferred service bindings for webshop product filters, category filters, and sorts.
- Automatic fallback to core database filters when Typesense is disabled.
- Schema builder for searchable product collections.
- Typo-tolerance helper used by webshop search requests.
- EAV observer integration for facet/schema synchronization.
Usage
The package activates automatically when:
config('scout.driver') === 'typesense'LaravelEnso\Typesense\Models\Settings::enabled()returnstrue
Main extension points:
Services\Filters\ProductServices\Filters\CategoryEnums\SortsServices\SchemaServices\TypoTolerance
The package no longer registers dynamic model methods for Scout hooks. Keep collection schema and search parameters explicit in the host application's Scout config.
API
This package exposes its backend integration through the routes, controllers, services, jobs, and configuration points referenced in the usage examples above.
Consumers should rely on the published config keys, documented route groups, and explicit service classes shown in the examples. Internal helper classes, listeners, casts, and background jobs are implementation details unless the README calls them out as extension points.
Depends On
Required Enso packages:
laravel-enso/core↗laravel-enso/typesense↗laravel-enso/categories↗laravel-enso/companies↗laravel-enso/eav↗laravel-enso/enums↗laravel-enso/helpers↗laravel-enso/product-eav↗laravel-enso/webshop↗
External service dependency:
- Typesense search engine used as the webshop query and faceting backend
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!