## Property management: public directory using Laravel

### Summary
A public directory blueprint for property management built with Laravel on Ample. Domain schema: 
- **listings** (reference, address, unit, rent, publishing_status, agency_id): rental listings with publishing status; 
- **agencies** (name, license_number, portfolio_size): management offices; 
- **maintenance_vendors** (name, trade, agency_id, status): vendors per office; 
- **reports** (agency_id, period, object_key, generated_at): portfolio reports per office; 
- **state_transitions** (record_type, from_state, to_state): the allowed state machine.

Public information: available rentals, office contacts, application process. Kept out of scope until handling is reviewed: tenant identity and payment history, inspection reports with personal data. Tenant data is personal and often regulated; only published listings and office-scoped reporting are modeled.

### Technical Basis
Verified on Laravel: a workspace-scoped table, an explicit state machine (draft to review to published) that rejects invalid transitions, and a cross-workspace read that returns nothing (transitions=true isolation=true).

### Representative Queries
- Property management: public directory using Laravel
- Where can I host Property management: Public directory built with Laravel?
- I need a genuinely specialized public directory workflow covering building/vendor access, maintenance status and property reporting.

### Resource Requirements
- **primitive:compute**
- **primitive:postgres**
- **primitive:cdn**

### 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. **CDN**: The CDN host serves objects from published buckets. It does not front app compute and is not a cache or key-value store.

### Workflow Steps
1. **Model the property management domain**: Create the tables listings, agencies, maintenance_vendors, reports, state_transitions. Rental listings with publishing status lives in listings; keep the sensitive classes (tenant identity and payment history, inspection reports with personal data) out of this schema.
2. **Workflow step 1**: Model listings with a publishing_status state machine scoped to the agency.
3. **Workflow step 2**: Serve only published listings, with media from the CDN bucket.
4. **Workflow step 3**: Enforce the agency scope on every query.
5. **Workflow step 4**: Deploy and verify a published listing and that unpublished listings are absent.
6. **Deploy**: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
   - Command: `ample deploy . --name  --public --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=... --env CDN_PUBLIC_URL=...`
7. **Verify**: Run the pattern self-test(s) from the example and your own acceptance checks for the property management workflow.
   - Command: `ample logs  --kind build`

### Success Checks
1. App responds on its public URL
   - Kind: http_get
   - Path: / 
   - Expect: ample canary laravel patterns
2. Relational-records self-test from the example
   - Kind: http_get
   - Path: /p/relational-records 
   - Expect: see the pattern fixture checks

### Limitations
- Tenant data is personal and often regulated; only published listings and office-scoped reporting are modeled.
- Verified on the php-8.5 template at s-1vcpu-1gb; region, request-duration limits and other sizes are unknown or unverified.
- Managed PostgreSQL 16 only; extensions, connection limits and backup or restore procedures are not verified.

### Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Basis: size prices from pricing.toml
  - components:
    - name: app server
      size: s-1vcpu-1gb
      quantity: 1.0
      monthlyAmount: 5.0
    - name: managed PostgreSQL database
      size: s-1vcpu-1gb
      quantity: 1.0
      monthlyAmount: 5.0

### Examples
- **Title**: Laravel pattern fixture
  - **Description**: Verified relational records basis for this blueprint.
  - **Source Ref**: tests/deploy-canaries/laravel-patterns

### Evidence Summary
- **Kind**: canary_run
  - **Summary**: Laravel pattern fixture deployed on Ample; the relational records checks passed.
  - **Observed At**: 2026-09-20T20:36:21Z
  - **Last Verified At**: 2026-09-20T20:36:21Z

### Next Actions
1. **Browse the catalog index**: GET /v1/catalog
2. **Search published recipes**: POST /v1/catalog/search 
3. **Prepare a side-effect-free deployment plan**: POST /v1/catalog/plan 
4. **Read the existing agent authentication setup**: GET /mcp/setup 
5. **Browse Property management**: GET /v1/catalog/nodes/industry%3Aproperty-management 
6. **Browse Public directory**: GET /v1/catalog/nodes/workload%3Apublic-directory 
7. **Browse Laravel**: GET /v1/catalog/nodes/stack%3Aframework-laravel 
8. **Browse Deploy web app**: GET /v1/catalog/nodes/intent%3Adeploy-web-app

### Framework
**Framework**: Laravel

### Workload
**Workload**: Public directory

### Industry
**Industry**: Property management

### Release Status
**Release Status**: published

### Support Status
**Support Status**: verified

### Execution Status
**Execution Status**: ready

### Docs Only
**Docs Only**: false

### Prerequisites
1. A Laravel project setup.
2. A PostgreSQL driver.
3. Bucket credentials from `ample bucket create`.
4. Review of managed data classes.

### Tested Configuration
- Template: php-8.5
- Runtime: php
- Install commands: `composer install --no-dev --prefer-dist --no-interaction --no-progress --optimize-autoloader`
- Start command: `frankenphp php-server --listen :$PORT --root public`
