page:recipes:project tracker:flask:relational workspace

Host project tracker with Flask: relational workspace data

Deploy a project tracker built with Flask on Ample using the relational records pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Flask: 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). Not separately tested: your record schema, states and access rules; treat the project tracker-specific behavior as your application code.

Summary

Representative Queries

Prerequisites

  1. A Flask project that builds and starts with the documented commands (pip install into .ample/python from requirements.txt, then waitress from app.py reading PORT on the python-3.12 template)
  2. A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env)
  3. An Ample account token with servers:write, databases:read

Tested Configuration

Input Schema

{
  "additionalProperties": false,
  "properties": {
    "env": {
      "description": "Encrypted environment variables (bucket credentials, secrets)",
      "items": {
        "pattern": "^[A-Z][A-Z0-9_]*=.*$",
        "type": "string"
      },
      "maxItems": 50,
      "type": "array"
    },
    "name": {
      "description": "App name",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9-]+$",
      "type": "string"
    },
    "path": {
      "description": "Project directory or ample.toml service",
      "maxLength": 512,
      "minLength": 1,
      "type": "string"
    },
    "release_command": {
      "description": "Migration command run before activation",
      "maxLength": 512,
      "type": "string"
    },
    "start": {
      "description": "Start command (Python apps pass one explicitly)",
      "maxLength": 512,
      "type": "string"
    }
  },
  "required": ["name", "path", "start"],
  "type": "object"
}

Workflow Steps

Success Checks

  1. App responds on its public URL: kind: http_get, path: /, expect: ample canary flask patterns
  2. Relational-records self-test: kind: http_get, path: /p/relational-records, expect: records=ok transitions=true isolation=true

Limitations

Cost Estimate

Components

  1. App Server: size s-1vcpu-1gb, quantity 1.0, monthly amount 5.0
  2. Managed PostgreSQL Database: size s-1vcpu-1gb, quantity 1.0, monthly amount 5.0

Evidence Summary

  1. Kind: canary_run,Summary: Flask pattern fixture deployed on Ample (pip install into .ample/python from requirements.txt, then waitress from app.py reading PORT on the python-3.12 template); checks passed for relational-records and configuration-secrets. Pattern proof: 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). Observed At: 2026-09-21T01:14:18Z
  2. Kind: canary_run, Summary: The same Flask app deployed with a --release-command migration; the marker it created was readable after activation. Observed At: 2026-09-20T01:54:51Z

Action Items

  1. Browse the catalog index: Method: GET, Path: /v1/catalog
  2. Search published recipes by intent, stack and constraints: Method: POST, Path: /v1/catalog/search
  3. Prepare a side-effect-free deployment plan for an authorized project: Method: POST, Path: /v1/catalog/plan
  4. Read the existing agent authentication setup: Method: GET, Path: /mcp/setup
  5. Browse Project tracker: Method: GET, Path: /v1/catalog/nodes/workload%3Aproject-tracker
  6. Browse Flask: Method: GET, Path: /v1/catalog/nodes/stack%3Aframework-flask
  7. Browse Relational records: Method: GET, Path: /v1/catalog/nodes/pattern%3Arelational-records
  8. Browse Deploy web app: Method: GET, Path: /v1/catalog/nodes/intent%3Adeploy-web-app