### Hospitality: Public Directory Using Django

A public directory blueprint for hospitality built with Django on Ample.

#### Domain Schema:
- **room_types** (sku, name, capacity, base_rate, amenities): room and package catalog  
- **inventory_movements** (sku, date, delta, reason): availability per date as stock movements  
- **bookings** (booking_no, check_in, check_out, status): bookings with status transitions  
- **booking_lines** (booking_no, sku, nights, rate): booking contents  
- **state_transitions** (record_type, from_state, to_state): the allowed state machine.

#### Public Information:
Room types, amenities and rates from property location and policies, events and dining.

Kept out of scope until handling is reviewed: guest identity documents, payment details, stay history. Guest identity documents are sensitive; only availability and booking status are modeled here.

#### Technical Basis:
Verified on Django: 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).

#### Representative Queries:
- Hospitality: public directory using Django
- Where can I host Hospitality: Public directory built with Django?
- I need a genuinely specialized public directory workflow covering property listings, service vendors and occupancy-related reporting.

#### Resource Requirements:
- **Compute**
- **Postgres**
- **CDN**

#### Infrastructure Requirements:
- **Compute**: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- **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.
- **CDN**: The CDN host serves objects from published buckets. It does not front app compute and is not a cache or key-value store.

#### Prerequisites:
1. 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)
2. A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
3. Bucket credentials from `ample bucket create` passed as encrypted S3_* environment variables and a published bucket for public assets (CDN_*)
4. A review of which hospitality data classes may be handled at all; this blueprint models public information only

#### Workflow Steps:
1. Model the hospitality domain: Create the tables room_types, inventory_movements, bookings, booking_lines, state_transitions. Room and package catalog lives in room_types; keep sensitive classes (guest identity documents, payment details, stay history) out of this schema.
2. Workflow step 1: Model listings with a publishing_status state machine scoped to the agency.
3. Workflow step 2: Serve only published listings, with media from the CDN bucket.
4. Workflow step 3: Enforce the agency scope on every query.
5. Workflow step 4: Deploy and verify a published listing and that unpublished listings are absent.
6. Deploy: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
7. Verify: Run the pattern self-test(s) from the example (/p/relational-records) and your own acceptance checks for the hospitality workflow.

#### Examples:
- **Django pattern fixture**: Verified relational records basis for this blueprint.

#### Success Checks:
- App responds on its public URL: **ample canary django patterns**
- Relational-records self-test from the example: **see the pattern fixture checks**

#### Limitations:
- The technical basis (relational records on Django) was verified with the pattern fixture; the hospitality schema and workflow are an original design for this blueprint and were not executed as a separate application.
- No health, financial, privacy or other compliance claim is made. Guest identity documents are sensitive; only availability and booking status are modeled here.
- Public content and synthetic examples only until actual data-handling requirements have been reviewed.
- Verified on the python-3.12 template at s-1vcpu-1gb; region, request-duration limits and other sizes are unknown or unverified.

#### Cost Estimate:
- **Currency**: USD
- **Monthly Amount**: $10.0
- **Basis**: size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty 
- **Components:**
  - App server: size s-1vcpu-1gb, quantity 1.0, monthly amount $5.0
  - Managed PostgreSQL database: size s-1vcpu-1gb, quantity 1.0, monthly amount $5.0
  - Note: Always-on monthly price of the tested sizes; apps and databases auto-pause when idle. Buckets are allocation-priced per quota and not included.

#### Evidence Summary:
- **Kind**: canary_run
- **Summary**: Django pattern fixture deployed on Ample (pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template); the relational records checks passed: 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-20T03:31:44Z
- **Implementation Revision**: 03b6402b1b3e19178985f08ea4033804521d85d4-dirty (CLI b75e104)
- **Expires At**: 2027-03-19T03:31:44Z

#### Last Verified At:
2026-09-20T03:31:44Z

#### Next Actions:
1. Browse the catalog index
2. Search published recipes by intent, stack and constraints
3. Prepare a side-effect-free deployment plan for an authorized project
4. Read the existing agent authentication setup
5. Browse Hospitality
6. Browse Public directory
7. Browse Django
8. Browse Deploy web app
