# Home services: product catalog using Laravel

## Summary
A product catalog blueprint for home services built with Laravel on Ample. Domain schema: 
- **services** (sku, name, category, price_from, duration_estimate): service catalog as SKUs;
- **parts_stock** (sku, delta, reason, moved_at): parts and consumables movements;
- **jobs** (job_no, service_area, status, scheduled_for): jobs as orders with status transitions;
- **job_lines** (job_no, sku, qty): services and parts on a job;
- **events** (seq, record_type, record_id, kind, at): application-owned history written in the same transaction.

Public information: service catalog and pricing form, service areas and hours, licensing and insurance summary. Kept out of scope until handling is reviewed: customer addresses and access notes, payment details. Customer addresses and access instructions are personal data; keep them out until handling is reviewed. Technical basis verified on Laravel: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected).

## Representative Queries
- Home services: product catalog using Laravel
- Where can I host Home services: Product catalog built with Laravel?
- I need a genuinely specialized product catalog workflow covering service areas, job materials and field-job status.

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

## Infrastructure Requirements
1. **Compute**: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
2. **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.
3. **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
Laravel

## Workload
Product catalog

## Industry
Home services

## Release Status
Published

## Support Status
Verified

## Execution Status
Ready

## Docs Only
False

## Prerequisites
- A Laravel project (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template)
- A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
- Bucket credentials from `ample bucket create` passed as encrypted S3_* environment variables
- A review of which home services data classes may be handled at all; this blueprint models public information only

## Tested Configuration
- **Template**: php-8.5
- **Runtime**: php
- **Size**: s-1vcpu-1gb
- **Install**: composer install --no-dev --prefer-dist --no-interaction --no-progress --optimize-autoloader
- **Start**: frankenphp php-server --listen :$PORT --root public

## Workflow Steps
1. **Model the home services domain**: Create the tables services, parts_stock, jobs, job_lines, events. Service catalog as SKUs lives in services; keep the sensitive classes (customer addresses and access notes, payment details) out of this schema.
2. **Workflow step 1**: Model the SKU catalog with versioned updates.
3. **Workflow step 2**: Record every catalog change as an event in the same transaction.
4. **Workflow step 3**: Reject stale concurrent updates.
5. **Workflow step 4**: Deploy and verify history and conflict handling.
6. **Deploy**: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
7. **Verify**: Run the pattern self-test(s) from the example (/p/transactional-workflows) and your own acceptance checks for the home services workflow.

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

## Success Checks
1. App responds on its public URL.
2. Transactional-workflows self-test from the example.

## Limitations
- The technical basis (transactional workflows on Laravel) was verified with the pattern fixture; the home services 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. Customer addresses and access instructions are personal data; keep them out until handling is reviewed.
- Verified on the php-8.5 template at s-1vcpu-1gb; region, request-duration limits and other sizes are unknown or unverified.

## Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 10.0
- **Basis**: size prices from pricing.toml at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty

### Components
1. **App server**: size: s-1vcpu-1gb, quantity: 1.0, monthlyAmount: 5.0
2. **Managed PostgreSQL database**: size: s-1vcpu-1gb, quantity: 1.0, monthlyAmount: 5.0

## Evidence Summary
- **Kind**: canary_run
- **Summary**: Laravel pattern fixture deployed on Ample (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template); the transactional workflows checks passed: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events.
- **Observed At**: 2026-09-20T20:36:21Z

## Next Actions
1. **Browse the catalog index** - `GET /v1/catalog`
2. **Search published recipes by intent, stack and constraints** - `POST /v1/catalog/search`
3. **Prepare a side-effect-free deployment plan for an authorized project** - `POST /v1/catalog/plan`
4. **Read the existing agent authentication setup** - `GET /mcp/setup`
5. **Browse Home services** - `GET /v1/catalog/nodes/industry:home-services`
6. **Browse Product catalog** - `GET /v1/catalog/nodes/workload:product-catalog`
7. **Browse Laravel** - `GET /v1/catalog/nodes/stack:framework-laravel`
8. **Browse Deploy web app** - `GET /v1/catalog/nodes/intent:deploy-web-app`
