Installation
Prerequisites
Section titled “Prerequisites”- Node.js 20+
- PostgreSQL 15+ (local, Neon, Supabase, Railway, Vercel Postgres, AWS RDS)
Install packages
Section titled “Install packages”npm install @thebookingkit/core @thebookingkit/dbThe UI components follow the shadcn/ui convention — you copy them into your project rather than installing via npm. See the Components overview for details.
Database setup
Section titled “Database setup”1. Configure connection
Section titled “1. Configure connection”Create a .env file with your Postgres connection string:
DATABASE_URL="postgresql://user:pass@localhost:5432/thebookingkit"2. Push schema
Section titled “2. Push schema”# Create tables, enums, and indexesnpx drizzle-kit push
# Apply custom SQL migrations (btree_gist extension, audit triggers, GDPR functions)# If using the CLI, this is handled automatically via 'npx thebookingkit migrate'npx tsx packages/db/src/migrate.ts3. Seed sample data (optional)
Section titled “3. Seed sample data (optional)”npm run db:seed -w @thebookingkit/dbLocal development with Docker
Section titled “Local development with Docker”If you don’t have a Postgres instance, use the included docker-compose.yml:
docker compose up -dThis starts Postgres 15 on port 5432 with a thebookingkit database.
Monorepo development
Section titled “Monorepo development”If you’re working on The Booking Kit itself:
git clone https://github.com/zainalshanan/thebookingkit.gitcd thebookingkitnpm install
# Run all teststurbo test
# Build all packagesturbo build
# Type checkturbo typecheckVerify installation
Section titled “Verify installation”import { getAvailableSlots, isSlotAvailable } from "@thebookingkit/core";
console.log(typeof getAvailableSlots); // "function"console.log(typeof isSlotAvailable); // "function"