@thebookingkit/core
v0.2.0
Published
Headless scheduling engine: slot computation, RRULE expansion, team assignment, resource & capacity booking, recurring bookings, walk-ins, and kiosk mode
Maintainers
Readme
@thebookingkit/core
Framework-agnostic scheduling math engine for building booking systems.
Part of The Booking Kit — The Headless Booking Primitive.
Install
npm install @thebookingkit/coreQuick Start
import { getAvailableSlots, isSlotAvailable } from "@thebookingkit/core";
const slots = getAvailableSlots(
availabilityRules,
overrides,
existingBookings,
{ start: new Date("2026-03-09"), end: new Date("2026-03-10") },
"America/New_York",
{ duration: 30, bufferBefore: 5, bufferAfter: 5 }
);
const check = isSlotAvailable(rules, overrides, bookings, startTime, endTime);Key Features
- Slot Engine —
getAvailableSlotsandisSlotAvailablewith buffer time, booking limits, and minimum notice - RRULE Parsing — Expand recurring availability rules with iCalendar EXDATE support
- Timezone Utilities — UTC normalization, local conversion, offset calculation via
date-fns-tz - Team Scheduling —
getTeamSlots,assignHostwith round-robin, least-busy, and random strategies - Recurring Bookings — Generate occurrences, check series availability, cancel future occurrences
- Seats / Group Bookings — Seat availability computation, reservation validation, group event summaries
- Walk-In Queue — Wait time estimation, gap finding, queue management, analytics
- Kiosk Mode — Settings validation, break/block management, multi-provider resource views
- Routing Forms — Form validation, rule evaluation, response routing, analytics
- Payments — Cancellation policies, fee calculation, payment summaries, currency validation
- Embeddable Widgets — Config validation and embed snippet generation
- Zero dependencies on React or Node.js — runs in browser, edge, and server environments
Documentation
License
MIT
