### B2B SaaS: Documentation Site Using Django

A documentation site blueprint for B2B SaaS built with Django on Ample. 
Domain schema:  
- **customer_workspaces** (name, plan, seat_count, created_at): customer tenants;  
- **workspace_members** (workspace_id, email, role): members and roles per workspace;  
- **doc_versions** (product_version, title, object_key, published_at): versioned product documentation;  
- **customer_assets** (workspace_id, title, object_key, visibility): assets scoped to one customer;  
- **state_transitions** (record_type, from_state, to_state): the allowed state machine.

Public information: product documentation by version, pricing and plan comparison, status and changelog.

Kept out of scope until handling is reviewed: customer data inside workspaces, usage and billing records, support attachments. Customer workspace data is tenant-scoped; isolation is application-enforced and no security certification is claimed.

Technical basis verified on Django:  
- A workspace-scoped table  
- An explicit state machine (draft to review to published) that rejects invalid transitions  
- A cross-workspace read that returns nothing (transitions=true isolation=true).

#### Representative Queries  
- B2B SaaS: Documentation site using Django  
- Where can I host B2B SaaS: Documentation site built with Django?  
- I need a genuinely specialized documentation site workflow covering customer workspaces, versioned product docs, and customer-specific assets.

### Workflow Steps  
1. **Model the B2B SaaS Domain**: Create the tables customer_workspaces, workspace_members, doc_versions, customer_assets, state_transitions. Customer tenants live in customer_workspaces; keep the sensitive classes out of this schema.  
2. **Model Versioned Documents**: with a state machine (draft, review, published) scoped to a product version.  
3. **Publish Assets**: for released versions to the CDN bucket.  
4. **Serve Only Published Versions**: publicly.  
5. **Deploy**: Run the synchronous deploy once and read the result.  
   - Command: `ample deploy . --name --public --start "python3 run.py" --env S3_ENDPOINT=...`  
6. **Verify**: Run the pattern self-test(s) from the example and your own acceptance checks for the B2B SaaS workflow.  
   - Command: `ample logs --kind build`

### Examples  
- **Django Pattern Fixture**: Verified relational records basis for this blueprint.  
  - Source Ref: `tests/deploy-canaries/django-patterns`

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

### Limitations  
- The technical basis was verified with the pattern fixture; the B2B SaaS schema and workflow are an original design 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.

### Cost Estimate  
- **Currency**: USD  
- **Monthly Amount**: 10.0  
- **Basis**: Size prices from pricing.toml.  
  - Components:  
     1. App server (size: s-1vcpu-1gb, monthlyAmount: 5.0)  
     2. Managed PostgreSQL database (size: s-1vcpu-1gb, monthlyAmount: 5.0)

### Evidence Summary  
- **Canary Run**: Django pattern fixture deployed on Ample (the relational records checks passed).  
   - Observed At: 2026-09-20T03:31:44Z  
   - Implementation Revision: `03b6402b1b3e19178985f08ea4033804521d85d4`

### Formats  
- [HTML](/content/blueprints/b2b-saas/documentation-site/django/index.html)  
- [Markdown](/content/blueprints/b2b-saas/documentation-site/django.md)  
- [JSON](https://api.ample.computer/v1/catalog/recipes/page%3Ablueprints%3Ab2b-saas%3Adocumentation-site%3Adjango)

### Next Actions  
- **Browse the Catalog Index**  
   - ActionId: browse-catalog  
   - Method: GET  
- **Search Published Recipes**  
   - ActionId: search-recipes  
   - Method: POST  
- **Prepare a Deployment Plan**  
   - ActionId: plan:page:blueprints:b2b-saas:documentation-site:django  
   - Method: POST
