mohamedhekal / stockpulse
Inventory movement engine for Laravel ERP/WMS: reserve/commit/release, transfers, adjustments with locked balances
v0.1.0
2026-07-16 14:23 UTC
Requires
- php: ^8.2
- illuminate/contracts: ^11.0|^12.0
- illuminate/database: ^11.0|^12.0
- illuminate/events: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/phpstan: ^2.0
README
Search terms: laravel, inventory, stock, wms, erp, reservations, warehouse, php, laravel-package, inventory-management, atp, stock-reservation.
Inventory movement engine for Laravel ERP/WMS: on-hand + reserved balances, reserve/commit/release, transfers, and append-only movements with row locks.
Installation
composer require mohamedhekal/stockpulse php artisan vendor:publish --tag=stockpulse-config php artisan migrate
Setup
use Hekal\StockPulse\Models\Warehouse; Warehouse::create(['code' => 'MAIN', 'name' => 'Main warehouse']);
Usage
use Hekal\StockPulse\Facades\StockPulse; StockPulse::adjust('MAIN', 'SKU-1', 100, reference: 'PO-9'); $reservation = StockPulse::reserve('MAIN', 'SKU-1', 4, reference: 'SO-12'); StockPulse::commit($reservation); // or StockPulse::release($reservation) StockPulse::transfer('MAIN', 'EAST', 'SKU-1', 10); StockPulse::available('MAIN', 'SKU-1'); // on_hand - reserved
Guarantees
- Available to promise =
on_hand - reserved - Oversell attempts throw
- Transfers lock warehouses in stable id order
- Movements are append-only
Limitations (v0.1)
- No FIFO/LIFO cost layers
- No lot/serial tracking
- Quantities are integers (units), not decimal packs
- No built-in accounting postings (pair with LedgerCore)
Testing
composer install && composer test
License
MIT