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

v1.2.6 2025-11-06 09:11 UTC

This package is auto-updated.

Last update: 2025-11-09 12:19:09 UTC


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 StorageInterface when 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.