Apointoo

A TypeScript SDK that fits your stack.

Handler-first API, fully typed, tree-shakeable adapters. Runs on Node.js, Deno, Cloudflare Workers, and any edge runtime that supports the Fetch API.

$npm install git+https://github.com/vizuh/apointoo-sdk.gitnpm

Quick start

Three imports. One handler export. Deploy to any route in your Next.js, Hono, or Express app.

import { createBookingHandler } from '@vizuh/apointoo-sdk/server'
import { brevoRestAdapter } from '@vizuh/apointoo-sdk/adapters/notification/brevo-rest'
import { directConfirmAdapter } from '@vizuh/apointoo-sdk/adapters/booking/direct-confirm'

export const app = createBookingHandler({
  config: {
    projectKey: 'your-clinic',
    locale: 'en-US',
    timezone: 'America/New_York',
  },
  booking: directConfirmAdapter(),
  notification: brevoRestAdapter({ apiKey: env.BREVO_API_KEY }),
})

Adapters

Each integration is a tree-shakeable adapter. Import only what you use.

AdapterTypeStatusImport
BLVDbookingproduction@vizuh/apointoo-sdk/adapters/booking/blvd
OpenDentalbookingbeta@vizuh/apointoo-sdk/adapters/booking/open-dental
direct-confirmbookingproduction@vizuh/apointoo-sdk/adapters/booking/direct-confirm
Brevo RESTnotificationproduction@vizuh/apointoo-sdk/adapters/notification/brevo-rest
Twilio WhatsAppnotificationbeta@vizuh/apointoo-sdk/adapters/notification/twilio-whatsapp
Sheetspersistenceproduction@vizuh/apointoo-sdk/adapters/persistence/sheets
Upstashdedupproduction@vizuh/apointoo-sdk/adapters/dedup/upstash

Architecture

The handler is the entry point. It delegates to a pipeline, which calls the configured adapters in sequence.

Handler
Pipeline
Booking adapter
Notification adapter
Persistence adapter
Dedup adapter

Environment variables

All configuration is via environment variables. No SDK-specific config files.

VariableRequiredDescription
NEXT_PUBLIC_GTM_IDNoGoogle Tag Manager container ID. Leave empty to disable GTM.
WP_GRAPHQL_URLNoWordPress GraphQL endpoint for /docs and /blog content.
BREVO_API_KEYNoBrevo (Sendinblue) REST API key for the Brevo notification adapter.
BLVD_API_KEYNoBLVD API key for the BLVD booking adapter.
UPSTASH_REDIS_URLNoUpstash Redis REST URL for the dedup adapter.
UPSTASH_REDIS_TOKENNoUpstash Redis REST token.
GOOGLE_SHEETS_SPREADSHEET_IDNoGoogle Sheets spreadsheet ID for the persistence adapter.