Rooms & Inventory
Where every booking actually lives or dies. The room model has to be flexible enough for a roadside lodge with three rooms, and for a 200-key beach resort. Two layers — room types & physical units — let us do both.
Room types vs room units
Room Type (sellable)
- "Deluxe King Mountain View"
- Has a name, description, photos, amenities, max occupancy, base rate
- This is what the guest sees and books
- Holds N physical units
Room Unit (physical)
- "Room 204", "Room 205", "Cottage 3"
- An actual key in an actual building
- The hotel uses these for housekeeping & assignment
- Guest is assigned a specific unit at check-in
Adding a room type
Name & description
e.g. "Deluxe King — Mountain View". 1–3 sentence description. Search-discoverable.
Capacity & bed config
Adults · children · max guests. Bed config: 1 king, or 2 twins, or 1 queen + sofa-bed.
Size & view
Room size in sq ft / sq m. View tag: mountain · sea · garden · pool · city · courtyard.
Amenities
Checkbox grid: AC, heater, geyser, Wi-Fi, kettle, mini-bar, TV, balcony, in-room safe, etc. Each maps to an icon on the guest page.
Photos
At least 3 photos per room type. First is the cover. Owner can re-order via drag.
Pricing (base)
Base rate per night. Optional weekend rate. Detailed rate plans live on the Pricing Engine page.
Physical units
Either type a number (auto-generates Room 1…N) or paste a list (e.g. "201, 202, 203, 301, 302").
Save & enable
Room type is now bookable. Toggle disabled to hide from search without deleting.
UI — room type list
Physical units & status
Each physical room unit carries its own state, independent of bookings, so housekeeping and maintenance never collide with sales.
| State | Bookable? | Why |
|---|---|---|
| available | Yes | Clean, inspected, ready |
| occupied | No (today) | A guest is currently checked in |
| dirty | No | Just checked out, awaiting housekeeping |
| inspecting | No | Cleaned, supervisor checking |
| out_of_order | No | Maintenance issue, won't sell |
| out_of_service | No | Long-term block (renovation) |
Availability for a room type on a date = total units − units booked − units in out_of_order / out_of_service. The availability page shows this grid and lets you block dates manually.
Amenities catalogue
We keep a central catalogue of ~80 amenity codes so search filters are consistent across properties.
Photos pipeline
On upload:
- Validate MIME + extension; reject non-images.
- Strip EXIF (privacy + smaller files).
- Generate 3 sizes:
thumb 200w,card 600w,hero 1600w; all WebP. - Compute perceptual hash; warn if duplicate of an existing image on the property.
- Run NSFW classifier in background; flag for review if score > 0.3.
- Upload all sizes to S3; store original in private bucket for re-rendering.
API contract — create room type
{
"name": "Deluxe King — Mountain View",
"description": "Spacious room with...",
"max_adults": 2,
"max_children": 1,
"bed_config": [{ "type": "king", "count": 1 }],
"size_sqft": 320,
"view": "mountain",
"amenities": ["wifi", "ac", "heater", "balcony"],
"photos": ["s3://...", "s3://..."],
"base_rate": 4200,
"weekend_rate": 4800,
"physical_units": [
"201", "202", "203", "301", "302", "303"
]
}