@tummycrypt/tinyland-business-pg
v0.1.1
Published
PostgreSQL business content and booking schemas for Tinyland apps
Readme
tinyland-business-pg
PostgreSQL table definitions for Tinyland business content and booking state.
All exported tables are tenant-scoped with tenant_id uuid NOT NULL; consuming
apps enforce tenant isolation through RLS and tenant-scoped queries.
This package is intentionally separate from @tummycrypt/tinyland-auth-pg.
Auth storage remains in the auth package. Business profile, services, hours,
practitioners, clients, bookings, blocks, overrides, and checkout reservations
live here so reusable scheduling adapters can depend on explicit business
schema authority without pulling in auth storage.
Install
pnpm add @tummycrypt/tinyland-business-pg drizzle-ormExports
import * as businessPg from '@tummycrypt/tinyland-business-pg';
import * as contentSchema from '@tummycrypt/tinyland-business-pg/content-schema';
import * as bookingSchema from '@tummycrypt/tinyland-business-pg/booking-schema';Scheduling Kit
@tummycrypt/scheduling-kit can consume this package through explicit schema
injection:
import { createHomegrownAdapter } from '@tummycrypt/scheduling-kit/adapters/homegrown';
import * as bookingSchema from '@tummycrypt/tinyland-business-pg/booking-schema';
import * as contentSchema from '@tummycrypt/tinyland-business-pg/content-schema';
const adapter = createHomegrownAdapter({
databaseUrl: process.env.DATABASE_URL,
schemas: {
booking: bookingSchema,
content: contentSchema,
},
});That is a package boundary, not Bazel remote execution. Bazel builds this package artifact and makes it cacheable; remote execution remains a separate infrastructure authority.
Tables
Content tables:
business_profileservicesbusiness_hoursreviewspractitioners
Booking tables:
clientsbookingstime_blocksbusiness_hours_overridesslot_reservations
Validation
pnpm install --frozen-lockfile
pnpm typecheck
pnpm test:unit
pnpm build
pnpm check:package
bazel build //:pkg
bazel test //:test