OpenBooking / Docs / Packages / postgres
Package

@openbooking-sh/postgres

Last updated 2026-10-05 · Edit on GitHub

Postgres storage. Durable stores for everything OpenBooking keeps: bookings and holds (with a per-resource lock so two servers can never sell the same time), idempotency records, Studio activity, Cal.com records, and the hosted account, calendar, email and rate-limit stores. Works with pg pools and PGlite.

Part of OpenBooking: open-source booking that every AI assistant can use.

npm install @openbooking-sh/postgres

Usage #

import { connectPostgres, migrate, postgresStores } from '@openbooking-sh/postgres';

const db = connectPostgres(process.env.DATABASE_URL!);
await migrate(db); // idempotent; safe on every start
const stores = postgresStores(db);
// stores.bookings, stores.idempotency, stores.activity, stores.calcom, ...

Learn more #

Apache-2.0

This page is generated from packages/postgres/README.md in the open-source repository. To fix something, change it there.