## Real estate brokerages: vendor portal using Next.js

A vendor portal blueprint for real estate brokerages built with Next.js on Ample.

### Domain schema:
- **listings** (reference, address, price, listing_type, publishing_status, agency_id): property listings with publishing status;
- **agencies** (name, license_number, region): agencies or branches;
- **listing_media** (listing_id, object_key, cdn_key, sort_order): public media per listing;
- **reports** (agency_id, period, object_key, generated_at): agency-scoped reports;
- **document_access** (document_id, principal_reference, role, granted_at): who may read which document.

### Public information:
Published listings with media, agent and agency profiles, buying and selling guides. Kept out of scope until handling is reviewed: vendor and buyer identity, offers and negotiations, unpublished listings. Only listings with **publishing_status** = published appear publicly; offers and identities are out of scope.

### Technical basis verified on Next.js:
A role-to-document access model with negative tests (401 without identity, 403 for the wrong role) and a private-bucket round-trip for the allowed role (private=ok).

### Representative Queries:
- Real estate brokerages: vendor portal using Next.js
- Where can I host Real estate brokerages: Vendor portal built with Next.js?
- I need a genuinely specialized vendor portal workflow covering property listings, publishing status and agency-scoped reporting.

### 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.

### Workflow Steps:
1. **Model the real estate brokerages domain**: Create the tables listings, agencies, listing_media, reports, document_access. 
2. **Model vendors**: Scoped to the agency with roles.
3. **Authorize document access**: By vendor and role (401, 403 negative tests).
4. **Store vendor documents**: In the private bucket.
5. **Deploy**: Run the synchronous deploy once and read the result. 
6. **Verify**: Run pattern self-test(s) from the example and acceptance checks.

### Cost Estimate:
- **Currency**: USD
- **Monthly Amount**: 10.0
- **Components**:
  - app server: size s-1vcpu-1gb, quantity 1.0, monthlyAmount 5.0
  - managed PostgreSQL database: size s-1vcpu-1gb, quantity 1.0, monthlyAmount 5.0
- **Note**: Always-on monthly price of the tested sizes; apps and databases auto-pause when idle.

### Limitations:
- The technical basis (private document library on Next.js) was verified with the pattern fixture; the real estate brokerages 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. Only listings with publishing_status = published appear publicly; offers and identities are out of scope.

### Evidence Summary:
1. **Next.js Pattern Fixture Deployed on Ample**: The private document library checks passed: a role-to-document access model with negative tests (401 without identity, 403 for the wrong role) and a private-bucket round-trip for the allowed role (private=ok).

### Next Actions:
1. **Browse the catalog index**: GET /v1/catalog
2. **Search published recipes**: POST /v1/catalog/search
3. **Prepare deployment plan**: POST /v1/catalog/plan
4. **Read existing agent authentication setup**: GET /mcp/setup
5. **Browse Real estate brokerages**: GET /v1/catalog/nodes/industry%3Areal-estate-brokerages
6. **Browse Vendor portal**: GET /v1/catalog/nodes/workload%3Avendor-portal
7. **Browse Next.js**: GET /v1/catalog/nodes/stack%3Aframework-next-js
8. **Browse Deploy web app**: GET /v1/catalog/nodes/intent%3Adeploy-web-app
