page:blueprints:wholesale distributors:product catalog:laravel
Wholesale Distributors: Product Catalog Using Laravel
Summary
A product catalog blueprint for wholesale distributors built with Laravel on Ample. Domain schema:
- products (sku, name, category, case_size, list_price, active): SKU catalog with case sizes;
- stock_movements (sku, warehouse, delta, reason, moved_at): receipts, picks and adjustments;
- orders (order_no, account_reference, status, placed_at): trade orders with status transitions;
- order_lines (order_no, sku, cases, unit_price): order contents;
- events (seq, record_type, record_id, kind, at): application-owned history written in the same transaction.
Public information includes catalog with case sizes, minimum order and delivery terms, and trade account application. Confidential elements (not publicly shown): account pricing tiers, credit terms, delivery addresses.
Resource Requirements
- compute
- postgres
- s3-compatible-object-storage
Infrastructure Requirements
- Compute: Verified apps run in isolated x86_64 Firecracker microVMs.
- Postgres: Managed PostgreSQL 16 runs in its microVM, auto-provisioned when needed.
- S3-compatible object storage: Buckets are S3-compatible with issued credentials.
Workflow Steps
- Model the wholesale distributors domain: Create tables products, stock_movements, orders, order_lines, events.
- Workflow step 1: Model the SKU catalog with versioned updates.
- Workflow step 2: Record every catalog change as an event in the same transaction.
- Workflow step 3: Reject stale concurrent updates.
- Workflow step 4: Deploy and verify history and conflict handling.
Examples
- Laravel pattern fixture: Verified transactional workflows basis for this blueprint.
Limitations
- Technical basis verified only for transactional workflows, not for sensitive data.
- Confidential pricing and credit terms not part of the public catalog.
- Verified on php-8.5 template; region and other settings not confirmed.
Cost Estimate
- Monthly Amount: 10.0 USD
- App server: 5.0 USD
- Managed PostgreSQL database: 5.0 USD
Evidence Summary
- Canary Run: Laravel pattern fixture deployed and verified successful.
Next Actions
- Browse the catalog index: GET /v1/catalog
- Search published recipes: POST /v1/catalog/search
- Prepare deployment plan: POST /v1/catalog/plan