jelte-ten-holt / in-other-shops
Modular e-commerce domain packages for Laravel
Requires
- php: ^8.3
- filament/filament: ^5.0
- laravel/framework: ^12.0 || ^13.0
- opgginc/laravel-mcp-server: ^2.0
Requires (Dev)
- laravel/passport: ^13.0
- mockery/mockery: ^1.6
- orchestra/testbench: ^10.0 || ^11.0
- phpunit/phpunit: ^11.0 || ^12.0
Suggests
- laravel/passport: Required when agent.auth.oauth.enabled is true — powers the Passport authorization server that backs the MCP connector's OAuth flow (^13.0).
- stripe/stripe-php: Install to enable the Stripe payment gateway driver (^15.0 || ^16.0).
This package is auto-updated.
Last update: 2026-04-24 11:02:59 UTC
README
Modular e-commerce domain packages for Laravel 12+.
Installation
composer require jelte-ten-holt/in-other-shops
Service providers are auto-discovered via Laravel's package discovery.
Domains
Each domain under src/ is a self-contained package with its own service provider, migrations, config, contracts, and concerns. They are bundled together here for convenience, but are designed to be extracted into standalone Composer packages when the need arises.
| Domain | Purpose | Dependencies |
|---|---|---|
| Currency | Currency enum, formatting, config | — |
| Translation | Polymorphic translations table, locale management | — |
| Location | Address management (polymorphic) | — |
| Media | File attachments via morphToMany pivot | — |
| Inventory | Stock tracking, reservations, audit ledger | — |
| Shipping | Shipment model, shipping cost calculation | — |
| Logging | Domain event logging with pluggable handlers | — |
| FlowChain | Orchestrated multi-step business processes | — |
| Pricing | Prices, price lists, vouchers, tax | Currency |
| Taxonomy | Categories (hierarchical) and tags (flat, typed) | Translation |
| Payment | Gateway-agnostic payments, refunds, webhooks | Currency |
| Commerce | Cart, Order, Customer lifecycle | Location, Currency, Payment, Shipping |
| Storefront | Read-only API layer for browsable catalog | Currency, Pricing, Taxonomy, Translation, Media, Inventory |
| Agent | MCP Streamable HTTP endpoint for locally-run Claudes (bearer or OAuth 2.1 + DCR) | — |
| Navigation | Configurable menus | Planned |
| Option | Product options/variants | Planned |
Usage
Project models opt into domain capabilities by implementing contracts and using traits:
use InOtherShops\Pricing\Contracts\HasPrices; use InOtherShops\Pricing\Concerns\InteractsWithPrices; use InOtherShops\Media\Contracts\HasMedia; use InOtherShops\Media\Concerns\InteractsWithMedia; class Product extends Model implements HasPrices, HasMedia { use InteractsWithPrices; use InteractsWithMedia; }
Each domain ships config with a models key for overriding model classes via the registry pattern. Publish config to customize:
// config/pricing.php return [ 'models' => [ 'price' => App\Models\CustomPrice::class, ], ];
Extracting Individual Domains
Each domain is designed to become its own Composer package. When extracting:
- Move the domain directory into its own repository
- Give it its own
composer.jsonwith theInOtherShops\{Domain}\PSR-4 namespace - Add the domain's cross-domain dependencies as
requireentries - Remove it from this package and add the new package as a dependency instead
The inter-domain dependency table above documents what each domain needs.
License
MIT