# Independent Retailers: Order Tracking Using Laravel

## Summary
A order tracking blueprint for independent retailers built with Laravel on Ample. Domain schema: products (sku, name, category, price, active): the SKU catalog; stock_movements (sku, location, delta, reason, moved_at): receipts, sales and adjustments; orders (order_no, customer_reference, status, placed_at): orders with status transitions; order_lines (order_no, sku, qty, unit_price): order contents; events (seq, record_type, record_id, kind, at): application-owned history written in the same transaction. Public information: product catalog and availability, store locations and hours, returns policy. Kept out of scope until handling is reviewed: customer contact and payment details, supplier cost prices. Payment details belong to your payment provider; only order status and public catalog data are modeled here.

## Representative Queries
- Independent retailers: order tracking using Laravel
- Where can I host Independent retailers: Order tracking built with Laravel?
- I need a genuinely specialized order tracking workflow covering SKU catalog, stock movements and order statuses.

## Resource Requirements
- primitive:compute
- primitive:postgres
- primitive:s3-compatible-object-storage

## Infrastructure Requirements
- **Compute**: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- **Postgres**: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
- **S3-compatible object storage**: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.

## Framework and Workload
- **Framework**: Laravel
- **Workload**: Order tracking
- **Industry**: Independent retailers

## Workflow Steps
1. **Model the Independent Retailers Domain**: Create the tables products, stock_movements, orders, order_lines, events. The sku catalog lives in products; keep the sensitive classes (customer contact and payment details, supplier cost prices) out of this schema.
2. **Model Orders**: with explicit status transitions and order lines.
3. **Apply Status Changes**: transactionally and record an event per change.
4. **Expose Status History**: to authorized callers only.
5. **Deploy**: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
6. **Verify**: Run the pattern self-test(s) from the example (/p/transactional-workflows) and your own acceptance checks for the independent retailers workflow.

## Limitations
- The independent retailers schema and workflow are an original design for this blueprint and were not executed as a separate application.
- No health, financial, privacy or other compliance claim is made.

## Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 10.0
- **Basis**: size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty.
- **Components**:
  - App server: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0
  - Managed PostgreSQL database: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0

## Next Actions
- **Browse the catalog index**:  GET /v1/catalog
- **Search published recipes**: POST /v1/catalog/search  
  Body: {"limit":5,"query":"Independent retailers: order tracking using Laravel"}
- **Prepare a deployment plan**: POST /v1/catalog/plan  
  Body: {"inputs":{},"projectId":"","recipeId":"page:blueprints:independent-retailers:order-tracking:laravel","recipeRevision":"r1"}

## Examples
- **Laravel pattern fixture**: Verified transactional workflows basis for this blueprint.
