Skip to content

Installation

  • Node.js 20+
  • PostgreSQL 15+ (local, Neon, Supabase, Railway, Vercel Postgres, AWS RDS)
Terminal window
npm install @thebookingkit/core @thebookingkit/db

The UI components follow the shadcn/ui convention — you copy them into your project rather than installing via npm. See the Components overview for details.

Create a .env file with your Postgres connection string:

Terminal window
DATABASE_URL="postgresql://user:pass@localhost:5432/thebookingkit"
Terminal window
# Create tables, enums, and indexes
npx 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.ts
Terminal window
npm run db:seed -w @thebookingkit/db

If you don’t have a Postgres instance, use the included docker-compose.yml:

Terminal window
docker compose up -d

This starts Postgres 15 on port 5432 with a thebookingkit database.

If you’re working on The Booking Kit itself:

Terminal window
git clone https://github.com/zainalshanan/thebookingkit.git
cd thebookingkit
npm install
# Run all tests
turbo test
# Build all packages
turbo build
# Type check
turbo typecheck
import { getAvailableSlots, isSlotAvailable } from "@thebookingkit/core";
console.log(typeof getAvailableSlots); // "function"
console.log(typeof isSlotAvailable); // "function"