## Host marketplace with Nuxt: relational catalog data

### Summary
Deploy a marketplace built with Nuxt on Ample using the transactional workflows pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Nuxt: 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). Not separately tested: your domain records, validation rules and concurrency policy; treat the marketplace-specific behavior as your application code.

### Representative Queries
- Host marketplace with Nuxt: relational catalog data
- Where can I host Marketplace built with Nuxt?
- I need catalog tables, transactional update logic and application-level access boundaries.

### Resource Requirements
- **Compute**: isolated x86_64 Firecracker microVMs that auto-pause when idle.
- **Postgres**: Managed PostgreSQL 16 runs in its own microVM.

### Prerequisites
- A Nuxt project that builds and starts with the documented commands (nuxt build then node .output/server/index.mjs (reads HOST and PORT) on the node-22 template).
- A PostgreSQL driver reading DATABASE_URL at runtime.
- An Ample account token with servers:write, databases:read.

### Workflow Steps
1. **Build and start**  
   Command: `nuxt build then node .output/server/index.mjs (reads HOST and PORT)`, server must bind 0.0.0.0 on PORT.

2. **Implement the pattern on PostgreSQL**  
   Implement optimistic version checks and event rows written in the same transaction. Keep migrations idempotent.

3. **Deploy**  
   Run the synchronous deploy once and read the result. Re-running with no change is a no-op.  
   Command: `ample deploy . --name  --public`

4. **Verify**  
   Fetch the live URL and the pattern self-test routes. Check logs on failure.  
   Command: `ample logs  --kind build`

### Success Checks
- App responds on its public URL.
- Transactional-workflows self-test.

### Limitations
- Verified on the node-22 template at s-1vcpu-1gb.
- Apps auto-pause when idle and wake on the next request.

### Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 10.0
- Breakdown:
  - App server, size: s-1vcpu-1gb, monthly amount: 5.0
  - Managed PostgreSQL database, size: s-1vcpu-1gb, monthly amount: 5.0

### Examples
- **Nuxt pattern fixture**: Multi-pattern Nuxt app whose transactional workflows module was checked live; the module is under tests/deploy-canaries/_pattern-modules.

### Evidence Summary
- Summary of successful deployment and checks performed validating the pattern's transactional workflows.

### Next Actions
- **Browse the catalog index**  
   Method: GET, relativePath: `/v1/catalog`

- **Search published recipes by intent**  
   Method: POST, relativePath: `/v1/catalog/search`

- **Prepare a side-effect-free deployment plan**  
   Method: POST, relativePath: `/v1/catalog/plan`

- **Read existing agent authentication setup**  
   Method: GET, relativePath: `/mcp/setup`
