Download the PHP package azaharizaman/nexus-product without Composer
On this page you can find all versions of the php package azaharizaman/nexus-product. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-product
More information about azaharizaman/nexus-product
Files in azaharizaman/nexus-product
Package nexus-product
Short Description Framework-agnostic product catalog management with template-variant architecture, SKU generation, and barcode handling
License MIT
Informations about the package nexus-product
Nexus\Product
Framework-agnostic product catalog management package for the Nexus ERP monorepo.
Overview
Nexus\Product provides a comprehensive master data management system for product catalogs, supporting both simple standalone products and complex configurable products with template-variant architecture. It integrates seamlessly with Nexus\Uom for dimensional data, Nexus\Sequencing for SKU generation, and serves as the foundation for downstream domains like Procurement, Sales, and Inventory.
Core Philosophy
This package defines WHAT a product is (master data), not WHERE it's stored or HOW MUCH stock exists. Transactional data like inventory levels, pricing, and availability belong in domain-specific packages (Nexus\Inventory, Nexus\Sales).
Features
Template-Variant Architecture
- Product Templates: Conceptual products with shared attributes (e.g., "T-Shirt Model X")
- Product Variants: Transactable SKUs with unique identifiers (e.g., "T-Shirt Model X, Red, Size M")
- Standalone Products: Simple products that don't require template structure
Master Data Management
- Hierarchical Categories: Unlimited nesting with adjacency list pattern
- Attribute Sets: Configurable attributes (Color, Size, Material) with value management
- SKU Generation: Integration with
Nexus\Sequencingfor unique identifier assignment - Barcode Handling: Multi-format support (EAN-13, UPC-A, CODE-128, QR) with validation
Physical Dimensions
- Unit-Aware Measurements: Integration with
Nexus\Uom\Quantityfor weight, volume, dimensions - Dimension Sets: Complete physical specifications (length, width, height, weight)
Product Classification
- Product Types: STORABLE (inventory-tracked), CONSUMABLE (buy/use), SERVICE (intangible)
- Tracking Methods: NONE, LOT_NUMBER (batch tracking), SERIAL_NUMBER (unique instances)
Enterprise Features
- Variant Explosion Prevention: Configurable limits on variant combinations
- Duplicate Detection: SKU and barcode uniqueness enforcement
- Category Circular Reference Protection: Validation for organizational hierarchies
- Multi-Tenant Support: Tenant scoping for SaaS deployments
Installation
This package is part of the Nexus monorepo. Install it in your Laravel application:
Architecture
Package Structure
Framework Agnostic Design
This package contains ZERO Laravel-specific code. All dependencies are injected via constructor:
- ✅ Pure PHP 8.3 with strict types
- ✅ PSR-3
LoggerInterfacefor logging - ✅ Constructor property promotion with
readonly - ✅ Native enums with
matchexpressions - ❌ NO Laravel Facades (
Log::,Cache::,DB::) - ❌ NO global helpers (
now(),config(),app()) - ❌ NO Eloquent models or migrations
Usage Examples
Creating a Simple Product (Standalone Variant)
Creating a Configurable Product (Template + Variants)
Working with Barcodes
Preventing Variant Explosion
Integration Points
Nexus\Uom (Unit of Measure)
All physical dimensions use Nexus\Uom\Quantity:
Nexus\Sequencing (SKU Generation)
SKU generation integrates with the sequencing engine:
Nexus\Finance (Default GL Accounts)
Products can reference default GL account codes (resolved at application layer):
Nexus\Procurement (Purchase Orders)
Update PurchaseOrderLineInterface to reference products:
Value Objects
Sku
Immutable, validated SKU identifier:
Barcode
Format-aware barcode with validation:
DimensionSet
Complete physical specifications:
Enums
ProductType
TrackingMethod
BarcodeFormat
Exception Hierarchy
Configuration
Product-related settings (managed via Nexus\Setting):
| Setting Key | Default | Description |
|---|---|---|
product.max_variants_per_template |
1000 | Maximum variants allowed per template |
product.default_category |
GENERAL |
Default category for uncategorized products |
product.require_barcode |
false |
Whether barcodes are mandatory |
product.auto_generate_sku |
true |
Auto-generate SKUs via sequencing |
Contributing
This package follows the Nexus monorepo architectural principles:
- Framework Agnostic: Zero Laravel dependencies
- Contract-Driven: All external needs defined via interfaces
- Immutable Value Objects: All VOs use
readonlymodifier - Modern PHP: Constructor promotion, native enums,
matchexpressions - Dependency Injection: All dependencies via constructor
📖 Documentation
Package Documentation
- Getting Started Guide
- API Reference
- Integration Guide
- Examples
Additional Resources
IMPLEMENTATION_SUMMARY.md- Implementation progressREQUIREMENTS.md- RequirementsTEST_SUITE_SUMMARY.md- TestsVALUATION_MATRIX.md- Valuation
License
MIT License - see LICENSE file for details.
Related Packages
Nexus\Uom- Unit of measure managementNexus\Sequencing- Auto-numbering and sequence generationNexus\Procurement- Purchase order managementNexus\Inventory- Stock and warehouse managementNexus\Finance- Financial accountingNexus\Setting- Configuration managementNexus\Tenant- Multi-tenancy support
All versions of nexus-product with dependencies
psr/log Version ^3.0
azaharizaman/nexus-uom Version dev-main
azaharizaman/nexus-sequencing Version dev-main