npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tummycrypt/scheduling-kit

v0.6.1

Published

Backend-agnostic scheduling components with alternative payment support

Readme

@tummycrypt/scheduling-kit

Backend-agnostic scheduling system with Svelte 5 components, multiple scheduling adapters, and alternative payment support. Built with fp-ts for functional composition and Zod for runtime validation.

Docs, prebuilts, packages and blog post to come later. Another tinyland artifact it is time to publish. This package powers scheduling transactions for small buisnesses in the eastern US for whom I've done contracting work.

Features

  • Multiple scheduling backends -- Acuity, Cal.com, or bring-your-own PostgreSQL (HomegrownAdapter)
  • Svelte 5 components -- ServicePicker, DateTimePicker, ClientForm, CheckoutDrawer, and more
  • Payment adapters -- Stripe, Venmo/PayPal SDK, cash, Zelle, check
  • Availability engine -- Pure-function slot generation, DST-safe via Intl.DateTimeFormat
  • Reconciliation -- Alt-payment matching and webhook handling
  • Test infrastructure -- Cassette-based API recording/playback, MSW mocking, property-based tests
  • Functional core -- fp-ts TaskEither pipelines throughout

Installation

pnpm add @tummycrypt/scheduling-kit

Peer dependencies (install those you need):

# Required
pnpm add svelte

# Optional -- for UI components
pnpm add @skeletonlabs/skeleton @skeletonlabs/skeleton-svelte

# Optional -- for E2E tests
pnpm add -D playwright-core

Quick Start

import {
  createSchedulingKit,
  createHomegrownAdapter,
  createStripeAdapter,
  createVenmoAdapter,
} from '@tummycrypt/scheduling-kit';

// Create a scheduling adapter
const scheduler = createHomegrownAdapter({
  db: drizzleInstance,
  timezone: 'America/New_York',
});

// Create payment adapters
const stripe = createStripeAdapter({
  type: 'stripe',
  secretKey: process.env.STRIPE_SECRET_KEY!,
  publishableKey: process.env.STRIPE_PUBLISHABLE_KEY!,
});

const venmo = createVenmoAdapter({
  type: 'venmo',
  clientId: process.env.PAYPAL_CLIENT_ID!,
  clientSecret: process.env.PAYPAL_CLIENT_SECRET!,
  environment: 'sandbox',
});

// Compose into a scheduling kit
const kit = createSchedulingKit(scheduler, [stripe, venmo]);

// Complete a booking
const result = await kit.completeBooking(request, 'stripe')();

Adapters

HomegrownAdapter

Direct PostgreSQL adapter using Drizzle ORM. Replaces third-party scheduling APIs entirely.

import { createHomegrownAdapter } from '@tummycrypt/scheduling-kit/adapters';

const adapter = createHomegrownAdapter({
  db: drizzleInstance,
  timezone: 'America/New_York',
});

// 16 methods: getServices, getAvailability, getSlots, book, cancel, reschedule, ...

AcuityAdapter

API-based adapter for Acuity Scheduling (requires Powerhouse plan).

import { createAcuityAdapter } from '@tummycrypt/scheduling-kit/adapters';

const config = {
  type: 'acuity' as const,
  userId: process.env.ACUITY_USER_ID!,
  apiKey: process.env['ACUITY_API_KEY']!,  // from Acuity Integrations page
};
const adapter = createAcuityAdapter(config);

CalComAdapter

Stub adapter for future Cal.com integration.

import { createCalComAdapter } from '@tummycrypt/scheduling-kit/adapters';

const adapter = createCalComAdapter({
  type: 'calcom',
  apiKey: process.env['CALCOM_API_KEY']!,
  baseUrl: 'https://api.cal.com/v1',
});

Availability Engine

Pure functions for slot generation. DST-safe, timezone-aware, fully tested.

import {
  getAvailableSlots,
  isSlotAvailable,
  getDatesWithAvailability,
  getEffectiveHours,
} from '@tummycrypt/scheduling-kit/adapters';

const slots = getAvailableSlots({
  date: '2026-03-22',
  timezone: 'America/New_York',
  hours: [{ dayOfWeek: 6, startTime: '11:00', endTime: '16:00' }],
  overrides: [],
  occupied: [],
  slotDuration: 60,
  bufferMinutes: 15,
});

Components

Svelte 5 components using runes syntax. Optional Skeleton 4 integration for styling.

| Component | Description | |-----------|-------------| | ServicePicker | Service/appointment type selector | | DateTimePicker | Calendar date + time slot picker | | ClientForm | Client info form with Zod validation | | PaymentSelector | Payment method chooser | | ProviderPicker | Practitioner/provider selector | | BookingConfirmation | Post-booking confirmation display | | CheckoutDrawer | Full checkout flow in a slide-out drawer | | HybridCheckoutDrawer | Checkout with Acuity embed handoff | | VenmoButton | Venmo/PayPal payment button | | VenmoCheckout | Full Venmo checkout flow | | StripeCheckout | Stripe Elements checkout | | AcuityEmbedHandoff | Acuity iframe embed with message passing |

<script lang="ts">
  import { ServicePicker, DateTimePicker, ClientForm } from '@tummycrypt/scheduling-kit/components';
</script>

<ServicePicker services={data.services} onselect={handleSelect} />
<DateTimePicker slots={availableSlots} onselect={handleTimeSelect} />
<ClientForm onsubmit={handleSubmit} />

Payment Adapters

import {
  createStripeAdapter,
  createVenmoAdapter,
  createCashAdapter,
  createZelleAdapter,
  createCheckAdapter,
  createVenmoDirectAdapter,
} from '@tummycrypt/scheduling-kit/payments';

| Adapter | Type | Description | |---------|------|-------------| | createStripeAdapter | stripe | Stripe Connect with Payment Intents | | createVenmoAdapter | venmo | PayPal SDK with Venmo button | | createCashAdapter | cash | Cash/in-person manual payment | | createZelleAdapter | zelle | Zelle manual payment | | createCheckAdapter | check | Check manual payment | | createVenmoDirectAdapter | venmo-direct | Venmo deep link (no SDK) |

Reconciliation

Match alt-payment transactions (Venmo, Zelle, cash) to bookings.

import { createReconciliationMatcher } from '@tummycrypt/scheduling-kit/reconciliation';

Stores

Svelte 5 runes-based checkout state management.

import { checkoutStore } from '@tummycrypt/scheduling-kit/stores';

Testing

Unit Tests

pnpm test:unit           # Run all unit tests
pnpm test:coverage       # With coverage report

Integration Tests

pnpm test:integration    # Mocked backend integration tests

Component Tests

pnpm test:component      # jsdom-based component tests

E2E Tests

pnpm test:e2e            # Playwright browser tests (starts dev server)

Live Tests

# Copy .env.test.local.example to .env.test.local and fill in credentials
RUN_LIVE_TESTS=true pnpm test:live

Test Utilities

The @tummycrypt/scheduling-kit/testing export provides cassette-based API recording and playback for deterministic integration tests.

import { CassetteRecorder, CassettePlayer } from '@tummycrypt/scheduling-kit/testing';

Development

pnpm install
pnpm dev              # Start dev server
pnpm build            # Build package
pnpm check            # TypeScript check
pnpm lint             # ESLint
pnpm test:all         # Run all test suites

License

MIT -- see LICENSE for details.