page:blueprints:equipment rental:order tracking:django
Equipment Rental: Order Tracking Using Django
Summary
A order tracking blueprint for equipment rental built with Django on Ample. Domain schema: equipment (sku, name, category, day_rate, serial_tracked): rental catalog; stock_movements (sku, unit_serial, delta, reason, moved_at): check-outs, returns and maintenance; rentals (rental_no, period_start, period_end, status): rentals with status transitions; rental_lines (rental_no, sku, unit_serial, rate): rental contents; events (seq, record_type, record_id, kind, at): application-owned history written in the same transaction.
Public information: equipment catalog and rates, availability calendar, deposit and insurance terms.
Schema
- equipment: (sku, name, category, day_rate, serial_tracked)
- stock_movements: (sku, unit_serial, delta, reason, moved_at)
- rentals: (rental_no, period_start, period_end, status)
- rental_lines: (rental_no, sku, unit_serial, rate)
- events: (seq, record_type, record_id, kind, at)
Technical Basis
Verified on Django: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected).
Resource Requirements
- Compute
- PostgreSQL
- S3-compatible object storage
Infrastructure Requirements
Compute
- Label: Compute
- Status: Verified
- Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
Postgres
- Label: Postgres
- Status: Verified
- Summary: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
S3-compatible Object Storage
- Label: S3-compatible object storage
- Status: Verified
- Summary: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary.
Workflow Steps
- Model the equipment rental domain: Create the tables equipment, stock_movements, rentals, rental_lines, events. Keep the sensitive classes out of schema.
- Model orders with explicit status transitions and order lines.
- Apply status changes transactionally and record an event per change.
- Expose status history to authorized callers only.
- Deploy and verify history and conflict rejection.
- Run the synchronous deploy once and read the result.
Command:ample deploy . --name --public --start "python3 run.py" --env S3_ENDPOINT=...
Parameters for S3 credentials... - Verify: Run pattern self-test and acceptance checks for the equipment rental workflow.
Command:ample logs --kind build.
Limitations
- The equipment rental schema and workflow are an original design and were not executed as a separate application.
- No health, financial, privacy or other compliance claims are made.
Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Authoritative: True
- Basis: Size prices from pricing.toml loaded by the API
Evidence Summary
Type: Canary run
Summary: Django pattern fixture deployed on Ample; checks passed: an optimistic version check and an event row written in the same transaction. The blueprint's Equipment rental schema and workflow build on that verified basis.
Next Actions
- Browse the catalog index
- Search published recipes by intent, stack, and constraints
- Prepare a side-effect-free deployment plan for an authorized project
- Read the existing agent authentication setup
- Browse Equipment rental
- Browse Order tracking
- Browse Django
- Browse Deploy web app