page:blueprints:wholesale distributors:product catalog:django

Wholesale distributors: product catalog using Django

Summary

A product catalog blueprint for wholesale distributors built with Django on Ample. Domain schema:

Public information includes the catalog with case sizes, minimum order and delivery terms, and trade account application.

Technical Basis

Verified on Django with:

Resource Requirements

Infrastructure Requirements

  1. Compute
    Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
  2. Postgres
    Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
  3. S3-compatible object storage
    Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.

Workflow Steps

  1. Model the wholesale distributors domain
    Create the tables products, stock_movements, orders, order_lines, events. SKU catalog with case sizes lives in products; keep sensitive classes (account pricing tiers, credit terms, delivery addresses) out of this schema.

  2. Workflow step 1
    Model the SKU catalog with versioned updates.

  3. Workflow step 2
    Record every catalog change as an event in the same transaction.

  4. Workflow step 3
    Reject stale concurrent updates.

  5. Workflow step 4
    Deploy and verify history and conflict handling.

  6. Deploy
    Run the synchronous deploy once and read the result. Re-running with no change is a no-op.

    Command: ample deploy . --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=...

  7. Verify
    Run the pattern self-tests from the example and your own acceptance checks for the wholesale distributors workflow.

    Command: ample logs --kind build

Examples

Success Checks

  1. App responds on its public URL (expect: ample canary django patterns).
  2. Transactional-workflows self-test from the example (expect: see the pattern fixture checks).

Limitations

Cost Estimate

Evidence Summary

Next Actions

  1. Browse the catalog index
    Method: GET
    Relative Path: /v1/catalog
  2. Search published recipes by intent, stack, and constraints
    Method: POST
    Relative Path: /v1/catalog/search
  3. Prepare a side-effect-free deployment plan for an authorized project
    Method: POST
    Relative Path: /v1/catalog/plan
  4. Read the existing agent authentication setup
    Method: GET
    Relative Path: /mcp/setup
  5. Browse Wholesale distributors
    Method: GET
    Relative Path: /v1/catalog/nodes/industry%3Awholesale-distributors
  6. Browse Product catalog
    Method: GET
    Relative Path: /v1/catalog/nodes/workload%3Aproduct-catalog
  7. Browse Django
    Method: GET
    Relative Path: /v1/catalog/nodes/stack%3Aframework-django
  8. Browse Deploy web app
    Method: GET
    Relative Path: /v1/catalog/nodes/intent%3Adeploy-web-app