aiarmada / cart
A comprehensive commerce ecosystem for Laravel with cart, payments, vouchers, shipping, and inventory management.
Installs: 96
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/aiarmada/cart
Requires
- php: ^8.4
- aiarmada/commerce-support: v1.2.6
- akaunting/laravel-money: ^6.0
README
This package contains the core implementation that powers AIArmada Cart. It is published as aiarmada/cart on Packagist and intended for Laravel 12 applications seeking a feature-rich shopping cart engine.
Highlights
- ๐ฆ Pluggable storage โ session, cache, and database drivers that implement a shared interface.
- ๐ Composable cart architecture โ traits manage items, totals, metadata, and conditions.
- ๐ Multi-instance by default โ support any number of cart buckets per user or session.
- ๐งฎ Accurate calculations โ Akaunting\Money integration for precise totals and rounding.
- ๐ Observability hooks โ metrics, conflict tracking, and per-operation performance measurements.
Documentation
The full project documentation lives in the repository root under docs/. Start with:
JSON vs JSONB (PostgreSQL)
Migrations default to portable json columns. To opt into jsonb on a fresh install, set one of the following BEFORE running migrations:
COMMERCE_JSON_COLUMN_TYPE=jsonb # or per-package override CART_JSON_COLUMN_TYPE=jsonb
Or run the interactive setup:
php artisan commerce:configure-database
When using PostgreSQL + jsonb, GIN indexes are created automatically on items, conditions, and metadata.
Local Development
Clone the monorepo and install dependencies:
composer install vendor/bin/pest
When editing code:
- Keep strict types and typed signatures.
- Honour
StorageInterfacewhen extending storage implementations. - Update or add tests for behavioural changes.
- Format using
vendor/bin/pint --dirty.
Testing
Run the unit suite for the core package:
vendor/bin/pest tests/Unit
Use Pest filters (--group, --filter) to target specific areas.
Contributing
Please review the Laravel Cart Coding Guidelines before submitting PRs. Contributions from the community are welcomeโissues, bug reports, and feature suggestions keep the project healthy.
License
AIArmada Cart is released under the MIT license.