page:blueprints:hospitality:public directory:laravel
Hospitality: public directory using Laravel
Summary
A public directory blueprint for hospitality built with Laravel 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 includes room types, amenities, rates, property location, policies, events, and dining. Guest identity documents, payment details, and stay history are kept out of scope until handling is reviewed due to their sensitivity.
Technical Basis
Verified on Laravel: 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).
Resource Requirements
primitive:computeprimitive:postgresprimitive:cdn
Infrastructure Requirements
- Compute
- Status: verified
- Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request.
- Postgres
- Status: verified
- Summary: Managed PostgreSQL 16 runs in its own microVM, auto-provisioned as needed.
- CDN
- Status: verified
- Summary: The CDN host serves objects from published buckets.
Workflow Steps
- Model the hospitality domain: Create the tables
room_types,inventory_movements,bookings,booking_lines,state_transitions. - Serve only published listings, with media from the CDN bucket.
- Enforce the agency scope on every query.
- Deploy and verify a published listing and ensure unpublished listings are absent.
- Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
- Command:
ample deploy . --name --public ...
- Command:
- Verify: Run the pattern self-tests and your acceptance checks for the hospitality workflow.
- Command:
ample logs --kind build
- Command:
Limitations
- Only availability and booking status are modeled here. Public content and synthetic examples until actual data-handling requirements are reviewed.
- Verified on the php-8.5 template; other sizes are unverified.
Cost Estimate
- Currency: USD
- Monthly Amount: $10.00
- Components:
- App server: Size: s-1vcpu-1gb, Monthly Amount: $5.00
- Managed PostgreSQL database: Size: s-1vcpu-1gb, Monthly Amount: $5.00