CommerceSystem-API is the central nervous system and production-ready backbone powering the entire CommerceSystem ecosystem. Rather than serving as a passive database, this engine acts as an AI Orchestration Hub built with Laravel 12 and PHP 8.4. It natively bridges enterprise ERP operations with Google DeepMind's models via Vertex AI and Google AI Studio, enabling autonomous agentic workflows across digital and physical storefronts.
Because this is an interconnected enterprise-grade solution, the project is structured modularly across specialized layers:
-
⚙️ CommerceSystem-API (This Repository): Central Laravel Backend, Database, and Vertex AI Gateway.
-
🛍️ CommerceStore Frontend: Next.js Consumer Web App with interactive 3D Spatial Calculation Canvas and Sales Concierge Sidebar.
-
🖥️ CommercePOS Frontend: In-store clerk Point of Sale & Physical Inventory Management Terminal.
Our dedicated service core directly orchestrates multi-modal requests, state evaluations, and autonomous routines using Google's foundational models:
-
Gemini-Powered Assistant Framework: Handles semantic intent parsing and contextual history matching. It processes incoming text to automatically generate follow-up diagnostics and calculate physical materials.
-
Autonomous Inventory Replenishment Agent: Uses Gemini Function Calling patterns. When low stock metrics are triggered through POS sales logs, the system moves beyond dialogue to execute secure API requests that programmatically compile procurement drafts.
-
Multi-Strategy ML Recommendation Matrix: Merges real-time data through 5 analytical channels: Collaborative Filtering (co-purchase correlation), Content-Based Filtering (price/category clustering), Personalized User History, Contextual Style Tags, and Best-Seller fallbacks.
-
Multi-Modal Vision & Inpainting Gateway: Integrates with imagen-3.0-capability-001 via Vertex AI for mask-free background modification, reading uploaded consumer canvas profiles and projecting matching materials directly onto room walls.
Optimized for high-conversion e-commerce experiences with lightning-fast response times.
- Intelligent Product Discovery: Advanced algorithmic query parsing, item indexing, and paginated outputs.
- SEO-Optimized Metadata Engine: Custom slug extraction and high-density crawling profiles.
- Omnichannel Availability matrix: True branch-level distribution lookups.
- Historical Audit Trails: Complete chronological lineage logging for every stock delta.
- Omnichannel Order Lifecycle: Central routing and reconciliation for online deliveries, in-store cash sales, and returns.
- Financial Reporting Engines: Deep-dive daily closings, purchase logging, and cash flow sheets.
- WebSocket Core: Live browser UI synchronization powered natively by Laravel Reverb.
- WebPush Notification Dispatch: Event-driven worker streams pushing structural system shifts, low-stock warnings, and purchase alerts instantly to managers.
- Google Cloud Platform Integration: Authenticated using Cloud Platform service accounts to connect directly with global API publisher boundaries via exponential backoff filters.
- Laravel Sanctum Identity Management: Stateful and token-based authentication schemas managing strict role privileges (Admins, Managers, Cashiers, Customers).
- Asynchronous Queue Pipeline: Background worker orchestration isolating demanding tasks like AI text generations, image formatting, and report assemblies out of the HTTP thread loop.
- Defensive Design Patterns: Strict OWASP compliance profiles utilizing input type checking, database parameter filtering, and cross-site mitigation patterns.
- Sub-100ms Responses: Eager data hydration patterns and multi-tier memory caching structures.
- PHP 8.4+
- Composer (v2.0+)
- Node.js & NPM (for asset compilation)
- PostgreSQL/MySQL/SQLite database
Get up and running in minutes with the automated setup script:
composer setupThis command handles: dependency installation, environment setup, database migration, seeding, and asset compilation.
-
Install Dependencies:
composer install npm install
-
Environment Configuration:
cp .env.example .env php artisan key:generate
-
Database Setup:
php artisan migrate php artisan db:seed # Optional: Populate with sample data -
Start Development Server:
composer dev
| Endpoint | Method | Description | Auth Required |
|---|---|---|---|
/products |
GET |
List available products | ❌ |
/products/{slug} |
GET |
Get product details | ❌ |
/products |
POST |
Create a new product | ✅ |
/sales |
POST |
Process a new sale | ✅ |
/reports/sales-report |
GET |
Itemized sales analytics | ✅ |
/reports/purchase-report |
GET |
Supplier spend analysis | ✅ |
/reports/daily-closing |
GET |
Reconciliation & cash flow stats | ✅ |
/reports/stock-audit |
GET |
Inventory discrepancy log | ✅ |
Ensure framework safety configurations remain intact by executing the test block:
composer testBuilt with automated feature evaluation parameters preserving high functional code test coverage.
Proprietary software part of the CommerceSystem ecosystem.