AI agents

Yoga studio chatbot for class questions and trial bookings

Website chatbot that answers class questions from studio facts and collects trial session requests for the studio to confirm, built with Node, TypeScript and

nodejstypescriptexpressanthropicclaude

Built 1 time, downloaded 0 times.

Install from your terminal

Run this in your project folder. It signs you in, shows what changes and asks before it overwrites a file.

npx claude-lab add yoga-studio-chatbot-for-class-questions-and-trial-bookings-97bb29
11 filesDownload zip
CLAUDE.md
# Yoga studio chatbot

## Purpose

A website chatbot for a yoga studio. It answers questions about classes and books trial sessions. It is a request system: the studio confirms every booking.

## Stack

- Node 22, TypeScript
- Express serves `public/chat.html` and the `/api/chat` and `/health` routes
- Anthropic SDK for replies (default model: Sonnet)

## Layout

- `src/server.ts`: HTTP routes
- `src/chat.ts`: reply logic, uses `data/studio.md` as the only source of facts
- `src/tools/bookTrial.ts`: trial booking tool (validation, write to `data/bookings.jsonl`, stubbed email notice)
- `data/studio.md`: studio facts (public information only)
- `data/bookings.jsonl`: booking records (personal data, never commit real records)
- `public/chat.html`: chat widget
- `tests/`: tests, including `tests/eval-questions.md`

## Commands

- `npm install`
- `npm run dev`: starts the server on PORT (default 3000)
- `npm test`
- `npm run typecheck`
- `npm run lint`
- `npm run build`

## Rules

- Answer only from `data/studio.md`. If the answer is not there, say you are not sure and offer to pass the question to the studio.
- Never invent prices, class times, teachers or policies.
- No medical advice. For injury or pregnancy questions, direct the user to the studio teacher or their doctor.
- Say you are an AI assistant at the start of each chat.
- A trial booking is a request until the studio confirms it. Never claim a spot is guaranteed. Never take payment.
- Limits: 20 messages per session, 1,000 characters per user message, capped reply length.
- Validate booking input on the server, not only in the browser.

## Gotchas

- `ANTHROPIC_API_KEY` comes only from the environment or `.env`. Never print, log or commit it.
- Do not read or create a real `.env`. Use `.env.example` as the template.
- Do not log full chat transcripts.
- Booking personal data goes only in `data/bookings.jsonl`. Store only the fields the booking needs.
- `STUDIO_NOTIFY_EMAIL` is the studio notice address. In v1 the notice can be a stub that logs to a file.

## Working habits

- Use plan mode for the first step of each phase in `PLAN.md`.
- Run `/clear` between phases.
- Before saying work is done, run the `verify` skill and show the results.
- Keep diffs focused on the current phase.

@REVIEW.md
Use for my project