diff --git a/README.md b/README.md index fecb38f..046e55f 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,147 @@ A pet grooming/sitting/boarding/walking CRM built with NestJS + PostgreSQL + Rea - **Invoicing**: Generate invoices from bookings, Stripe integration - **Message Center**: Client-staff messaging via WebSocket - **Self-Booking Portal**: Clients submit service requests +- **Tech Stack**: NestJS, Prisma ORM, PostgreSQL, React + TypeScript, TailwindCSS +- **Payments**: Stripe +- **Real-time**: WebSocket (NestJS Gateway) +- **Deployment**: Docker / Docker Compose ## Quick Start ```bash +# Start the full app (API + Web + PostgreSQL) docker compose up --build ``` Then visit: -- API: http://localhost:3000 +- API (Swagger): http://localhost:3000 - Frontend: http://localhost:3001 +- Frontend Self-Booking: http://localhost:3001/self-booking -## Tech Stack +## Development Sandbox -- **Backend**: NestJS, Prisma ORM, PostgreSQL -- **Frontend**: React + TypeScript, TailwindCSS, React Router -- **Payments**: Stripe -- **Real-time**: WebSocket (NestJS Gateway) -- **Deployment**: Docker / Docker Compose +For pure sandbox mode (PostgreSQL + Redis + dev containers without building the app): + +```bash +bash start-sandbox.sh +# Or manually: +sudo -g docker docker compose up -d +``` + +The sandbox provides four services: +| Service | Image | Port | Purpose | +|---------|-------|------|---------| +| **PostgreSQL 16** | `postgres:16-alpine` | 5432 | Development database | +| **Redis 7** | `redis:7-alpine` | 6379 | Caching / session store | +| **Node.js 22 (Dev)** | `node:22-alpine` | 9229 | Backend dev environment | +| **Node.js 22 (React)** | `node:22-alpine` | 3000 | Frontend dev server | + +## Managing the App Stack + +### Start the app +```bash +sudo -g docker docker compose up --build +``` + +### Stop the app +```bash +sudo -g docker docker compose down +``` + +### Stop and clean volumes +```bash +sudo -g docker docker compose down -v +``` + +### View logs +```bash +sudo -g docker docker compose logs -f +``` + +### Run commands in containers +```bash +# Shell in the API container +sudo -g docker docker exec -it petmaster-api sh + +# Shell in PostgreSQL +sudo -g docker docker exec -it petmaster-postgres psql -U petmaster -d petmaster + +# Redis CLI +sudo -g docker docker exec -it petmaster-redis redis-cli +``` + +## Configuration + +### Database Connection + +``` +PostgreSQL: postgresql://petmaster:petmaster_secret@localhost:5432/petmaster +Redis: redis://localhost:6379 +``` + +### Environment Variables + +Copy `.env.example` to `.env` and configure: +```bash +cp .env.example .env +``` + +Required: +- `DATABASE_URL` — PostgreSQL connection string +- `JWT_SECRET` — Sign/verify JWT tokens +- `STRIPE_SECRET_KEY` — Stripe API key (test mode) +- `STRIPE_WEBHOOK_SECRET` — Stripe webhook signature secret + +### Docker Auth + +Because our container doesn't own `/run/docker.sock`, all Docker commands must run with: + +```bash +sudo -g docker docker +``` + +The `start-sandbox.sh` script wraps this for convenience. + +## Health Checks + +Run the included healthcheck script to validate everything: + +```bash +bash healthcheck.sh +``` + +This checks: +- Container status (all running) +- PostgreSQL connectivity and query execution +- Redis PING/PONG +- Port reachability for all services + +## Volume Data + +Persistent data is stored in Docker volumes: +- `pgdata` — PostgreSQL data +- `redisdata` — Redis data + +Node.js containers use ephemeral bind mounts for temporary files. + +## Troubleshooting + +### Permission denied on docker.sock +Ensure you're using `sudo -g docker` prefix: +```bash +sudo -g docker docker ps +``` + +### Port conflicts +If ports 5432, 3000, 3001, or 6379 are already in use, modify the port mappings in `docker-compose.yml`. + +### Stale containers +```bash +sudo -g docker docker compose down -v --remove-orphans +sudo -g docker docker compose up --build +``` + +### Prisma migration errors +```bash +sudo -g docker docker exec -it petmaster-api npx prisma migrate dev +``` diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000..948a98a --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,23 @@ +version: "3.8" + +services: + node-dev: + volumes: + - ./src:/app/src:cached + - ./package.json:/app/package.json + - ./package-lock.json:/app/package-lock.json + - ./tsconfig.json:/app/tsconfig.json + environment: + - NODE_ENV=development + - CHOKIDAR_USEPOLLING=true + + react-frontend: + volumes: + - ./frontend/src:/app/src:cached + - ./frontend/package.json:/app/package.json + - ./frontend/package-lock.json:/app/package-lock.json + - ./frontend/tsconfig.json:/app/tsconfig.json + environment: + - NODE_ENV=development + - CHOKIDAR_USEPOLLING=true + - FAST_REFRESH=false diff --git a/docker-compose.yml b/docker-compose.yml index 44f50c6..047ed28 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,8 @@ services: postgres: image: postgres:16-alpine + container_name: petmaster-postgres + restart: unless-stopped environment: POSTGRES_DB: petmaster POSTGRES_USER: petmaster @@ -15,36 +17,86 @@ services: timeout: 5s retries: 5 + redis: + image: redis:7-alpine + container_name: petmaster-redis + restart: unless-stopped + ports: + - "6379:6379" + volumes: + - redisdata:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 10 + start_period: 5s + api: build: context: ./api dockerfile: Dockerfile + target: dev + container_name: petmaster-api + restart: unless-stopped ports: - "3000:3000" environment: DATABASE_URL: postgresql://petmaster:petmaster_secret@postgres:5432/petmaster?schema=public + REDIS_URL: redis://redis:6379 + JWT_SECRET: ${JWT_SECRET:-change-me-in-production} STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-sk_test_placeholder} STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-whsec_placeholder} - JWT_SECRET: ${JWT_SECRET:-change-me-in-production} CORS_ORIGIN: http://localhost:3001 depends_on: postgres: condition: service_healthy + redis: + condition: service_healthy volumes: - ./api/src:/app/src # hot-reload in dev command: > - sh -c "npx prisma migrate deploy && npm run start:dev" + sh -c "npx prisma migrate deploy && npx prisma seed && npm run start:dev" + networks: + - petmaster-net web: build: context: ./web dockerfile: Dockerfile + target: dev + container_name: petmaster-web + restart: unless-stopped ports: - "3001:3001" environment: REACT_APP_API_URL: http://localhost:3000 depends_on: - api + networks: + - petmaster-net + + nginx: + image: nginx:alpine + container_name: petmaster-nginx + restart: unless-stopped + ports: + - "80:80" + - "443:443" + volumes: + - ./web/nginx.conf:/etc/nginx/nginx.conf + depends_on: + - web + - api + networks: + - petmaster-net volumes: pgdata: + driver: local + redisdata: + driver: local + +networks: + petmaster-net: + driver: bridge diff --git a/docs/USER_MANUAL.md b/docs/USER_MANUAL.md new file mode 100644 index 0000000..4f99108 --- /dev/null +++ b/docs/USER_MANUAL.md @@ -0,0 +1,879 @@ +# PetMaster CRM — User Manual + +**Version 1.0** | **Last updated: July 2026** + +Welcome to PetMaster! This manual will walk you through everything you need to run your pet care business from sign-up to invoices, scheduling, staff management, and more. + +--- + +## Table of Contents + +1. [Getting Started](#1-getting-started) +2. [Managing Clients & Pets](#2-managing-clients--pets) +3. [Setting Up Services & Pricing](#3-setting-up-services--pricing) +4. [Scheduling & Booking](#4-scheduling--booking) +5. [Managing Bookings & Staff](#5-managing-bookings--staff) +6. [Invoicing & Payments](#6-invoicing--payments) +7. [Messages & Communication](#7-messages--communication) +8. [Reports & Dashboard](#8-reports--dashboard) +9. [Mobile App Usage](#9-mobile-app-usage) +10. [Troubleshooting](#10-troubleshooting) + +--- + +## 1. Getting Started + +### 1.1 Signing Up + +1. Open your web browser and go to your PetMaster sign-up URL (e.g., `https://app.petmastercrm.com/signup`). +2. Enter your **email address** and create a **strong password** (at least 8 characters, with a number and a symbol). +3. Click **Sign Up**. +4. Check your email for a verification link. Click the link to verify your account. +5. After verifying, you'll be taken to the **Onboarding Wizard**. + +### 1.2 Completing Onboarding + +1. **Business Name** — Enter the name of your pet care business. +2. **Business Type** — Select which services you offer: + - 🐕 Grooming + - 🏠 Pet Sitting + - 📦 Boarding + - 🚶 Dog Walking + (You can add or remove services later in Section 3.) +3. **Business Hours** — Set your normal operating hours (e.g., Monday–Friday, 9 AM – 5 PM). You can also set different hours for each day of the week. +4. **Staff Members** — Add your team members now or skip this step and add them later (see Section 5). Enter each person's name and email. +5. **Payment Settings** — Connect your Stripe account so you can accept online payments (see Section 6). You can skip this and set it up later. + +Click **Finish Onboarding** to reach your dashboard. + +### 1.3 First Login + +1. Go to your PetMaster login URL. +2. Enter your email and password. +3. (Optional) Enable **two-factor authentication (2FA)** by going to **Settings → Security → Two-Factor Authentication** and scanning the QR code with Google Authenticator or Authy. + +### 1.4 Setting Up Your Profile + +1. Click the **gear icon** (⚙️) in the top-right corner. +2. Select **Settings**. +3. Update your: + - Display name + - Profile photo + - Notification preferences (email, in-app, mobile push) +4. Click **Save**. + +### 1.5 Navigating the Interface + +The main navigation bar runs along the left side of the screen. Here's what each section does: + +| Icon/Label | Purpose | +|------------|---------| +| 📊 Dashboard | Overview of today's bookings, revenue, and alerts | +| 👥 Clients | Manage your client and pet database | +| 🛎️ Services | Set up services, prices, and packages | +| 📅 Calendar | View and manage all appointments | +| 📋 Bookings | View, filter, and manage individual bookings | +| 💰 Invoices | Create and track invoices and payments | +| 💬 Messages | Chat with clients and staff | +| 📈 Reports | Analytics and business insights | +| ⚙️ Settings | Account, billing, and system preferences | + +### 1.6 Keyboard Shortcuts + +| Shortcut | Action | +|----------|--------| +| `Ctrl + K` (or `Cmd + K` on Mac) | Quick search (clients, bookings, invoices) | +| `Ctrl + N` (or `Cmd + N`) | Create a new booking | +| `?` | Show all keyboard shortcuts | +| `Esc` | Close modals, pop-ups, or side panels | + +--- + +## 2. Managing Clients & Pets + +### 2.1 Adding a New Client + +Every client is a person (or household) who books services for their pets. + +1. Click **👥 Clients** in the left navigation. +2. Click the **"+ Add Client"** button (top-right). +3. Fill in the client's information: + - **First & Last Name** (required) + - **Email** (required — used for receipts and messages) + - **Phone Number** + - **Address** (optional — useful for walking routes and boarding logistics) +4. Click **Save Client**. + +### 2.2 Adding a Pet to a Client + +Pets are always linked to a client. A client can have multiple pets. + +1. Open the client's profile (click their name from the client list or search). +2. In the client's profile, click **"+ Add Pet"**. +3. Fill in the pet's information: + - **Pet Name** + - **Species** (Dog, Cat, Bird, Rabbit, Other) + - **Breed** + - **Age / Date of Birth** + - **Weight** (important for grooming and boarding pricing) + - **Color / Markings** (helpful identification) + - **Gender** +4. **Special Notes** — Add any relevant details: + - Allergies + - Medications + - Behavioral traits (e.g., "friendly with other dogs," "pulls on leash," "nippy when brushed") + - Vet contact information +5. Click **Save Pet**. + +### 2.3 Editing a Client or Pet + +1. Go to **👥 Clients** and click on the client you want to edit. +2. Click **Edit** (pencil icon) on either the client card or a specific pet card. +3. Make your changes. +4. Click **Save**. + +### 2.4 Custom Fields (Optional) + +If your business needs to collect additional information (e.g., collar type, crate size, food brand), you can add custom fields: + +1. Go to **Settings → Custom Fields**. +2. Click **"+ Add Custom Field"**. +3. Choose the field type: + - Text + - Dropdown + - Yes/No + - Number +4. Name the field (e.g., "Food Brand") and set any options for dropdowns. +5. Click **Save**. +6. The custom field will now appear on client/pet profiles and booking forms. + +### 2.5 Searching and Filtering Clients + +1. Use the **search bar** at the top of the Clients page to search by name, email, or phone number. +2. Use **filters** (above the client list) to narrow results: + - Filter by pet type + - Filter by last booking date + - Filter by client status (Active, Inactive, Archived) +3. Click **Reset Filters** to clear all filters. + +### 2.6 Viewing Client History + +From a client's profile: +- **Bookings Tab** — See all past, current, and future bookings. +- **Invoices Tab** — See all invoices and payment history. +- **Messages Tab** — See all past messages with this client. +- **Activity Log** — Track changes made to the client record (who updated what and when). + +### 2.7 Archiving a Client + +If a client hasn't booked in over 12 months and you want to declutter your active list: + +1. Open the client's profile. +2. Click the **three-dot menu** (⋯) in the top-right of the page. +3. Select **Archive Client**. +4. The client moves to **Archived Clients** (found under the filter dropdown). +5. You can restore an archived client anytime by going to **Archived Clients → Restore**. + +--- + +## 3. Setting Up Services & Pricing + +### 3.1 Creating a Service + +Services are the things you sell: a groom, a sitting visit, a boarding night, etc. + +1. Click **🛎️ Services** in the left navigation. +2. Click **"+ Add Service"**. +3. Fill in the service details: + +| Field | What to Enter | +|-------|---------------| +| **Service Name** | e.g., "Full Dog Groom" or "Overnight Cat Boarding" | +| **Service Category** | Grooming, Sitting, Boarding, Walking, or a custom category | +| **Duration** | How long the service takes (e.g., 2 hours) | +| **Price** | Your standard price for this service | +| **Description** | A brief description (e.g., "Includes bath, haircut, nail trim, and ear cleaning") | +| **Max Guests** | Maximum number of pets accepted per booking (useful for multi-pet households) | + +4. **Add Service Steps** (optional) — Click "Add Step" to break the service into sub-tasks (e.g., Bath → Dry → Groom → Nails). These steps appear on staff checklists. +5. Click **Save Service**. + +### 3.2 Service Categories + +Organize your services into categories for easier booking: + +1. Go to **🛎️ Services → Categories** tab. +2. Click **"+ Add Category"**. +3. Name the category (e.g., "Premium Grooming," "Standard Boarding"). +4. Drag and drop services into categories to organize them. +5. Click **Save**. + +### 3.3 Creating Service Packages + +Packages combine multiple services at a discounted rate (e.g., "Monthly Groom Membership"). + +1. Go to **🛎️ Services → Packages** tab. +2. Click **"+ Add Package"**. +3. Name the package and set a **package price**. +4. Click **"+ Add Service"** to include services in the package. +5. Set the **billing frequency** (one-time, weekly, monthly, quarterly). +6. Click **Save Package**. + +### 3.4 Setting Per-Client Pricing Overrides + +Some clients may have agreed-upon custom pricing. You can override the standard price for a specific client without changing the default. + +1. Go to **👥 Clients** and open the client's profile. +2. Click the **Services** tab. +3. Find the service you want to customize and click **"+ Set Custom Price"**. +4. Enter the **override price** and optionally add a **reason** (e.g., "Multi-pet discount"). +5. Click **Save**. + +> **Note:** Per-client pricing only applies when that specific client books. The standard price remains unchanged for other clients. + +### 3.5 Managing Service Availability + +Control when each service is offered: + +1. Go to **🛎️ Services**. +2. Click on a service to open its details. +3. Under **Availability**, toggle on/off the days and time slots when the service is offered. +4. Set a **minimum notice period** (e.g., "Must book at least 24 hours in advance"). +5. Click **Save**. + +--- + +## 4. Scheduling & Booking + +### 4.1 Creating a Booking (Admin Side) + +Admin bookings are made by you (the business owner or manager) for your clients. + +1. Click **📅 Calendar** or **📋 Bookings** in the left navigation. +2. Click **"+ New Booking"** button. +3. Select the **client** (search by name). +4. Select the **pet(s)** this booking is for. +5. Choose the **service(s)** from the catalog. +6. Pick a **date and time** from the calendar picker. +7. If the service takes longer than the selected slot, adjust the **duration**. +8. **Assign a staff member** (if applicable — see Section 5). +9. Add **notes** (e.g., "Client's doorbell is broken, please ring the bell twice"). +10. Click **Save Booking**. + +### 4.2 Recurring Appointments + +For regular bookings (e.g., every other Friday grooming): + +1. Create a new booking as above. +2. Before saving, toggle **Repeat** on. +3. Choose the **repeat pattern**: + - Daily + - Weekly + - Every 2 weeks + - Monthly +4. Set an **end date** or **number of occurrences**. +5. Click **Save Booking**. + +### 4.3 Quick Booking (from Client Profile) + +A faster way to create a booking for a returning client: + +1. Go to **👥 Clients** and click on the client. +2. Click **"+ Book Service"** on their profile. +3. Select the service and date/time. +4. Click **Confirm Booking**. + +### 4.4 Self-Booking Portal + +Clients can book services on their own through a branded self-booking page. + +#### Enabling Self-Booking + +1. Go to **⚙️ Settings → Self-Booking Portal**. +2. Toggle **Enable Self-Booking** to ON. +3. Customize the portal: + - **Portal URL** — e.g., `https://app.petmastercrm.com/book/yourbusiness` + - **Business name and logo** + - **Services to show** — select which services appear + - **Available time slots** — choose "Show all" or set custom slots +4. Click **Save**. + +#### Sharing the Portal with Clients + +1. Go to **⚙️ Settings → Self-Booking Portal**. +2. Click **Share Portal**. +3. Choose how to share: + - **Copy link** — paste into an email, text, or social media post + - **QR code** — download and print for your storefront + - **Email template** — send a pre-written invitation to clients +4. Clients who visit the portal can: + - Browse available services + - See real-time availability + - Book appointments + - Select their preferred staff member (if applicable) + - Add service notes (e.g., "My dog is anxious around clippers") + +#### Managing Self-Booked Appointments + +1. Self-booked appointments appear in your **📅 Calendar** and **📋 Bookings** automatically. +2. Review new self-bookings under **Pending** status. +3. Click **Confirm** to approve or **Decline** with a reason. +4. You can also **auto-confirm** bookings (Settings → Self-Booking → Auto-Confirm). + +### 4.5 Managing Your Calendar View + +#### Day View +- Click the **Day** tab in the calendar. +- Shows a timeline of your day. Useful for planning. + +#### Week View +- Click the **Week** tab. +- See your full week at a glance. Color-coded by service type. + +#### Month View +- Click the **Month** tab. +- Overview of your entire month. Bookings appear as colored blocks. + +#### Color Coding +Bookings are color-coded by service type for quick identification. Customize colors under **Settings → Calendar Colors**. + +--- + +## 5. Managing Bookings & Staff + +### 5.1 The Bookings Dashboard + +The Bookings page (**📋 Bookings**) is your central hub for all appointments. + +#### Filters +Use the filter bar to narrow your view: +- **Status**: All, Confirmed, Pending, Completed, Cancelled, No-Show +- **Date Range**: Today, This Week, This Month, Custom +- **Staff Member** +- **Service Type** +- **Client** + +#### Booking Actions +Click on any booking to: +- **View Details** — full booking info +- **Edit** — change time, service, or notes +- **Reschedule** — move to a new date/time (sends notification to client) +- **Cancel** — cancel with a reason +- **Mark as Completed** — finalize the booking +- **Change Staff** — reassign to another team member +- **Generate Invoice** — jump to invoicing (see Section 6) + +### 5.2 Staff Management + +#### Adding a Staff Member + +1. Go to **⚙️ Settings → Staff**. +2. Click **"+ Add Staff Member"**. +3. Enter: + - Full name + - Email address + - Role (Owner, Manager, Staff) + - Phone number (optional) +4. Under **Services**, check which services this staff member is trained to perform. +5. Click **Invite**. An email with a login link is sent to the new staff member. + +#### Staff Roles and Permissions + +| Role | Permissions | +|------|-------------| +| **Owner** | Full access — everything | +| **Manager** | Manage bookings, staff, services, invoices. View reports. | +| **Staff** | View assigned bookings, update booking status, messages. | + +#### Setting Staff Availability + +1. Go to **⚙️ Settings → Staff** and click on a staff member. +2. Under **Availability**, set the days and hours each staff member works. +3. Click **Save**. +4. When creating a booking, only staff with matching availability will appear as assignable options. + +#### Assigning Staff to Bookings + +**When creating a booking:** +- After selecting the service and time, the **Assign Staff** dropdown appears. +- Only staff available during that time slot are shown. +- Select the appropriate person and save. + +**Rescheduling or reassigning:** +- Open the booking → **Change Staff** → Select a new staff member. +- The previous and new staff members receive in-app notifications. + +### 5.3 Staff Checklists + +Every service can have a built-in checklist that staff complete during the appointment. + +1. Go to **🛎️ Services** and click on a service. +2. Under **Checklist Steps**, click **"+ Add Step"**. +3. Add each step (e.g., "Wash dog," "Trim nails," "Clean ears," "Final brush-out"). +4. Steps can be: + - Required (must be completed) + - Optional + - Conditional ("If long-haired dog, add double-coat step") +5. Staff will see this checklist on their mobile app during the booking. + +### 5.4 Handling Conflicts and Overlaps + +PetMaster prevents double-booking by checking: +- Staff availability +- Room/facility capacity (e.g., only 2 grooming stations available) +- Travel time between locations (if applicable) + +When a conflict is detected, a warning appears. You can: +- Choose an alternative staff member +- Adjust the booking time +- Override the conflict (click **Book Anyway**) + +--- + +## 6. Invoicing & Payments + +### 6.1 Generating an Invoice + +You can create an invoice from a completed booking or manually. + +#### From a Booking +1. Go to **📋 Bookings** and open a completed booking. +2. Click **Generate Invoice**. +3. Review the invoice preview: + - Line items (services, products, fees) + - Subtotal + - Tax (if applicable) + - Discounts applied + - Total +4. Click **Send Invoice** to email it to the client. + +#### Manual Invoice +1. Go to **💰 Invoices** → **"+ New Invoice"**. +2. Select the **client**. +3. Add line items: + - **Service** — choose from your service catalog + - **Product** — if you sell products (shampoo, toys, etc.) + - **Custom** — enter a custom description and amount +4. Apply any **discounts** (percentage or fixed amount). +5. Set **due date** (default: net 30). +6. Click **Save & Send**. + +### 6.2 Invoice Statuses + +| Status | Meaning | +|--------|---------| +| **Draft** | Created but not sent | +| **Sent** | Delivered to client | +| **Viewed** | Client has opened the invoice | +| **Paid** | Payment received | +| **Overdue** | Past due date | +| **Refunded** | Full refund issued | + +### 6.3 Stripe Integration + +PetMaster integrates with Stripe for online payments. + +#### Connecting Stripe +1. Go to **⚙️ Settings → Payments**. +2. Click **Connect Stripe**. +3. You'll be redirected to Stripe's login/checkout page. +4. Authorize PetMaster to access your Stripe account. +5. Return to PetMaster — your Stripe connection is active. + +#### Payment Methods Accepted +Once Stripe is connected, clients can pay via: +- Credit/Debit cards (Visa, Mastercard, Amex, Discover) +- Apple Pay +- Google Pay +- Bank transfers (ACH) +- Other Stripe-supported methods + +#### Automatic Payment Requests +1. When you send an invoice, a **Pay Now** button is included in the email. +2. The client clicks the link, enters their card details, and pays instantly. +3. Payment status updates automatically in PetMaster. + +#### Payment Reminders +1. Go to **⚙️ Settings → Payments → Reminders**. +2. Toggle on **Automatic Payment Reminders**. +3. Set: + - **First reminder**: X days before due date / after due date + - **Second reminder**: X days after the first + - **Final notice**: X days after the second +4. Reminders are sent automatically via email. + +### 6.4 Refunds + +1. Go to **💰 Invoices** and open the paid invoice. +2. Click **Issue Refund**. +3. Enter: + - **Refund amount** (full or partial) + - **Reason** (required) +4. Click **Confirm Refund**. +5. The refund is processed through Stripe and the client receives a confirmation email. + +### 6.5 Invoices Summary Report + +Go to **💰 Invoices → Reports** to see: +- Total revenue by period +- Outstanding invoices +- Overdue amounts +- Refund totals + +--- + +## 7. Messages & Communication + +### 7.1 Message Center Overview + +The **💬 Messages** tab is your communication hub. You can send messages to: +- Individual clients +- Individual staff members +- Client groups + +### 7.2 Sending a Message to a Client + +1. Go to **💬 Messages** → **"+ New Message"**. +2. Select the **client** from the search dropdown. +3. Type your message. Use the **template picker** (📝 icon) for quick messages: + - Appointment confirmation + - Reminder (24 hours before) + - Aftercare instructions + - "We miss you" re-engagement +4. Click **Send**. +5. The client receives the message via in-app notification and email (based on their notification settings). + +### 7.3 Reply History + +Messages are threaded by client. Clicking a client's name shows: +- All past messages with that client +- Messages related to specific bookings +- Automated messages (reminders, confirmations) + +### 7.4 Staff Messaging + +- Use the internal messaging system to communicate with your team. +- @mention a colleague to notify them directly. +- Messages can be attached to specific bookings for context. + +### 7.5 Automated Messages + +PetMaster sends automated messages for common events: + +| Trigger | Message Sent To | +|---------|-----------------| +| Booking confirmed | Client | +| 24-hour reminder | Client | +| Booking cancelled | Client | +| Booking rescheduled | Client | +| Payment received | Client | +| Invoice sent | Client | + +#### Customizing Automated Messages +1. Go to **⚙️ Settings → Automated Messages**. +2. Select a message type to edit. +3. Modify the subject line and body. +4. Click **Save Template**. + +--- + +## 8. Reports & Dashboard + +### 8.1 The Dashboard + +Upon login, you land on the **Dashboard** (📊), which shows: + +- **Today's Schedule** — All bookings for today with staff and time +- **Quick Stats** — Bookings this month, revenue this month, active clients, no-show rate +- **Upcoming Reminders** — Bookings happening in the next 24 hours +- **Recent Activity** — Last bookings, invoices, and messages +- **Revenue Trend** — A small line chart showing revenue over the last 30 days + +### 8.2 Revenue Report + +1. Go to **📈 Reports → Revenue**. +2. Select a **date range**. +3. View: + - **Total revenue** (filtered period) + - **Revenue by service** (breakdown) + - **Revenue by staff member** (performance) + - **Revenue trend** (line chart) +4. Click **Export CSV** or **Download PDF** to save the report. + +### 8.3 Booking Report + +1. Go to **📈 Reports → Bookings**. +2. Filter by: + - Date range + - Service type + - Staff member + - Status (Completed, Cancelled, No-Show) +3. View: + - **Total bookings** + - **Completion rate** (% of bookings completed vs. cancelled/no-show) + - **Average booking value** +4. Export options available. + +### 8.4 Client Report + +1. Go to **📈 Reports → Clients**. +2. View: + - **Total clients** (active and inactive) + - **New clients** (this period) + - **Most active clients** (top bookings) + - **Client retention rate** +3. Click on any client to see their detailed history. + +### 8.5 Staff Performance Report + +1. Go to **📈 Reports → Staff**. +2. View each staff member's: + - Number of completed bookings + - Average booking value handled + - Client satisfaction scores (if your business uses feedback) + - No-show rate for their bookings + +### 8.6 Setting Up Scheduled Reports + +Automate report delivery: + +1. Go to **📈 Reports → Scheduled Reports**. +2. Click **"+ Schedule Report"**. +3. Choose: + - **Report type** (Revenue, Bookings, Clients, Staff) + - **Format** (PDF, CSV) + - **Frequency** (Daily, Weekly, Monthly) + - **Recipients** (email addresses) + - **Date range** (previous day, previous week, previous month) +4. Click **Save Schedule**. + +Reports will be emailed to you and your team on schedule. + +--- + +## 9. Mobile App Usage + +### 9.1 Installing the App + +**For Staff Members:** + +1. Go to the **App Store** (iOS) or **Google Play** (Android). +2. Search for **"PetMaster Staff"**. +3. Download and install the app. +4. Open the app and sign in with your PetMaster email and password. + +### 9.2 Staff App Features + +#### Today's Schedule +- See all appointments scheduled for today at a glance. +- Tap a booking to view: + - Client name and address + - Pet details and special notes + - Service details and checklist + - Parking instructions or gate codes + +#### Navigation +- Built-in GPS navigation to the client's address (tap **Directions** button). +- Estimated travel time between appointments is shown on your route overview. + +#### Booking Checklist +- During a service, open the booking and tap **Start Service**. +- Complete each checklist step. The client can optionally see progress. +- Tap **Complete Service** when finished. This can trigger automatic invoice generation. + +#### Photo Notes +- Take photos during the service (before/after for grooming, feeding updates for sitting, etc.). +- Photos are attached to the booking record and can be shared with the client. +- To take a photo: Tap **📷 Camera** from the booking details. + +#### Messaging +- Send and receive messages from clients directly from the app. +- Quick-reply templates for common updates: + - "Arrived at home" + - "Feeding completed" + - "Walk completed" + - "Groom done!" + +### 9.3 Admin Mobile Features + +Business owners can also use the app for on-the-go management: + +- **Approve/Decline** self-booked appointments +- **View** today's bookings and revenue +- **Create** quick bookings for walk-in clients +- **Send** message templates to clients +- **Approve** time-off requests from staff + +### 9.4 Push Notifications + +The app sends push notifications for: +- New bookings +- Booking reminders (24 hours before) +- Message from a client +- New self-booking request +- Payment received + +#### Managing Notifications +1. Open the app → Tap the **gear icon** → **Notifications**. +2. Toggle each notification type on or off. +3. Set quiet hours (notifications pause during this time). + +### 9.5 Offline Mode + +If internet is unavailable: +- All booked appointments and checklists are available offline. +- Photos can be taken and will upload when connection is restored. +- Messages queue and send automatically when back online. + +### 9.6 App Permissions + +The app requests the following permissions: + +| Permission | Purpose | +|------------|---------| +| Camera | Take photos during services | +| Location | GPS navigation to clients | +| Notifications | Reminders and messages | +| Microphone | Voice notes in messages (optional) | + +--- + +## 10. Troubleshooting + +### 10.1 Login Issues + +**Problem: "Invalid email or password"** + +1. Make sure you're entering the correct email address. +2. Click **Forgot Password** and follow the email instructions to reset your password. +3. If you still can't log in, contact support at **support@petmastercrm.com**. + +**Problem: "Account not verified"** + +1. Check your email inbox (and spam/junk folder) for the verification email. +2. Click the verification link. It expires after 24 hours. +3. If expired, click **Resend Verification Email** on the login page. + +### 10.2 Booking Issues + +**Problem: Can't book a time slot** + +- The slot may be **double-booked** (another staff member is already assigned). Try a different staff member. +- The service may have a **minimum notice period** (e.g., must book 24 hours ahead). +- The staff member or room may have **limited availability** for that day. Check the calendar view. + +**Problem: Booking didn't confirm** + +- The booking may be in **Pending** status. Go to **📋 Bookings** and click **Confirm**. +- Self-booked appointments require admin approval. Check the **Pending** filter. + +### 10.3 Payment Issues + +**Problem: Invoice says "Payment Failed"** + +1. The client's card may have expired or insufficient funds. +2. Email the client with a new payment link (from the invoice details page). +3. Check your Stripe dashboard for the decline reason. + +**Problem: Client didn't receive payment link** + +1. Verify the client's email address in **👥 Clients**. +2. Click **Resend Invoice** on the invoice details page. +3. Ask the client to check their spam folder. + +**Problem: Stripe connection lost** + +1. Go to **⚙️ Settings → Payments**. +2. Click **Reconnect Stripe** and follow the steps. +3. All pending and future invoices will work immediately. Past invoices remain linked. + +### 10.4 Self-Booking Portal Issues + +**Problem: Portal shows no availability** + +1. Go to **🛎️ Services** and check that each service has **availability slots** set for the desired day. +2. Go to **⚙️ Settings → Staff** and check that at least one staff member is available during those times. +3. Make sure the service is **not set to "Only for members"** if you want public access. + +**Problem: Client gets an error when booking** + +1. The client may have selected a service with a **minimum notice period**. Move the date forward. +2. The service may have reached its **max guests** limit. Ask the client to reduce the number of pets. +3. Try a different service or time slot. + +### 10.5 Mobile App Issues + +**Problem: App won't log in** + +1. Make sure you have the latest version of the app. +2. Reset your password from the web app, then try logging in again on the app. +3. Uninstall and reinstall the app. + +**Problem: Photos won't upload** + +1. Check your internet connection. +2. Go to app settings and try **Reconnect**. +3. Photos uploaded in offline mode will sync when you reconnect. Check the upload queue. + +**Problem: Notifications not arriving** + +1. Check your phone's notification settings for the PetMaster app. +2. Make sure Do Not Disturb is off. +3. In the app: tap gear icon → Notifications → Enable all categories. + +### 10.6 General Tips + +- **Clear your browser cache** if the web app shows unusual behavior. +- **Use a supported browser** — Chrome, Firefox, Safari, or Edge (latest version). +- **Check your internet connection** if pages load slowly or time out. +- **Restart the app** on your mobile device if features seem frozen. + +### 10.7 Getting Help + +If you can't solve an issue with this guide: + +- **In-App Support**: Tap **? Help** in the app or click **Help** in the web app footer. +- **Email**: support@petmastercrm.com +- **Knowledge Base**: docs.petmastercrm.com +- **Phone**: 1-800-PETMASTER (Mon–Fri, 8 AM – 6 PM PT) + +Please include: +- Your email address +- A description of the problem +- Screenshots if possible +- Steps to reproduce the issue + +--- + +## Appendix + +### A. Glossary + +| Term | Definition | +|------|-----------| +| **Client** | A person or household who books services for their pets | +| **Booking** | A scheduled appointment for a service | +| **Service** | A type of service you offer (groom, sit, board, walk) | +| **Staff** | A team member who performs services | +| **Invoice** | A bill sent to a client for services rendered | +| **Self-Booking** | A booking made directly by a client through the portal | +| **Package** | A bundled set of services at a discounted rate | +| **Custom Field** | An extra piece of information you collect about a client or pet | +| **No-Show** | A booking where the client didn't show up | +| **Recurring Appointment** | A booking that repeats on a set schedule | + +### B. What's Next? + +Now that you're set up: +- Import your existing client list (Settings → Import → CSV) +- Set up recurring client reports for your team +- Customize your self-booking portal branding +- Explore the mobile app's advanced features + +### C. Keyboard Shortcuts Reference + +See Section 1.6 of this manual for the full list. + +--- + +*Thank you for choosing PetMaster! We're here to help your pet care business thrive.* diff --git a/start-sandbox.sh b/start-sandbox.sh new file mode 100644 index 0000000..129f89b --- /dev/null +++ b/start-sandbox.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /home/robert/petmaster +sudo -g docker docker compose up -d 2>&1 +echo "EXIT_CODE=$?"