page:blueprints:b2b saas:documentation site:laravel
B2B SaaS: Documentation Site Using Laravel
Summary
A documentation site blueprint for B2B SaaS built with Laravel 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 includes product documentation by version, pricing and plan comparison, status, and changelog. Kept out of scope until handling is reviewed are customer data inside workspaces, usage and billing records, and support attachments. Customer workspace data is tenant-scoped; isolation is application-enforced and no security certification is claimed.
Technical basis verified on Laravel:
- 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).
Prerequisites
- A Laravel project (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 template)
- A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
- Bucket credentials from
ample bucket createpassed as encrypted S3_* environment variables and a published bucket for public assets (CDN_*) - A review of which B2B SaaS data classes may be handled at all; this blueprint models public information only.
Infrastructure Requirements
| Primitive ID | Label | Status | Summary |
|---|---|---|---|
| primitive:compute | Compute | verified | Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request. |
| primitive:postgres | Postgres | verified | Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database. |
| primitive:cdn | CDN | verified | The CDN host serves objects from published buckets. |
Workflow Steps
- Model the B2B SaaS domain: Create the tables customer_workspaces, workspace_members, doc_versions, customer_assets, state_transitions.
- Model versioned documents: with a state machine (draft, review, published) scoped to a product version.
- Publish assets: for released versions to the CDN bucket.
- Serve only published versions: publicly.
- Deploy: Run the synchronous deploy once and read the result.
- Verify: Run the pattern self-test(s) and your own acceptance checks for the B2B SaaS workflow.
Success Checks
- App responds on its public URL
- Relational-records self-test from the example
Limitations
- No health, financial, privacy, or other compliance claim is made. Customer workspace data is tenant-scoped; isolation is application-enforced and no security certification is claimed.
- Verified on the php-8.5 template at size s-1vcpu-1gb; other sizes are unknown or unverified.