PHPackages                             selli/commerce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. selli/commerce

ActiveLibrary[API Development](/categories/api)

selli/commerce
==============

A headless, catalog-agnostic commerce domain engine for Laravel: cart, order lifecycle, deterministic pricing pipeline, tax and inventory — multi-tenant, multi-currency, audited and ACL-protected.

v1.0.0(1mo ago)00[1 PRs](https://github.com/Sellinnate/laravel-commerce/pulls)MITPHPPHP ^8.3CI passing

Since Jun 27Pushed 1mo agoCompare

[ Source](https://github.com/Sellinnate/laravel-commerce)[ Packagist](https://packagist.org/packages/selli/commerce)[ Docs](https://github.com/sellinnate/laravel-commerce)[ GitHub Sponsors](https://github.com/:vendor_name)[ RSS](/packages/selli-commerce/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (1)Dependencies (14)Versions (8)Used By (0)

 [![Laravel Commerce — agnostic carts & orders](docs/assets/laravel-commerce-banner.webp)](docs/assets/laravel-commerce-banner.webp)

Laravel Commerce
================

[](#laravel-commerce)

[![Tests](https://github.com/sellinnate/laravel-commerce/actions/workflows/run-tests.yml/badge.svg)](https://github.com/sellinnate/laravel-commerce/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/sellinnate/laravel-commerce/actions/workflows/phpstan.yml/badge.svg)](https://github.com/sellinnate/laravel-commerce/actions/workflows/phpstan.yml)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE.md)

A **headless, catalog-agnostic commerce domain engine for Laravel**: cart, order lifecycle, a deterministic pricing pipeline, multi-tenancy, multi-currency, an immutable audit trail and ACL — the transactional heart you build stores, checkouts, booking systems and quote flows on top of.

It is **not** a turnkey store. It owns the parts of commerce that are hard to get right and identical across projects — money, order states, the calculation pipeline — and nothing else. Your catalogue stays yours: anything implementing the `Purchasable` contract becomes sellable.

> 📚 **Full documentation:**

Why
---

[](#why)

Every commercial app re-writes cart, totals, discounts, VAT and order states — and re-introduces the same bugs (rounding, inclusive/exclusive tax, stock race conditions) project after project. Laravel Commerce is **one engine, tested to the bone, reused across N projects**.

Highlights
----------

[](#highlights)

- **Catalog-agnostic** — binds to your models via the `Purchasable` contract; freezes an immutable order snapshot so history never changes when your catalogue does.
- **Headless &amp; unopinionated** — no routes, controllers or templates imposed. Pure service layer + events.
- **Money correct by construction** — `brick/money` in minor units, never a float; centralised, per-currency rounding.
- **Deterministic calculation pipeline** — an explainable, line-by-line breakdown; reorderable and extensible without touching the core.
- **Order state machine** — `spatie/laravel-model-states`; illegal transitions are impossible by construction, authorised by policy and logged append-only.
- **Multi-tenant &amp; multi-currency** — `tenant_id` + global scope on every table; one engine serves single-tenant and SaaS alike.
- **Audited** — every domain event persisted append-only; optional event sourcing for the Order aggregate.
- **Optional modules** — toggle each independently: **Pricing** (price books, coupons, promotions, gift cards), **Tax** (per-line jurisdictions, inclusive/exclusive, EU exemption &amp; reverse charge) and **Inventory** (per-warehouse stock, TTL reservations, oversell prevention under a lock).

Requirements
------------

[](#requirements)

- PHP 8.3+ (8.3 / 8.4 / 8.5)
- Laravel 12 or 13

Installation
------------

[](#installation)

```
composer require selli/commerce
php artisan vendor:publish --tag="commerce-migrations"
php artisan migrate
```

Quick start
-----------

[](#quick-start)

```
use Selli\Commerce\Cart\CartManager;
use Selli\Commerce\Order\Actions\PlaceOrder;
use Selli\Commerce\Order\Actions\TransitionOrderState;
use Selli\Commerce\Order\States\Confirmed;

$carts = app(CartManager::class);

$cart = $carts->forOwner('user', (string) $user->id, 'EUR');
$carts->add($cart, $product, quantity: 2, options: ['size' => 'L']);

$calculation = $carts->calculate($cart);   // deterministic, explainable
$calculation->grandTotal();                 // Brick\Money\Money
$calculation->breakdown();                  // subtotal, discounts, tax, lines

$order = app(PlaceOrder::class)->handle($cart);   // transactional, emits OrderPlaced
$order->state;                                     // Pending

app(TransitionOrderState::class)->handle($order, Confirmed::class, by: $agent, reason: 'payment ok');
```

See the [Quick Start guide](https://laravel-commerce.selli.io/getting-started/quick-start) for the full walkthrough, including implementing `Purchasable` on your model.

Documentation
-------------

[](#documentation)

The documentation site is built with [docmd](https://github.com/mgks/docmd):

```
npm install
npm run docs:build   # outputs to ./site
npm run docs:dev     # local preview
```

Testing
-------

[](#testing)

```
composer test            # Pest suite
composer test-coverage   # with 90% minimum coverage gate
composer analyse         # PHPStan (max level)
composer format          # Pint
```

Roadmap
-------

[](#roadmap)

The core (cart, order, calculation pipeline, multi-tenancy, multi-currency, audit, ACL) and the **Pricing &amp; Promotions**, **Tax** and **Inventory** modules have shipped. Next on the roadmap: Payments orchestration, Fulfillment and optional REST/GraphQL/Filament surfaces.

License
-------

[](#license)

The MIT License (MIT). See [License File](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e50b471d6fa918216848284827718bed6cfc5c053ddd92b6777d7623cf21de0?d=identicon)[Filippo Calabrese](/maintainers/Filippo%20Calabrese)

---

Top Contributors

[![FilippoCalabrese](https://avatars.githubusercontent.com/u/15164324?v=4)](https://github.com/FilippoCalabrese "FilippoCalabrese (9 commits)")

---

Tags

laravelheadlessecommercecartmulti-tenantinventorycommercetaxorderpricingselli

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/selli-commerce/health.svg)

```
[![Health](https://phpackages.com/badges/selli-commerce/health.svg)](https://phpackages.com/packages/selli-commerce)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M136](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818355.4k3](/packages/defstudio-telegraph)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5226.7k](/packages/simplestats-io-laravel-client)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

11124.6k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
