ConvexBooking

Add room, person, and equipment booking with scheduling, inventory, and lifecycle management to any Convex app using @mrfinch/booking.

Installation

npm install @mrfinch/booking

About ConvexBooking

A Convex component for booking rooms, people, and equipment. Manage timezone-aware availability, prevent conflicting bookings, and reserve multiple resources atomically. Supports equipment pools, confirmation, cancellation, rescheduling, and token-based booking management. Use the backend API for custom interfaces or the included React Booker for single-resource booking flows.

Benefits

Use cases

how to add room booking to a Convex app

Install @mrfinch/booking, register the component in convex/convex.config.ts using app.use(booking), then render the Booker component wrapped in BookingProvider with your event type and resource IDs. The component manages availability, slot selection, contact details, and confirmation in its own database.

how to book multiple resources atomically in Convex

@mrfinch/booking provides a multi-resource API that reserves several resources in a single atomic operation, which is also how pool quantities are tracked. Single-resource booking flows will reject pool resources, so use the multi-resource API when combining rooms, people, or equipment into one booking.

how to handle booking cancellation and rescheduling in Convex

@mrfinch/booking supports confirmation, decline, cancellation, and atomic rescheduling as part of its lifecycle API. Host functions call components.booking.* after performing their own authorization and policy checks, and provisional bookings can be expired under host control.

how to send booking confirmation emails from Convex

@mrfinch/booking includes optional Resend integration for notifications and token-based management links. You can also supply a custom email renderer to use your own design, following the email guide in the component documentation.

Frequently asked questions

Does @mrfinch/booking expose public Convex mutations that clients can call directly?

No. Browser clients call host functions that you write and control. Those host functions perform authorization and policy checks before calling components.booking.* internally. The old public makeBookingAPI factory was removed in version 0.4.0 and must be replaced with authorized host wrappers.

What Convex version does @mrfinch/booking require?

@mrfinch/booking requires Convex 1.46 or newer. Install it alongside the component with npm install @mrfinch/booking convex@^1.46.0. Node 24 LTS is recommended for development.

Can I use @mrfinch/booking without the React Booker UI?

Yes. The React Booker and its peer dependencies are optional. Backend-only apps can skip installing convex-helpers, react-hook-form, @hookform/resolvers, and lucide-react, and interact with the component entirely through host functions calling components.booking.*.

How does @mrfinch/booking handle timezone-aware scheduling?

@mrfinch/booking supports weekly hours, date overrides, and IANA timezones in its schedule model. Booking timestamps are stored as Unix milliseconds and availability is tracked on a 15-minute grid.

How do I test host functions that use @mrfinch/booking with convex-test?

@mrfinch/booking exposes its schema and modules for use with convex-test. After installing convex-test and Vitest, import bookingComponent from @mrfinch/booking/test and call bookingComponent.register(t) before invoking host functions in your tests. Pass a second argument to register if you mounted the component under a non-default name.

Links