### Label
Publishing: documentation site using Next.js

### Summary
A documentation site blueprint for publishing built with Next.js on Ample. Domain schema:  
- **titles** (isbn_or_slug, title, author, imprint, published_at): the catalog of titles;  
- **editions** (title_id, format, version, object_key): editions and versioned files;  
- **customer_workspaces** (name, license_type, seat_count): institutional or trade customers;  
- **customer_assets** (workspace_id, title_id, object_key, license_expires_at): licensed files per customer;  
- **state_transitions** (record_type, from_state, to_state): the allowed state machine.  
Public information: title catalog and author pages, release schedules, rights and permissions contact.

### Requirements
- **Resource Requirements**:  
  - Compute  
  - Postgres  
  - CDN

- **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.  
  - CDN: The CDN host serves objects from published buckets.

### Framework
Next.js

### Workload
Documentation site

### Industry
Publishing

### Release Status
Published

### Support Status
Verified

### Execution Status
Ready

### Prerequisites
- A Next.js project (next build then next start -H 0.0.0.0 -p $PORT on the node-22 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 publishing data classes may be handled at all; this blueprint models public information only

### Workflow Steps
1. **Model the publishing domain**: Create the tables titles, editions, customer_workspaces, customer_assets, state_transitions.  
2. **Workflow step 1**: Model versioned documents with a state machine (draft, review, published) scoped to a product version.  
3. **Workflow step 2**: Publish assets for released versions to the CDN bucket.  
4. **Workflow step 3**: Serve only published versions publicly.  
5. **Workflow step 4**: Deploy and verify the version list and a published page.  
6. **Deploy**: Run the synchronous deploy once and read the result.  
7. **Verify**: Run the pattern self-test(s) from the example (/p/relational-records) and your own acceptance checks for the publishing workflow.

### Cost Estimate
- **Monthly Amount**: $10.00  
- **Components**:  
  - App server (s-1vcpu-1gb): $5.00  
  - Managed PostgreSQL database (s-1vcpu-1gb): $5.00  
- **Note**: Always-on monthly price of the tested sizes; apps and databases auto-pause when idle.

### Success Checks
- **App responds** on its public URL (expect: ample canary next js patterns)  
- **Self-test** from the example (expect: see the pattern fixture checks)

### Limitations
- The publishing 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.  
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.

### Next Actions
1. **Browse the catalog index**  
2. **Search published recipes by intent, stack and constraints**  
3. **Prepare a side-effect-free deployment plan for an authorized project**  
4. **Read the existing agent authentication setup**  
5. **Browse Publishing**  
6. **Browse Documentation site**  
7. **Browse Next.js**  
8. **Browse Deploy web app**

### Example
- **Next.js pattern fixture**: Verified relational records basis for this blueprint.
