<!--
ROBOTS ON PAYROLL / THE VAULT
What this is: a complete, real example of the architecture.md the interview
prompt produces, for a dog groomer's booking page with payments.
How to use it: download this file and give it to your AI (Claude, ChatGPT,
Cursor, Lovable chat) as a reference. Say: "Use this as my playbook for
what a finished architecture.md should look like."
Latest version + full guide: https://robotsonpayroll.com/resources/architecture-interview
-->

# architecture.md: Scruffy to Fluffy booking page

This is a finished example produced by the Architecture Interview for a
fictional one-person dog grooming business. Read it to calibrate what YOUR
output should look like: every section filled, every choice made, every cost
a number. Then run the interview for your own app.

---

## 1. What we're building

A booking page for Scruffy to Fluffy, a one-person dog grooming business. Dog owners visit the page, pick a service and an open time slot, pay a deposit, and get a confirmation email. The owner (Dana) sees all upcoming bookings in a private admin view and blocks out days she's unavailable. Success criterion for v1: the first stranger books and pays for an appointment without texting Dana first.

## 2. Pages and screens

1. **Home / booking page**. Shows the 4 services with prices, then a calendar of open slots. One job: get a visitor from "landed" to "picked a slot". Visible to everyone.
2. **Checkout**. Collects the dog owner's name, phone, email, dog's name and size, then takes the deposit payment. Visible to everyone.
3. **Confirmation**. "You're booked for Tuesday 10:00" plus what to bring. Also sent as an email. Visible to the person who just booked.
4. **Admin dashboard**. List of upcoming bookings (who, which dog, which service, paid or not), plus a button to block out dates. Visible to admin only (Dana logs in; customers never do).
5. **Cancel/reschedule page**. Reached only from a private link in the confirmation email. Lets a customer cancel or move their own booking up to 24 hours before. Visible to anyone with the link.

## 3. Data it stores

**Services** (the 4 things Dana sells)
- Name (e.g. "Full groom, large dog")
- Duration in minutes
- Price, and deposit amount ($15 flat on every service)

**Bookings**
- Date and time slot
- The service booked
- Customer name, email, phone
- Dog's name and size
- Payment status (deposit paid / refunded)
- A private cancel link code
- Each Booking belongs to one Service.

**Blocked dates** (Dana's days off)
- Date, and an optional note only Dana sees

**Admin account**
- Dana's email and password. She is the only account in the system.

## 4. Who can see what

| Data | Visitor | Customer with cancel link | Admin (Dana) |
| --- | --- | --- | --- |
| Services and prices | see | see | edit |
| Open/taken time slots | see (times only, no names) | see | edit |
| A booking's details | nothing | see + edit their own only | see + edit all |
| Other customers' info | nothing | nothing | see |
| Blocked dates | see as "unavailable" | see as "unavailable" | edit |

The important rule for the coding AI: visitors see that a slot is taken, never who took it. Customer contact details are visible to Dana alone.

## 5. Outside services

- **Stripe** (takes card payments so the app never touches card numbers). No monthly fee; Stripe keeps 2.9% + $0.30 of each payment. On a $15 deposit that is $0.74.
- **Resend** (sends the confirmation and reminder emails). Free tier covers 3,000 emails/month; at roughly 60 bookings/month with 3 emails each, we use about 180. Free tier ends at 3,000/month, next tier $20/month.
- **Supabase** (the database: the spreadsheet the app reads and writes automatically, plus Dana's login). Free tier is fine at this scale; the paid tier at $25/month only matters past roughly 50,000 monthly visits or 500 MB of data, which is years away.

## 6. Hosting

Hosting is the computer on the internet where the app lives. Build and publish with Lovable's own Publish button, which hosts the app for you as part of the subscription and connects to Supabase natively. Dana needs three accounts total: Lovable, Supabase, Stripe. Connect the domain scruffytofluffy.com in Lovable's settings (Settings, then Domains) rather than moving the domain anywhere.

## 7. Monthly cost estimate

At month-3 scale (about 60 bookings/month):

| Service | Monthly cost |
| --- | --- |
| Lovable (build + hosting) | $25 |
| Supabase | $0 (free tier) |
| Resend | $0 (free tier) |
| Stripe | ~$44 in per-payment fees on 60 x $15 deposits |
| **Total fixed** | **$25/month, plus Stripe's cut of each deposit** |

When this grows: the first real cost bump is Supabase Pro at $25/month, and only when traffic is far beyond a single groomer's calendar. Nothing here scales scarily.

## 8. Build order

1. **Walking skeleton**: the home page showing the 4 real services and a hard-coded list of open slots, deployed and reachable at the real domain. No payments yet. Usable as a "call to book" page from day one.
2. Real availability: slots come from the database, taken slots disappear, Dana's blocked dates hide whole days.
3. Booking flow: visitor picks a slot, fills in their details, booking is saved, slot becomes taken.
4. Payments: Stripe deposit at checkout. A booking only confirms when the deposit succeeds.
5. Emails: confirmation email with the private cancel/reschedule link, plus a reminder email 24 hours before the appointment.
6. Admin dashboard: Dana's login, the upcoming-bookings list, and the block-out-dates button.
7. Cancel/reschedule page reached from the email link, with the 24-hour cutoff and automatic Stripe refund of the deposit on cancel.

**Not in v1**: customer accounts, SMS reminders (Twilio, revisit if no-shows happen), gift cards, a second groomer's calendar, photos of finished dogs. All cut during the interview to keep v1 shippable.
