# Rentals & Bookings for WooCommerce & Dokan — Wizard Frontend Source

This directory contains the **unminified source code** for the booking wizard React application.

## Tech Stack

| Library | Version | Purpose |
|---------|---------|---------|
| React | 18.x | UI framework |
| Material UI (MUI) | 5.x | Component library |
| TanStack React Query | 5.x | Data fetching & caching |
| i18next | 23.x | Internationalization (FR/EN) |
| date-fns | 3.x | Date formatting |
| react-dates | 21.x | Calendar date picker |
| Vite | 5.x | Build tool |

## Directory Structure

```
app/
├── package.json          # Dependencies
├── vite.config.js        # Build configuration
└── src/
    ├── main.jsx          # Entry point (mounts into #wahrb-wizard-root)
    ├── App.jsx           # WizardApp — main container, state, step routing
    ├── theme.js          # MUI theme customization
    ├── i18n.js           # i18next configuration
    ├── hooks/
    │   └── useApi.js     # REST API wrapper (wp-json/wahrb/v1/*)
    ├── components/
    │   └── StepperNav.jsx  # Stepper navigation (desktop + mobile)
    ├── locales/
    │   ├── en.json       # English translations
    │   └── fr.json       # French translations
    └── steps/
        ├── Step0Welcome.jsx       # Welcome + draft resume
        ├── Step1OfferType.jsx     # Offer type selection
        ├── Step2ProductSelect.jsx # WooCommerce product picker
        ├── Step3Availability.jsx  # Weekly schedule, constraints, blackouts
        ├── Step4Pricing.jsx       # Base price + dynamic pricing rules
        ├── Step5Payment.jsx       # Deposit & payment configuration
        ├── Step6Media.jsx         # Photo upload (drag & drop)
        └── Step7Publish.jsx       # Summary, terms & publish
```

## Build

The compiled output is written to `../assets/js/` and `../assets/css/`.

```bash
cd app
npm install
npm run build
```

> **Note:** The pre-built production files are already included in `assets/`.
> You only need to rebuild if you modify the source.
