django.md
Developer tools: documentation site using Django
Summary
A documentation site blueprint for developer tools built with Django on Ample. Domain schema includes:
- customer_workspaces (name, plan, api_key_count): customer organizations
- doc_versions (product_version, title, object_key, published_at): versioned reference docs and guides
- sdk_releases (language, version, changelog_object_key, released_at): SDK releases and changelogs
- customer_assets (workspace_id, title, object_key, visibility): customer-specific artifacts
- state_transitions (record_type, from_state, to_state): the allowed state machine.
Public information includes: versioned API reference and guides, SDK release notes, status page links. API keys and usage logs are secrets or personal data and should be kept out of documentation workflows. Technical basis verified on Django includes a workspace-scoped table and an explicit state machine.
Infrastructure requirements
- Compute: verified (Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.)
- Postgres: verified (Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.)
- CDN: verified (The CDN host serves objects from published buckets.)
Prerequisites
- A Django project (pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 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_*)
Steps
- Model the developer tools domain. Create the tables customer_workspaces, doc_versions, sdk_releases, customer_assets, state_transitions.
- Workflow step 1. Model versioned documents with a state machine (draft, review, published) scoped to a product version.
- Workflow step 2. Publish assets for released versions to the CDN bucket.
- Workflow step 3. Serve only published versions publicly.
- Deploy. Run the synchronous deploy once and read the result.
ample deploy . --name <app-name> --public --start "python3 run.py" --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=... --env CDN_PUBLIC_URL=... - Verify. Run the pattern self-test(s) from the example (
/p/relational-records).
Success checks
- App responds on its public URL.
- Relational-records self-test from the example.
Cost estimate
Estimated 10.00 USD per month:
- App server x1
s-1vcpu-1gb: 5.00 USD - Managed PostgreSQL database x1
s-1vcpu-1gb: 5.00 USD
Always-on monthly price of the tested sizes; apps and databases auto-pause when idle.
Verification evidence
canary_runon 2026-09-20T03:31:44Z: Django pattern fixture deployed on Ample; the relational records checks passed. The blueprint's Developer tools schema and workflow build on that verified basis.