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/acuity-middleware

v0.1.1

Published

Playwright-based Acuity booking middleware server

Readme

acuity-middleware

Playwright-based Acuity Scheduling booking middleware. Proxies booking operations through browser automation, enabling programmatic access to Acuity's scheduling wizard without API access.

Architecture

An HTTP server wrapping Playwright wizard flows that automate the Acuity booking UI. The middleware uses Effect TS for resource lifecycle management (browser/page acquisition and release) and fp-ts for composable error handling.

HTTP Request
  -> server.ts (route matching, auth, JSON serialization)
    -> steps/ (Effect TS programs for each wizard stage)
      -> browser-service.ts (Playwright lifecycle via Effect Layer)
        -> selectors.ts (CSS selector registry with fallback chains)

Key Components

  • server.ts -- Standalone Node.js HTTP server with Bearer token auth
  • browser-service.ts -- Effect TS Layer managing Playwright browser/page lifecycle
  • acuity-wizard.ts -- Full SchedulingAdapter implementation (local Playwright or remote HTTP proxy)
  • remote-adapter.ts -- HTTP client adapter for proxying to a remote middleware instance
  • selectors.ts -- Single source of truth for all Acuity DOM selectors
  • steps/ -- Individual wizard step programs (navigate, fill-form, bypass-payment, submit, extract)
  • acuity-scraper.ts -- Read-only scraper for services, dates, and time slots

Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /health | Health check (no auth required) | | GET | /services | List all appointment types | | GET | /services/:id | Get a specific service | | POST | /availability/dates | Available dates for a service | | POST | /availability/slots | Time slots for a specific date | | POST | /availability/check | Check if a slot is available | | POST | /booking/create | Create a booking (standard) | | POST | /booking/create-with-payment | Create booking with payment bypass (coupon) |

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | PORT | No | 3001 | Server port | | ACUITY_BASE_URL | No | https://MassageIthaca.as.me | Acuity scheduling page URL | | AUTH_TOKEN | Recommended | -- | Bearer token for all endpoints (except /health) | | ACUITY_BYPASS_COUPON | For payment bypass | -- | 100% gift certificate code | | PLAYWRIGHT_HEADLESS | No | true | Run browser headless | | PLAYWRIGHT_TIMEOUT | No | 30000 | Page operation timeout (ms) | | CHROMIUM_EXECUTABLE_PATH | No | -- | Custom Chromium path (for Lambda/serverless) | | CHROMIUM_LAUNCH_ARGS | No | -- | Comma-separated Chromium args |

Deployment

Standalone Node.js

pnpm install
pnpm dev           # Development with tsx
# or
pnpm build && pnpm start  # Production

Docker

docker build -t acuity-middleware .
docker run -p 3001:3001 \
  -e AUTH_TOKEN=your-secret-token \
  -e ACUITY_BASE_URL=https://YourBusiness.as.me \
  -e ACUITY_BYPASS_COUPON=your-coupon-code \
  acuity-middleware

Modal Labs

# Set secrets in Modal dashboard first:
#   AUTH_TOKEN, ACUITY_BASE_URL, ACUITY_BYPASS_COUPON
modal deploy modal-app.py

Nix

nix develop   # Enter dev shell with Node.js + Playwright
pnpm install
pnpm dev

Development

pnpm install      # Install dependencies
pnpm dev          # Start dev server with tsx
pnpm typecheck    # Run TypeScript type checking
pnpm build        # Compile TypeScript to dist/
pnpm test         # Run tests

License

MIT