Product Decisions This Supports
- Build vs. Buy: Accelerates development of e-commerce features (e.g., carts, orders, tax calculations) by leveraging a modular, MIT-licensed PHP library instead of building from scratch. Ideal for teams prioritizing speed over customization.
- Roadmap Prioritization: Enables rapid prototyping of core commerce workflows (e.g., checkout flows, inventory management) to validate assumptions before investing in bespoke solutions.
- Feature Expansion: Supports scaling from MVP to full-featured e-commerce by modularly adding components (e.g., EU VAT compliance, customer groups) as demand grows.
- Use Cases:
- Startups launching e-commerce MVPs with minimal dev resources.
- Legacy systems needing to integrate commerce functionality without major architectural overhauls.
- Projects requiring compliance with EU tax regulations (e.g., VAT) without reinventing tax logic.
When to Consider This Package
-
Adopt When:
- Your stack is PHP/Laravel-based and you need lightweight, modular commerce logic.
- You prioritize rapid iteration over deep customization (e.g., early-stage startups).
- Your use case aligns with the library’s core features (orders, tax calculations, basic inventory) and you can tolerate its current limitations (e.g., missing documentation, incomplete features).
- You’re comfortable contributing to or extending open-source projects (given the TODO list and low maturity).
-
Look Elsewhere If:
- You need production-ready, battle-tested e-commerce (consider Laravel Cashier, Sylius, or Shopware).
- Your project requires scalability (e.g., high-traffic B2B platforms) or complex B2C features (e.g., subscriptions, multi-warehouse inventory).
- Your team lacks bandwidth to customize or maintain the library (e.g., Doctrine mappings, tax resolver logic).
- You need out-of-the-box features like payment gateways, shipping integrations, or a frontend UI (this is backend-only).
- Your compliance needs exceed EU VAT (e.g., global tax engines like Avalara).
How to Pitch It (Stakeholders)
For Executives:
"This PHP commerce library lets us launch core e-commerce functionality—orders, tax calculations, and inventory—in weeks instead of months, using our existing Laravel stack. It’s MIT-licensed and modular, so we can start small (e.g., a basic checkout flow) and expand later. While it’s not a full-fledged platform like Shopify, it’s a cost-effective way to validate our commerce vision before committing to a custom build or enterprise solution. The trade-off? We’ll need to invest time in customizing it for our needs, but the long-term savings and speed outweigh the risk."
For Engineering:
*"ekyna/Commerce is a lightweight, component-based PHP library for commerce logic (orders, tax rules, customers). It’s a good fit if we want to avoid reinventing wheels like:
- Order management (addresses, items, statuses).
- Tax calculations (EU VAT compliance out of the box).
- Basic inventory (though we’d need to extend it for advanced use cases).
Pros:
- MIT license, no vendor lock-in.
- Modular—we can cherry-pick what we need (e.g., skip bundles if we’re not using them).
- Laravel-friendly (PHP-based, Doctrine ORM compatible).
Cons:
- Low maturity: Heavy TODOs in the README (e.g., missing documentation, incomplete Doctrine mappings).
- Limited features: No payments, shipping, or frontend—just backend logic.
- Customization required: We’d need to handle gaps (e.g., attribute sets, customer groups) ourselves.
Recommendation: Use this for prototyping or small-scale projects where we can tolerate its limitations. For anything mission-critical or large-scale, pair it with a more robust solution (e.g., Sylius) or build custom modules on top."*
For Design/UX:
"This library handles the backend logic for orders, taxes, and customers—so it won’t directly impact our frontend or UI. However, it could enable faster development of core flows (e.g., checkout) if we’re building a custom e-commerce experience. We’d need to abstract its data models to fit our design system, but it removes backend complexity from our plate."