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

  1. Name & description

    e.g. "Deluxe King — Mountain View". 1–3 sentence description. Search-discoverable.

  2. Capacity & bed config

    Adults · children · max guests. Bed config: 1 king, or 2 twins, or 1 queen + sofa-bed.

  3. Size & view

    Room size in sq ft / sq m. View tag: mountain · sea · garden · pool · city · courtyard.

  4. 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.

  5. Photos

    At least 3 photos per room type. First is the cover. Owner can re-order via drag.

  6. Pricing (base)

    Base rate per night. Optional weekend rate. Detailed rate plans live on the Pricing Engine page.

  7. Physical units

    Either type a number (auto-generates Room 1…N) or paste a list (e.g. "201, 202, 203, 301, 302").

  8. Save & enable

    Room type is now bookable. Toggle disabled to hide from search without deleting.

UI — room type list

app.abc.com/properties/parkview/rooms
Room types — Park View Hotel
3 types · 12 physical units
Deluxe King — Mountain View
1 king bed · 2 adults + 1 child · 320 sq ft · mountain view
ACHeaterWi-FiBalcony+4 more
₹4,200/night
6 units · 5 available today
Family Suite
1 king + 2 twin · 4 adults · 480 sq ft · pool view
ACHeaterWi-FiMini bar+6 more
₹6,800/night
4 units · 4 available today
Standard Twin Disabled
2 twin · 2 adults · 240 sq ft
₹2,800/night
2 units · hidden from search

Physical units & status

Each physical room unit carries its own state, independent of bookings, so housekeeping and maintenance never collide with sales.

StateBookable?Why
availableYesClean, inspected, ready
occupiedNo (today)A guest is currently checked in
dirtyNoJust checked out, awaiting housekeeping
inspectingNoCleaned, supervisor checking
out_of_orderNoMaintenance issue, won't sell
out_of_serviceNoLong-term block (renovation)
Inventory math

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.

wifiacheatergeyser tvsmart_tvnetflixkettle mini_barin_room_safebalconyprivate_pool jacuzziworkstationironhair_dryer wheelchairpet_friendlysmokingsoundproof

Photos pipeline

On upload:

  1. Validate MIME + extension; reject non-images.
  2. Strip EXIF (privacy + smaller files).
  3. Generate 3 sizes: thumb 200w, card 600w, hero 1600w; all WebP.
  4. Compute perceptual hash; warn if duplicate of an existing image on the property.
  5. Run NSFW classifier in background; flag for review if score > 0.3.
  6. Upload all sizes to S3; store original in private bucket for re-rendering.

API contract — create room type

POST /api/properties/:id/room-types
{
  "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"
  ]
}