# Peachy Booking Flow

A Svelte web components library for Peachy's booking flow widget.

## Prerequisites

- Node.js and npm
- Chrome browser (recommended for testing)

## Getting Started

### 1. Navigate to the Project Directory

```bash
cd peachy-booking-flow
```

### 2. Install Dependencies

```bash
npm i
```

### 3. Start the Development Server

```bash
npm run dev
```

The dev server will start, typically on port 5000.

## Testing the Booking Flow

### 1. Open the Application

Navigate to http://localhost:5000 in Chrome

### 2. Complete the Booking Flow

Follow these steps to test the complete booking flow:

1. **Region Selection**: Choose "Chicago" region
2. **Location Selection**: Select "West Soho" location  
3. **Time Selection**: Pick any available time slot
4. **Phone Authentication**: 
   - Enter phone number: `1231231231`
   - Complete the captcha if prompted
   - Enter confirmation code: `123123`
5. **Confirm Booking**: Click the "Confirm Booking" button to complete the test

### Test Credentials

- **Test Phone Number**: `1231231231`
- **Test Confirmation Code**: `123123`

## Troubleshooting

- If port 5000 is already in use, the dev server will notify you and may start on a different port
- Make sure all dependencies are installed before running the dev server
- Use Chrome browser for the best testing experience

## Deploying

> **Note for Claude**: When merging a new production version into `main`, always increment the version in `package.json` before completing the task. Only proceed with the deployment steps below after the merge into `main` has been confirmed on GitHub.

- Change the version in package.json to a new version.
- Run `npm publish` to publish the new version to npm
- Go into Shopify -> Online Store -> Themes -> Production Theme (or a staging theme if you want to test on staging) -> Edit Code
- Find the booking.liquid file
- Update the version number in the script tag `https://cdn.jsdelivr.net/npm/peachy-booking-flow@{VERSION}`
- Save the theme
