page:blueprints:b2b saas:documentation site:next js

B2B SaaS: documentation site using Next.js

A documentation site blueprint for b2b saas built with Next.js on Ample. Domain schema:

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 Next.js: 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

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 (customer data inside workspaces, usage and billing records, support attachments) 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 and verify the version list and a published page.
  6. 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. Run the pattern self-test(s) from the example (/p/relational-records) and your own acceptance checks for the b2b saas workflow. Command: ample logs --kind build.

Examples

Success Checks

Limitations

Cost Estimate

Evidence Summary

Canary run for the deployed Next.js pattern fixture on Ample, with passed relational records checks: a workspace-scoped table, an explicit state machine, and a cross-workspace read returning nothing.

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 B2B SaaS.
  6. Browse Documentation site.
  7. Browse Next.js.
  8. Browse Deploy web app.