DEV Community

Kayabyte
Kayabyte

Posted on

Booking for kennels and dog daycares is a capacity problem, not a calendar problem

Full disclosure up front: I build Wix apps, and the one this post is about, Pet Boarding, is mine. Most of this post is about the booking logic itself, which applies whatever platform you build on.

Why appointment tools don't fit

Most booking tools are built around appointments: one client, one staff member, one time slot. A kennel or a dog daycare works differently:

  • A boarding stay is a range of nights, from a drop-off day to a pick-up day.
  • Daycare is a set of single days, sometimes half days.
  • What runs out is space, not staff time. A kennel with 12 runs can take 12 dogs per night, whoever books them.
  • Price depends on the pet, not just the service: size tiers, a discount for a second dog from the same family, weekend or holiday extras, a late pick-up fee.

So the core question for every request is "is there a free space on every night of this stay", and the price is a sum over nights and pets.

Capacity per night

The availability check counts how many spaces are taken on each night of the requested stay and compares that with the service's capacity:

// taken[night] = spaces used that night by confirmed bookings and live holds
function fits(stayNights, petsNeeded, capacity, taken) {
  return stayNights.every((night) => (taken[night] ?? 0) + petsNeeded <= capacity);
}
Enter fullscreen mode Exit fullscreen mode

Two details matter in practice:

  • Family suites. Many kennels put dogs from one family in one run. With suites on, a family of two dogs uses one space, so petsNeeded becomes the number of suites, not the number of pets.
  • The calendar should only offer dates that work. The widget asks the backend for free spaces per night in the visible months and greys out days where the stay could not start, so owners don't pick dates and then get an error.

Holds, because payment takes time

Between "Continue" and a finished payment, two owners can try to take the last space. A short hold solves that: when a checkout starts, the space is held for the stay's nights, and the hold expires if nobody pays. Capacity is checked again when the hold is written, and simultaneous requests for the last space get a clear winner, so two owners can't both take it.

Manual payments (cash or bank transfer at drop-off) need a longer hold, because the order exists but the money comes later. In the app, online checkouts hold the space for 30 minutes and pending manual payments for 3 days.

Prices per pet

The quote is built night by night and pet by pet, then adjusted:

  • base price per night (boarding) or per day (daycare, with a half-day price),
  • a size tier per pet,
  • an extra-pet discount for the second and later pets of the same owner,
  • weekend and peak-date extras,
  • a long-stay discount above a number of nights,
  • a late pick-up fee when the pick-up time is after the cut-off.

Rounding happens in the currency's smallest step, so a 10% discount on a price in yen or Indonesian rupiah doesn't produce fractions.

Records that have to stay private

Owners upload vaccination records (PDF or a photo). These are health-related documents about someone's pet and contact details about the owner, so they are stored per site, served only to that site's dashboard, and size-capped (5 MB per file). Old owner and pet details are cleared after a retention period.

What the business sees

The part kennel owners care about most is not the booking form but the day: who is dropping off today, who is picking up, which pets are in care and any care notes. A printable day sheet, an occupancy calendar and a form for bookings taken by phone matter more to them than any widget design.

Summary

If you build booking for boarding or daycare, model capacity per night (or per day), make holds part of the capacity check, price per pet, and treat uploaded records as private data from the start.

If you run a kennel, cattery or dog daycare on Wix, Pet Boarding does this on your own site, with deposits through your checkout and a free plan for one service. It only works on Wix sites. More about it: https://kayabyte.dev/wix/pet-boarding/

Top comments (0)