Larkspur Family Dental
Dentist app · built by the Vibecode team
Larkspur Family Dental is a fictional family and cosmetic dental office in Fort Collins, Colorado, with three dentists and two hygienists. Visitors book online in four steps: new or returning, the reason for the visit, a dentist, hygienist or first available, and real open times from each chair's schedule, then fill in their new-patient forms with medical history, medications, allergies and a consent they sign on screen. The site also answers insurance questions with a plan list and a check-my-coverage form, lists services with up-front prices, and has an editable $129 new-patient offer, an in-house Smile Plan for people without insurance, a before-and-after gallery and an emergency strip. The office gets a schedule with a column per chair where visits drag to a new time or chair and step from booked to in chair to done, requests with the intake attached, patients, a recall list with one-tap reminders, a content editor, CSV export and a publish checklist.
- Web app
- Built in 4 prompts
- Free to remix

Remix copies the working app into your account for free, exactly as we built it. It runs in your browser.
The prompt that builds it
We built Larkspur Family Dental in 4 prompts. Here they are folded into one, so a single paste into a new app builds the finished version.
Prompt · 13,857 words
Build "Larkspur Family Dental": a complete website with online booking, insurance answers and online intake forms, plus a front-desk admin with a schedule by chair, appointment requests, patients, a recall list and a content editor, for a small dental practice. The demo business is Larkspur Family Dental, a fictional family and cosmetic dental office in Fort Collins, Colorado, with three dentists, two hygienists and five chairs. It is made for owners and office managers of small practices (1 to 5 dentists) who get new patients from Google and the phone. Their visitor wants to know four things fast: do you take my insurance, can I get in soon (or today, for a toothache), what does a cleaning or whitening cost, and who is the dentist. The practice wants booked new-patient visits, fewer phone calls for routine bookings, and intake forms filled in before the visit.
It must look like a calm, clean, local practice that a designer made, not an AI template: no purple or blue gradients, no emoji, no glassmorphism, no default shadcn look, real typography, one accent colour (lagoon green), generous white space.
Honesty rules (these matter to real practices): the practice, people, patients, photos, prices, insurance list, reviews and before-and-after pictures are fictional and labelled as demo or sample in the UI as described below. Never invent stats ("10,000 happy smiles", "#1 dentist in Colorado"). Any business fact left empty in admin hides its UI instead of showing a placeholder. Copy is plain, warm and calm, with short sentences and no em dashes. Never claim HIPAA compliance anywhere (site, admin, README, meta).
## Reference screenshots (look at them first)
First download every reference screenshot with curl into refs/ in the workspace and look at each one before writing code. Borrow layout patterns only, never another practice's name, logo, photos or colours:
1. https://webtpl-dental-clinic-site-refs.beacon.host/01-header-book-call-hero.jpg : a dental practice's hero: a header with two buttons ("Book online", "Request appointment") on the right, and three hero buttons incl. one with the phone number. Our header's phone pill + "Book online" button and the hero's calm left column.
2. https://webtpl-dental-clinic-site-refs.beacon.host/02-announcement-strip-reason-schedule-phone.jpg : a thin announcement strip above the header ("Same day appointments available") and a header with a "Reason for visit" select, a Schedule button and a phone pill. Our emergency strip and header phone pill.
3. https://webtpl-dental-clinic-site-refs.beacon.host/03-why-us-insurance-icons-service-links.jpg : service link tiles with arrows (Dentures, Implants, Clear aligners, Emergency care) and four "why us" items with line icons incl. "Most insurance accepted". Our quick-link tiles and "Why patients choose us" row.
4. https://webtpl-dental-clinic-site-refs.beacon.host/04-new-patient-offer-tab.jpg : a sticky "New Patient Offer $79" tab pinned to the bottom-left of the screen. Our new-patient offer tab.
5. https://webtpl-dental-clinic-site-refs.beacon.host/05-new-patient-offer-card.jpg : the tab opened into a card: big price, "a $400+ value", a checklist (Exam, X-rays, Cleaning, Treatment plan), "See details" and "Book now". Our offer card.
6. https://webtpl-dental-clinic-site-refs.beacon.host/06-insurance-plans-block.jpg : "We accept most insurance plans" with a row of carrier tiles, a "More +" tile and a small note to call ahead to confirm. Our insurance block (we use text wordmarks, never carrier logos).
7. https://webtpl-dental-clinic-site-refs.beacon.host/07-office-values-photo-row.jpg : "A different kind of dental office": a row of four photos over three value cards with small line icons. Our office tour section.
8. https://webtpl-dental-clinic-site-refs.beacon.host/08-services-tiles-reviews.jpg : service tiles in a row and three review cards with stars. Our review cards.
9. https://webtpl-dental-clinic-site-refs.beacon.host/09-before-after-cards-faq.jpg : before/after photo pairs labelled "Before" / "After" above a quote and the treatment name, then a "Still have questions?" FAQ with plus icons. Our before-and-after cards and FAQ.
10. https://webtpl-dental-clinic-site-refs.beacon.host/10-doctor-bio-calm.jpg : a calm doctor section: large portrait on one side, a serif word as heading, a short quote and "Meet the doctors". Our owner-dentist feature in the team section.
11. https://webtpl-dental-clinic-site-refs.beacon.host/11-schedule-by-operatory.jpg : dental practice software: the day schedule with one column per operatory (Operatory 1-3, Hygiene Op 1-4), 10-minute rows, colour blocks with patient, insurance and procedure, held "Emergency" and "Lunch" blocks, a red now-line, a hover card with an allergy warning in red, and a confirmation status list (Unconfirmed, Confirmed, Arrived, Ready, In Room, Checked out). Our /admin schedule copies this layout, much cleaner.
12. https://webtpl-dental-clinic-site-refs.beacon.host/12-recall-list.jpg : a recall list: due date, patient, age, type (Prophy), interval (6 months), number of reminders, last reminded, contact, status, with filters on top. Our /admin/recall table.
13. https://webtpl-dental-clinic-site-refs.beacon.host/13-schedule-modern-columns.jpg : a modern schedule with a column per provider (Dr. and HYG columns), morning huddle and lunch blocks in grey, appointments as pastel blocks. The calmer look we want for the schedule blocks.
If an image Read comes back empty, shrink it to 720px wide with ffmpeg and read it again; don't stall on it.
## Stack and ground rules
- Use this workspace's stack: React + Vite + Tailwind + React Router + React Query + Framer Motion + lucide-react in webapp/, Hono on Bun in backend/. Use the database-auth skill for Prisma (SQLite) and Better Auth, the upload-assets skill for Vibecode Storage, and the vibecode-apis skill for image generation and Resend email. Shared Zod contracts in backend/src/types.ts. Use date-fns and date-fns-tz for every date and time.
- The public site is never behind a password. Only /admin is. The booking page /booked/:token and the intake form /forms/:token are public but only reachable with their unguessable tokens (32 random bytes, base64url).
- Seed realistic demo data automatically on backend start when the database is empty (so fresh copies work), including the owner account.
- Remixes get a copy of backend/.env with BETTER_AUTH_SECRET cleared, and the standard env check would then stop the backend at boot. Add backend/src/lib/authSecret.ts exactly as below and call ensureAuthSecret() in backend/src/env.ts before the environment is validated (keep the validation):
```ts
import { randomBytes } from "node:crypto";
import { existsSync, readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";
const LINE = /^[ \t]*(?:export[ \t]+)?BETTER_AUTH_SECRET[ \t]*=(.*)$/gm;
/** Remixes get a copy of .env with this value cleared, so a fresh copy generates and saves its own secret on first start. */
export function ensureAuthSecret(envPath = join(import.meta.dir, "..", "..", ".env")) {
if (process.env.BETTER_AUTH_SECRET?.trim()) return;
const secret = randomBytes(32).toString("base64");
const line = `BETTER_AUTH_SECRET=${secret}`;
try {
const text = existsSync(envPath) ? readFileSync(envPath, "utf8") : "";
// Bun only loads the .env in the working directory, so a saved secret can exist without being in process.env.
const saved = [...text.matchAll(LINE)].map((m) => m[1]!.trim().replace(/^(["'])(.*)\1$/, "$2")).filter(Boolean).pop();
if (saved) { process.env.BETTER_AUTH_SECRET = saved; return; }
writeFileSync(envPath, text.match(LINE) ? text.replace(LINE, () => line) : `${text}${text && !text.endsWith("\n") ? "\n" : ""}${line}\n`);
} catch (e) {
console.warn("Couldn't save BETTER_AUTH_SECRET to .env; logins will reset when the server restarts", e);
}
process.env.BETTER_AUTH_SECRET = secret;
console.log("Generated a new BETTER_AUTH_SECRET");
}
```
- Owner sign-in is email + password. Seeded owner: email `owner@larkspurdental.example`, password `Larkspur-2026`. Show these on the /admin sign-in page in a card titled "Demo office login" with a "Use demo login" button that fills both fields, until the owner changes the password in Settings. Disable public sign-up on the server (only the seeded owner exists). Every /api/admin/* route checks the session on the server.
- Never store a visitor's IP address or user agent: blank ipAddress and userAgent whenever a Better Auth session is created or updated (databaseHooks.session create/update before hooks). Keep rate limiting as it is.
- Replace the template's favicon.ico, og image, title and meta. No Vibecode branding anywhere: favicon, title, share image, footer, meta generator.
## The database ships with the project (important)
Before the platform recycles an idle sandbox it saves the workspace with `git add --all`, and a remix copies only what is in git. So:
- Track the database: no .gitignore rule may match backend/prisma/dev.db (or dev.db-wal/-shm/-journal, or *.db). dev.db is committed. Seed an empty or missing database; never delete or re-seed a database that already has rows.
- Keep the demo current without re-seeding: store the calendar day the demo was seeded (a DemoState row: seededDay in America/Denver). At backend startup, before the server answers, and then once an hour: if whole calendar days have passed since that day, move every seeded demo timestamp forward by that many days and save the new day. Shift by calendar days in America/Denver keeping the wall-clock time (8:15 AM stays 8:15 AM across a DST change, and minutes never drift): appointment start/end/busy-until, status times, created and updated times, request times, intake form updated and signed times, recall due dates, last visit and last reminded dates, coverage check times, Smile Plan start and renewal dates, offer dates, review dates, events and notes. Rebuild or shift the SlotLock rows of shifted demo appointments in the same transaction so locks always match their appointments. Never shift dates of birth. Shift only rows the seed created (an isDemo flag), never rows a user created or edited. Then the schedule always shows a full "today", the recall list stays "overdue 12 days", requests stay "40 min ago" and "Last booking: 2 hours ago" stays true.
- Dates use the practice timezone (America/Denver) everywhere, server and client, so an 8:15 AM visit is 8:15 AM for the office wherever the server or the visitor is. Store DateTimes in UTC.
## Look and feel: "Linen & Lagoon"
- Colours (CSS variables, used through Tailwind tokens):
- ink `#1B2A2F` (headings, footer, dark sections), ink-700 `#2C3E44`, ink-500 `#4A5C62`
- lagoon `#0F6B66` (the one accent: primary buttons, links, selected chips and time slots, stars, the active step, focus rings), lagoon-700 `#0B524E` (hover, accent text on white), lagoon-100 `#D3E8E4` (selected backgrounds), lagoon-50 `#ECF5F3` (soft panels)
- shell `#F4EEE8` (warm alternate sections), shell-300 `#E6DCD1` (hairlines on shell)
- paper `#FBFAF7` (page background), white (cards), body text `#26343A`, muted `#5D6B70`, line `#E4E1DB`
- status: success `#2E7D4F`, warning `#B7791F`, error `#B42318`, info `#3B5B8C`
- Never put lagoon on lagoon tints for body text smaller than 15px; never use any gradient except the og image overlay.
- Type: "Newsreader" (Google Fonts, opsz, 500/600) for headings in sentence case, letter-spacing -0.015em; "Figtree" (400/500/600/700) for body and UI. H1 60px/1.04 desktop, 38px phone. H2 42px/1.1 desktop, 30px phone. H3 22px Newsreader 600. Eyebrows: Figtree 700 12px uppercase, letter-spacing .14em, lagoon-700 on light, lagoon-100 on ink. Body 17px/1.6 desktop, 16px phone. Prices and times use tabular numbers. Every H1 and H2 uses `text-wrap: balance`. Every displayed phone number, price and time stays on one line (white-space: nowrap), admin included.
- Corners: 10px radius on cards, 8px on inputs and buttons, pills for chips and time slots, round avatars. Shadows only as a soft `0 1px 2px rgb(27 42 47 / .05), 0 10px 30px rgb(27 42 47 / .07)` on raised cards (booking card, offer card, sheets); otherwise 1px line borders. Cards lift 2px on hover.
- Buttons: primary = lagoon background, white text, Figtree 600 16px, height 48px (40px small), padding 0 22px, hover lagoon-700. Secondary = white with a 1px line border and ink text. Ghost links = lagoon-700 with an underline on hover. On ink backgrounds: primary stays lagoon, secondary is transparent with a white/30 border.
- Spacing scale 4/8/12/16/24/32/48/64/96. Sections 96px vertical padding desktop, 64px phone. Container 1200px max, 32px side padding desktop, 20px phone.
- Icons: lucide-react at 1.75 stroke. Check each icon name exists in the installed lucide-react before using it (good ones: Sparkles, Siren, Sun, Smile, Baby, Anchor, Stethoscope, ShieldCheck, BadgeCheck, CalendarCheck, CalendarClock, Clock, Phone, MessageSquare, MapPin, Navigation, ClipboardCheck, ClipboardList, FileSignature, HeartPulse, Pill, AlertTriangle, Headphones, Accessibility, ParkingCircle, Armchair, Send, Download, GripVertical). Service icons sit in 44px round lagoon-50 circles with a lagoon-700 icon. No emoji anywhere.
- Logo: an inline SVG React component: a 32px mark of three small rounded petals stacked up a thin stem (a larkspur spike, drawn with simple paths) in lagoon, then "Larkspur" in Newsreader 600 24px ink and "FAMILY DENTAL" under it in Figtree 700 9px letter-spacing .24em muted. Same mark for the favicon (SVG plus 32px PNG and 180px apple-touch icon).
## Business facts (one source of truth)
Stored once in the Business table and used everywhere (header, strip, footer, forms, FAQ answers, schema, llms.txt):
- Name: Larkspur Family Dental. Address: 2150 W Harmony Pines Dr, Suite 120, Fort Collins, CO 80526 (fictional street). lat 40.5236, lng -105.0870. Founded 2011 by Dr. Nadia Okafor.
- Phone and text: (970) 555-0148 → `tel:+19705550148`, `sms:+19705550148`. Email: hello@larkspurdental.example. No WhatsApp.
- Hours (one Hours table, timezone America/Denver): Mon 7:00 AM–5:00 PM, Tue 8:00 AM–6:00 PM, Wed 7:00 AM–5:00 PM, Thu 8:00 AM–6:00 PM, Fri 7:00 AM–4:00 PM, Sat and Sun closed. Lunch 12:00–1:00 PM every weekday (no bookings).
- Emergency note: "Same-day emergency visits on weekdays. After hours, call and choose option 2 for the dentist on call."
- Parking and access: "Free parking in the lot behind the building. Step-free entrance on the north side, and an elevator to Suite 120." "Bus stop at Harmony & Pines Dr, a 2-minute walk."
- Languages: English and Spanish (Jess Moreno, RDH, speaks Spanish).
- Insurance: "We're in network with most PPO dental plans and file the claim for you. We don't take Medicaid." Plans (a labelled sample list, editable): Delta Dental PPO, Cigna Dental PPO, MetLife PDP, Aetna Dental PPO, Guardian DentalGuard, UnitedHealthcare Dental, Humana Dental, Ameritas, Principal Dental, Sun Life Dental, Anthem Dental, Careington (discount plan). Show them as text wordmarks in Figtree 600 on white tiles, never as logos.
- Phone numbers display as "(970) 555-0148". Dates are always human-readable: "Today, 9:42 AM", "Tomorrow, 8:15 AM", "Tue, Dec 9", "Dec 9, 2025". Appointment times show "8:15 AM" with "(MT)" where the visitor might be elsewhere. Reviews use relative dates ("3 weeks ago") with the exact date in a tooltip.
## Providers, chairs and booking rules
- Chairs (schedule columns, in this order): "Op 1", "Op 2", "Op 3", "Hygiene 1", "Hygiene 2".
- Providers (each has a home chair; all Sample profiles with AI portraits):
- Dr. Nadia Okafor, DDS (owner; general, implant and emergency dentistry; 19 years; Op 1; colour #0F6B66). Quote: "I'd rather explain twice than surprise you once."
- Dr. Ben Whitaker, DMD (general dentistry, clear aligners, whitening; 9 years; Op 2; colour #3B5B8C).
- Dr. Elena Sato, DDS (family and kids' dentistry; 7 years; Op 3; colour #8A5A2B).
- Jess Moreno, RDH (hygienist; 8 years; speaks Spanish; Hygiene 1; colour #2E7D4F).
- Tara Hughes, RDH (hygienist; 22 years; gum care; Hygiene 2; colour #7A4E6B).
- Everyone works Mon–Fri during office hours (editable per provider in Content › Hours).
- Visit types (the public "reason for your visit", in this order), each with a duration, who can do it and its block colour on the schedule:
1. "Cleaning and exam" (key cleaning): 60 min for returning patients; new patients get "New-patient visit: exam, X-rays and cleaning", 90 min. Hygienists.
2. "Toothache or emergency" (key emergency): 45 min. Any dentist. May use the emergency holds (below) and normal free time. Lead time 30 min instead of 2 hours.
3. "Whitening consult" (key whitening): 30 min. Dr. Whitaker or Dr. Okafor.
4. "Clear aligner consult" (key aligners): 45 min. Dr. Whitaker.
5. "Implant consult" (key implant): 60 min. Dr. Okafor.
6. "Kids' visit (under 13)" (key kids): 45 min. Dr. Sato.
7. "Something else (filling, crown, second opinion)" (key other): 45 min. Any dentist.
- Booking rules (Settings): lead time 120 minutes (emergency 30), booking window 60 days, slot step 15 minutes, buffer 10 minutes after every visit (room turnover), cancellation notice 24 hours.
- Emergency holds: every dentist has two held blocks a day, 10:30–11:15 AM and 2:30–3:15 PM. Only "Toothache or emergency" bookings can take them. On the schedule they show as hatched grey "Emergency hold" blocks the office can release for a day.
## Demo labelling
- Business.demoMode is on by default. While on: a slim dismissible bar above everything (ink-700, white/80 text 13px, X button, dismissal remembered in localStorage): "Demo site. Larkspur Family Dental is a fictional practice; photos are AI samples, prices and reviews are placeholders. Please don't enter real health information. Office sign-in: /admin" (the /admin part is a link).
- Every seeded image shows a small chip in its bottom-left corner: "Sample photo" (Figtree 700 10px uppercase, letter-spacing .1em, white on rgb(27 42 47 / .62), 4px radius). Before-and-after images show "Sample · AI image". Each image row has an isSample flag; images the owner uploads have it off. Below 160px of image width the chip shortens to "Sample" (9px).
- Every seeded review shows a small "Demo review" tag; every seeded team profile a "Sample profile" tag; the insurance list a "Sample list" tag; every seeded price a tiny "Demo price" note next to the price lines block (once per block, not per number). The footer says "Demo content: practice details, people, photos, prices, plans and reviews are placeholders." while demoMode is on.
## Public site, home page top to bottom
1. **Utility row** (ink, 36px, 13px white/80; desktop only): left: MapPin "2150 W Harmony Pines Dr, Fort Collins" and a live "Open today 8 AM–6 PM" or "Closed today · opens Mon 7 AM" (from Hours); right links with small icons: Insurance (/insurance), Smile Plan (/smile-plan), Financing (#financing), "New patients welcome" (/new-patients). Scrolls away.
2. **Sticky header** (white, 76px, 1px bottom line, soft shadow after 8px of scroll): logo left; nav (Figtree 600 15px ink): Services (opens a two-column dropdown panel: round icon, name and from-price per service, hairline dividers), Insurance, New patients, Our team, Smile Plan, Reviews. Right (ref 1 and 2): a phone pill (1px line border, Phone icon, "(970) 555-0148" in Figtree 700, tel:) and a primary "Book online" button (scrolls to #book on home, else /book). Under 1240px wide the nav collapses into a menu button (logo, phone pill and "Book online" stay, full phone number visible; labels never wrap mid-word). Under 768px: header 60px with logo and the menu button only; the menu opens a full-height sheet with the nav, the services as a two-column icon list, hours today, the phone and the Book button.
3. **Emergency strip** (ref 2; under the header, full width, 44px, ink background, white 15px 500; shown only when the owner's switch is on): a small lagoon pill "Same day" + Siren icon, the owner's text "Toothache or broken tooth? Same-day emergency visits." then an underlined white link "Call (970) 555-0148" (tel:) and on desktop "or book an emergency visit" (opens the booking card with "Toothache or emergency" selected). The owner edits the text and switches it on or off in admin Content; when off it disappears everywhere. On phones it is one line: "Toothache? Same-day visits" + "Call" link.
4. **Hero** (paper background, about 48px top padding at 1440): left 7/12: eyebrow "Family & cosmetic dentistry · Fort Collins"; H1 "Gentle dental care, and a time that works for you."; subline "Cleanings, fillings, crowns, implants, aligners and kids' visits. We take most PPO plans, and new patients can usually be seen this week."; a small rating line "4.9 ★ · 16 Google reviews" (computed from reviews; links to #reviews; tiny "Demo" tag while reviews are demo); three check lines with lagoon round check icons: "In network with most PPO plans", "Same-day emergency visits on weekdays", "Open until 6 PM on Tuesdays and Thursdays"; then the hero photo in a framed 16:10 box (full left-column width up to 600px, 10px radius, Sample photo chip). At 1440x900 the H1, subline and the top of the photo are above the fold. Right 5/12: the booking card (below).
5. **"Book your visit" card** (id "book", white, 460px wide, 28px padding, raised shadow, a 4px lagoon top border; the same component powers /book). A 4-step flow inside the card with a thin progress line and "Step 2 of 4"; each later step shows a summary of earlier choices as small chips with "Edit" (e.g. "New patient · Cleaning and exam · First available"). Steps animate sideways (200ms, reduced-motion: no movement).
- Step 1 "Book your visit": "Have you been to Larkspur before?" a two-option segmented control "I'm a new patient" / "I've been here before". Then "What's the visit for?" the seven reasons as tappable rows with icons (Sparkles, Siren, Sun, Smile, Anchor, Baby, Stethoscope), the emergency row with a small "Same day" pill. Choosing "Toothache or emergency" shows a lagoon-50 note "In pain right now? Call (970) 555-0148 and we'll fit you in today." Button "Next".
- Step 2 "Who would you like to see?": first row "First available" (selected by default, "Soonest: Today, 2:30 PM" computed live), then a row per provider who does this visit type: round photo, name and credential, role line, "Next opening: Tomorrow, 8:15 AM" computed live. Providers who don't do it are not shown.
- Step 3 "Pick a time": a row of day pills for the next 14 days (weekday + date, "Today", "Tomorrow"; closed or fully booked days muted and disabled; scrolls sideways), then the open times for that day as pill buttons in a 3-column grid (the selected time is a solid lagoon pill with white text and a 2px lagoon-700 ring, here, on /book and in the admin reschedule picker) under small "Morning" and "Afternoon" labels (first available shows the provider's first name under each time). Only truly open times from the availability engine appear: never a booked, held, lunch, out-of-hours, past or too-soon slot. Emergency visits show "Same-day emergency times" first. Under the grid: Clock icon "Times are in Fort Collins time (MT)". Loading: skeleton pills. Empty day: "No openings on Friday." with a button "Next opening: Monday, Dec 8 at 7:30 AM". Error: "We couldn't load times. Try again or call (970) 555-0148." with Retry.
- Step 4 "Your details": first name, last name, mobile (formats as you type), email, date of birth (one input with an MM/DD/YYYY mask and a numeric keypad on phones; must be a real past date), "Dental insurance" select (the insurance list + "I don't have dental insurance" + "Other or not sure"), "Anything we should know? (optional)", a checkbox "Text me reminders about this visit" (on). A summary box shows the reason, provider, day and time ("Tue, Dec 9 · 8:15 AM with Jess Moreno, RDH"). Button "Request this time". Microcopy: "No charge to book. We'll text to confirm within one business hour." New patients also see "Next you'll fill in your new-patient forms online (about 6 minutes)."
- Submits an appointment (status requested, source "hero" or the page's source) and goes to /booked/:token. If the time was taken meanwhile the server answers 409 and the card goes back to step 3 with "Someone just took that time. Here are the next open ones." and fresh times; every other field is kept.
6. **New-patient offer tab** (refs 4 and 5; desktop and tablet only, when the offer is on): a tab fixed to the bottom-left of the viewport (ink, 10px top corners, "New patient offer" in 13px 600 and the price "$129" in Newsreader 28px on a lagoon block). Clicking it opens the offer card above it (white, 320px, raised): "New-patient visit" eyebrow, "$129" big with "Usually $385" struck through, the checklist "Exam with a dentist", "Full set of X-rays", "Cleaning", "Your plan and prices in writing", terms "For new patients without insurance. With insurance, we bill your plan." , a tiny "Demo price" note, buttons "Book this offer" (opens the booking card with "I'm a new patient" + "Cleaning and exam" and adds offer code NEWPT129) and "Details" (/new-patients), and an X to close. The tab hides on /admin, /forms and /booked, and can be dismissed for the session.
7. **Quick links** (ref 3; white, a row of six tiles overlapping the hero's bottom edge on desktop, 2 columns on phone): each tile is a white card with a line border, an icon circle, a name and a right arrow: "Cleanings & exams", "Emergency visits", "Clear aligners", "Dental implants", "Teeth whitening", "Kids' dentistry" → their service pages.
8. **Why patients choose us** (white, ref 3): eyebrow "Why Larkspur", H2 "A dentist's office that's easy to say yes to", four items in a row (2×2 on phone), each a 52px lagoon-50 round icon, an H3 and two lines: "We take most PPO plans" (ShieldCheck; "We check your benefits before you come in and file the claim for you."), "Same-day emergencies" (Siren; "Toothache or broken tooth? We hold time every weekday for it."), "Prices before treatment" (ClipboardCheck; "You get your share in writing before we start. No surprises."), "Comfort first" (Headphones; "Headphones, warm blankets, numbing gel, and a hand signal that means stop.").
9. **Insurance** (shell section, id "insurance", ref 6): left (6/12): eyebrow "Insurance", H2 "We take most PPO dental plans", text "We're in network with the plans below and file your claim for you. Most PPO plans cover cleanings and exams at 100%." a "Sample list" tag, then the plans as a 3-column grid of white tiles (wordmark text only) with a "See all plans" tile → /insurance, and a muted note "Plans change. We confirm your coverage before your visit. We don't take Medicaid." and a link "No insurance? See the Smile Plan →". Right (6/12): the coverage card (white, raised): H3 "Not sure? Ask us to check your coverage", text "Send your plan details and we'll call or text within one business day with what's covered.", fields: your name, mobile, email (optional), insurance company (select from the plan list + "Other"), plan or employer name (optional), member's date of birth, "What do you want to know? (optional)"; button "Check my coverage"; success replaces the form: "Thanks, Maria. We'll call or text you by tomorrow with what your plan covers." Saves a CoverageCheck (source "home") and runs the owner alert.
10. **Services** (paper, id "services"): eyebrow "Services and prices", H2 "Everyday dentistry, priced up front", sub "Prices are for patients without insurance. With insurance, we estimate your share before treatment." A 3×3 grid of service cards: photo strip (16:9, Sample chip), icon circle, name (Newsreader 22px), one line, a price line in ink 600 18px ("From $165 a tooth"), an insurance line in lagoon-700 13px ("Covered 80% by most PPO plans" or the "Covered by most plans" chip), and links "Book" (opens the booking card with the mapped reason) and "Details →" (/services/<slug>). A "Demo prices" note under the grid. The services:
- Cleanings & exams (`cleanings-and-exams`, Sparkles, reason cleaning): "A gentle cleaning, an exam and X-rays when you're due." "$189 without insurance" · chip "Covered by most plans".
- Fillings (`fillings`, Stethoscope, reason other): "Tooth-coloured fillings that match your smile, usually in one visit." "From $165 a tooth" · "Most PPO plans cover 80%".
- Crowns (`crowns`, ShieldCheck, reason other): "Porcelain crowns to protect a cracked or heavily filled tooth." "From $1,150" · "Most PPO plans cover 50%".
- Root canals (`root-canals`, HeartPulse, reason emergency): "Save the tooth and stop the pain, with plenty of numbing." "Front tooth from $895 · Molar from $1,250" · "Most PPO plans cover 50–80%".
- Dental implants (`dental-implants`, Anchor, reason implant): "A permanent tooth replacement: implant, abutment and crown." "From $3,950 · Free implant consult" · "Some plans cover part".
- Clear aligners (`clear-aligners`, Smile, reason aligners): "Straighter teeth with clear trays you change every week or two." "From $3,800 · Free consult" · "Some plans cover part".
- Teeth whitening (`teeth-whitening`, Sun, reason whitening): "Take-home trays or one visit in the office." "Take-home $295 · In-office $495" · "Not covered by insurance".
- Kids' dentistry (`kids-dentistry`, Baby, reason kids): "First visit by age one. Cleanings, sealants and a lot of patience." "Kids' cleaning $129 · Sealants $45 a tooth" · chip "Covered by most plans".
- Emergency visits (`emergency-dental`, Siren, reason emergency): "Toothache, swelling or a broken tooth. Seen the same weekday." "Emergency exam and X-ray $95" · "Usually covered".
11. **Your first visit** (white, id "new-patients"): left: the reception photo (Sample chip); right: eyebrow "New patients", H2 "Your first visit, step by step", four numbered steps with thin connecting lines: "Book online or call" ("Pick a time that suits you. Evenings until 6 on Tue and Thu."), "Fill in your forms from your phone" ("Health history and consent, about 6 minutes. No clipboard in the waiting room."), "Meet your hygienist and dentist" ("A cleaning, X-rays and a full exam. About 90 minutes."), "Leave with a plan in writing" ("What you need, what can wait, and your share of the cost."). Then the offer inline (when on): a lagoon-50 panel "$129 new-patient visit · usually $385" with the checklist and "Book a new-patient visit". Under it a muted line "Have insurance? Your plan usually covers this visit."
12. **Team** (shell, id "team", ref 10): first a feature panel for the owner: large portrait left (4:5, Sample chip), right: eyebrow "Meet the owner", H2 "Dr. Nadia Okafor, DDS", the quote in Newsreader italic 26px, two short paragraphs ("I opened Larkspur in 2011 with two chairs and one rule: nobody leaves confused about their own mouth." / "Today we're three dentists and two hygienists, and the rule hasn't changed. We show you what we see on the screen, give you options, and put the price in writing before we start."), credential lines with lagoon checks ("General, implant and emergency dentistry", "19 years in practice", "Mom of two, trail runner on weekends") and "Book with Dr. Okafor". Then a row of 4 cards (Dr. Whitaker, Dr. Sato, Jess Moreno, Tara Hughes; horizontal scroll with snap on phone): photo (4:5, rounded, Sample photo chip), name with credential, role, years, language chip ("Habla español" for Jess), a one-line quote in their words, "Sample profile" tag, and "Book with Ben" (opens the booking card with that provider and a suitable reason).
13. **Before and after** (white, id "smiles", ref 9): eyebrow "Smile gallery", H2 "Real changes, explained simply", six cards in a 3-column grid (horizontal scroll on phone): an interactive before/after slider (drag handle with GripVertical, keyboard arrows move it, "Before" / "After" labels in the corners, "Sample · AI image" chip), then the treatment ("Clear aligners · 14 months"), one line, and the provider. Pairs: teeth whitening (in-office, 1 visit), clear aligners (14 months), porcelain crown (2 visits), chipped front tooth bonding (1 visit), single implant (4 months), tooth-coloured filling replacing a dark old filling (1 visit). Note under: "Sample images generated for this demo. Your results depend on your teeth."
14. **Reviews** (paper, id "reviews", ref 8): left: "4.9" in Newsreader 64px, five lagoon stars, "16 reviews", a 5-to-1 bar histogram in lagoon, topic chips with counts ("gentle 7", "explained everything 6", "on time 5", "kids 4", "emergency 3", "insurance help 4"), "See us on Google ↗" (hidden when the link is empty). Right: a 2-column grid of six review cards: initial avatar (white on one of #0F6B66, #3B5B8C, #8A5A2B, #2E7D4F, #7A4E6B, #4A5C62), name ("Maria A."), visit type muted ("Cleaning and exam"), stars and relative date, text clamped to 5 lines with "More", the provider when mentioned, an owner reply block (lagoon-50, "Reply from Dr. Okafor") when present, and a footer with a small "G" mark "Google" and the "Demo review" tag. "See all 16 reviews" expands the rest.
15. **Office tour** (white, ref 7): eyebrow "Our office", H2 "Bright rooms, big windows, no rush", a row of four photos (reception, treatment room with foothills view, kids' corner, the building outside; each Sample chip; 2×2 on phone), then three value cards: "Comfort menu" (Armchair; "Headphones, blankets and a pause any time you raise your hand."), "Low-dose digital X-rays" (ShieldCheck; "Up to 80% less radiation than film, on screen in seconds."), "Step-free and close to the bus" (Accessibility; the access note from Business).
16. **Smile Plan and financing** (shell, id "financing"): two panels side by side (stacked on phone). Left "No insurance? Join the Smile Plan." with "From $29 a month", a checklist ("2 cleanings and exams a year", "X-rays when you're due", "1 emergency exam", "15% off other treatment"), buttons "See the Smile Plan" (/smile-plan) and "Join" (/smile-plan#join). Right "Monthly payments for bigger treatment" with text "Crowns, implants and aligners can be paid monthly through our lending partner. Subject to credit approval. Terms depend on the lender." a muted example line "Example only: a $3,950 implant over 24 months", the primary button with the owner's label "Check your monthly payment ↗" (opens the owner's financing link in a new tab; hidden when the link is empty) and "Ask us about financing" (sms link). Never name a real lender or promise a rate.
17. **Visit us** (white, id "visit"): left (5/12): H2 "Visit us", the address with "Get directions" (`https://www.google.com/maps/dir/?api=1&destination=<encoded address>`), the hours table (today's row highlighted lagoon-50 with a live "Open now · until 6 PM" or "Closed · opens Mon 7 AM"; lunch noted "Closed 12–1 for lunch"), phone, text and email links, the parking note (ParkingCircle), the access note (Accessibility) and the bus note. Right (7/12): a Leaflet map (440px tall, 10px radius, 1px line border) with OpenStreetMap tiles `https://tile.openstreetmap.org/{z}/{x}/{y}.png` and the OSM attribution, slightly desaturated with a CSS filter, one lagoon round marker with the logo petals and a small popup with the name and "Get directions"; zoom 15; scroll-zoom off until clicked; `.leaflet-container img.leaflet-tile { mix-blend-mode: plus-lighter; }` to hide tile seams. The map must render on phones: explicit height, invalidateSize() after mount and on resize.
18. **FAQ** (paper, id "faq", ref 9): left (5/12): H2 "Questions we hear a lot", "Still have a question? Text us." (sms link). Right (7/12): accordion with plus icons, first item open, answers filled from Business facts:
- "Do you take my insurance?" "We're in network with most PPO plans, including Delta Dental, Cigna, MetLife and Aetna. Send your plan details with the coverage form and we'll check before your visit. We don't take Medicaid."
- "What if I don't have insurance?" "Our Smile Plan covers two cleanings and exams a year, X-rays and an emergency exam from $29 a month, with 15% off other treatment."
- "How soon can I get in?" "Most new patients are seen within a week. The booking card shows our real open times."
- "I have a toothache. What should I do now?" "Call us. We hold time every weekday for emergencies. Until then, rinse with warm salt water, take an over-the-counter pain reliever if it's safe for you, and use a cold pack on the cheek. If your face or neck is swelling and you have trouble swallowing or breathing, go to the ER."
- "What happens at my first visit?" "About 90 minutes: X-rays, a cleaning and an exam with a dentist. You leave with a plan and your share of the cost in writing."
- "Do you see kids?" "Yes. Dr. Sato sees kids from their first tooth. We recommend a first visit by age one."
- "Can I fill in my forms online?" "Yes. After you book, we send a link to your new-patient forms. It takes about 6 minutes on your phone."
- "What if I need to cancel?" "Please give us 24 hours' notice by phone or text so we can offer the time to someone in pain."
19. **Footer** (ink): logo (light version) and "Family and cosmetic dentistry in Fort Collins since 2011."; columns "Contact" (phone, text, email, address with Get directions), "Hours" (from the Hours table; at least 220px wide, each day and its time on one line), "Services" (the nine services), "Patients" (New patients, Insurance, Smile Plan, Financing, Privacy, Office sign-in). Bottom row "© 2026 Larkspur Family Dental" and the demo line while demoMode is on. Phone numbers never wrap; the email may break only after the @ (a <wbr> after it).
## Other public pages
- **/book**: the same booking flow as a full page: on desktop a left summary column (the choices so far, the practice address, hours today, "Questions? Call (970) 555-0148") and the steps on the right in a wider card (times in a 4-column grid). Accepts `?reason=<key>&provider=<id>&patient=new|returning&offer=<code>&r=<recallToken>` to preselect; a recall token also prefills the patient's name, mobile, email and date of birth and marks them returning.
- **/booked/:token**: "Thanks, Maria. Your visit is requested." (first name), a summary card: reference "LF-3001", the visit type, provider with photo, "Tue, Dec 9 · 8:15 AM (MT)", "About 90 minutes", the address with Get directions, status "Requested: we'll text to confirm within one business hour" (or "Confirmed" once the office approves; this page reads the live status). Buttons "Add to calendar" (.ics download), "Call", "Text". For new patients a prominent lagoon-50 card: "Next: your new-patient forms" "Health history, medications and consent. About 6 minutes." button "Fill in my forms" → /forms/:formsToken; once complete it shows "Forms done · signed Dec 4, 9:41 AM". Returning patients see an optional "Update your health history" link. "Need to change it? Call or text us, or cancel this request." where "cancel this request" asks for confirmation, sets status canceled, frees the slot and alerts the office. Fires the conversion once per appointment (sessionStorage guard): `dataLayer.push({event: "generate_lead", lead_ref, visit_type, value})`, plus the Google Ads conversion when its ID and label are set.
- **/forms/:token** (new-patient forms; calm and roomy, max width 720px, paper background, the logo and "New-patient forms for Tue, Dec 9 · 8:15 AM" at the top, a progress bar with five named steps, "Saved" indicator; every step saves to the server when you press Next, so the patient can leave and come back with the same link; a slim warning panel "Demo site: please don't enter real health information." while demoMode is on):
1. "About you": legal first and last name and date of birth (prefilled), street, city, ZIP, mobile and email (prefilled), emergency contact name and phone, preferred language (English / Español / Other). Insurance: carrier (prefilled), subscriber name, relationship to the patient (Self / Spouse or partner / Parent / Other), member ID (optional).
2. "Medical history": "Are you being treated by a doctor right now?" Yes/No with a detail box on Yes; "Have you been in the hospital in the last 2 years?" Yes/No + detail; a two-column checkbox list "Do you have or have you had": High blood pressure, Heart condition or heart surgery, Artificial heart valve, Artificial joint (hip, knee), Diabetes, Asthma or lung disease, Bleeding problems or blood thinners, Hepatitis or liver disease, Kidney disease, Thyroid problems, Seizures, Bone medicine (like bisphosphonates), Cancer treatment in the last 2 years, Sleep apnea, "None of these" (clears the others); "Are you pregnant or nursing?" Yes/No/Not applicable; "Anything else your dentist should know?".
3. "Medications and allergies": medication rows (name, dose, what it's for) with "Add another" and a "I don't take any medications" checkbox; allergy chips (multi-select): Penicillin or other antibiotics, Latex, Local anesthetic, Aspirin or ibuprofen, Codeine or other opioids, Metals, "No allergies" (clears the others), plus "Other allergy" text.
4. "Dental history": "When was your last dental visit?" (Within 6 months / 6–12 months / 1–2 years / More than 2 years / Not sure), "What would you like help with?" (text), checkboxes Sensitive teeth, Bleeding gums, Jaw pain or clicking, Grinding or clenching, Bad breath, Crooked or gapped teeth, Stained teeth, Missing teeth; "How do you feel about dental visits?" a 5-point scale from "Relaxed" to "Very nervous"; comfort preferences (Headphones, Warm blanket, Numbing gel first, Short breaks, Tell me everything / Tell me only what I need).
5. "Consent and signature": a scrollable consent box (consent to examination and treatment, financial policy, notice of privacy practices acknowledgment, 24-hour cancellation policy; plain language, about 250 words), three required checkboxes ("I agree to examination and treatment", "I've read the financial policy", "I've received the notice of privacy practices"), a signature pad (HTML canvas, 640x180 desktop / full width phone, draw with mouse, pen or finger using pointer events, a light baseline and "Sign here", "Clear" button, high-DPI aware), "Type your full name" input, today's date shown, and "Sign and submit". Submitting requires all three boxes, a non-empty signature and the typed name. The signature is saved as a PNG through the server (private storage, never public), with the typed name and time. Done screen: "Thanks, Maria. Your forms are attached to your visit on Tue, Dec 9." with Add to calendar and Directions.
The forms are attached to the appointment and the patient. A forms link stops accepting changes 14 days after the visit and shows "These forms were submitted. Call us to update them." once signed. Validation errors show inline under each field in error red, and the first error scrolls into view.
- **/services/:slug**: hero band (shell) with breadcrumb, H1 (e.g. "Dental crowns in Fort Collins"), the price lines, the insurance line, buttons "Book a visit" and "Call (970) 555-0148", the service photo. Then 250–350 words of plain, specific copy (who it's for, what happens at the visit, how long it takes, how it feels, aftercare), "What to expect" as 3 steps, a price box ("From $1,150 without insurance · Most PPO plans cover 50% after your deductible · We give you your share in writing first"), three service FAQs, and the booking card with this service's reason preselected (source "service-<slug>"). Page title "Dental Crowns in Fort Collins, CO | Larkspur Family Dental".
- **/insurance**: H1 "Insurance and payment", the full plan list with the Sample list tag and notes, "How billing works" in 3 steps ("Send your plan details", "We check your benefits and tell you your share", "We file the claim; you pay your share at the visit"), a typical-coverage table ("Most PPO plans: Preventive (cleanings, exams, X-rays) 100% · Basic (fillings, root canals) 70–80% · Major (crowns, implants) 50%. Your plan may differ."), the coverage form (source "insurance"), the Medicaid note, and Smile Plan and financing cards.
- **/smile-plan** (Larkspur Smile Plan, in-house savings plan for people without insurance): hero H1 "No insurance? Cleanings and exams from $29 a month.", sub "Join for yourself or your family. No deductibles, no waiting periods, no claim forms." A Monthly/Yearly toggle ("2 months free" on yearly) above two tier cards:
- **Essentials** — $29/month or $299/year (kids under 13: $19/month or $199/year): 2 cleanings and exams a year, X-rays when you're due, 1 emergency exam, 15% off fillings, crowns and other treatment.
- **Gum Care** (the "For gum health" chip) — $39/month or $399/year: 4 periodontal maintenance cleanings a year, exams and X-rays when you're due, 1 emergency exam, 20% off other treatment.
Under them the join form (id "join"): tier, billing, name, mobile, email, date of birth, "Add family members" (name + date of birth rows, each priced adult or kid by age), and the payment block. When STRIPE_SECRET_KEY is not set in backend/.env, show a bordered demo box "Demo checkout: no card is charged. Connect Stripe in admin Settings to take real payments." with a disabled card-field mock and the button "Join the Smile Plan (demo)". Submitting saves the Member (status "pending_payment" in demo; "active" when paid via Stripe Checkout) and goes to /smile-plan/welcome ("You're in, Maria. We'll text you to book your first cleaning."). Note "The Smile Plan is not insurance. It's a membership with our office only." Plan FAQs below.
- **/new-patients**: H1 "New patients welcome", the offer card, the four first-visit steps, "What to bring" (photo ID, insurance card, a list of medications), "Your forms" (explains the link comes after booking), and the booking card with "I'm a new patient" preselected.
- **/privacy**: plain-English privacy policy from the business facts, including a "Health information" section (what the forms collect, who sees it, that it's kept private and never sold). A designed 404 page with the phone number and "Book a visit".
## Phone layout (390px)
- Demo bar wraps to two lines at 12px. Utility row hidden. Emergency strip stays on one line.
- Header 60px: logo and menu button (see header). No offer tab on phones; the offer shows in the new-patients section instead.
- Fixed bottom action bar on every public page under 768px (not on /admin, /forms or /booked): white, 1px top line, 64px plus the safe-area inset, three equal buttons with icons: "Call" (tel:), "Book" (lagoon, white text; scrolls to #book or goes to /book), "Directions" (the Google Maps directions link). The page's bottom padding is the bar height plus the safe-area inset plus 24px, no more.
- Hero: eyebrow, H1 38px, subline, rating, checks, the hero photo (16:10, full content width), then the booking card full width. Reason rows full width; day pills scroll sideways; time pills in a 3-column grid that never clips "11:45 AM". Quick-link tiles 2 columns. Services as compact horizontal cards (icon, name, one line, price, insurance line, "Book"). Team cards scroll sideways with snap. Before/after cards scroll sideways; the slider handle is at least 44px. Map 300px tall. Forms: one column, 16px inputs, the signature pad full width. No text cut off, nothing scrolls sideways.
## Office admin (/admin)
Desktop: left sidebar (ink, 240px) with the logo (light), Today, Requests (with a count badge), Patients, Recall (count of overdue), Coverage checks (count of new), Smile Plan, Content, Notifications, Export, Settings, Publish checklist, and the owner's email with "Sign out" at the bottom. Phone: a bottom tab bar "Today · Requests · Recall · More". At 390px nothing in admin may be clipped or wider than the screen: tables become stacked cards (name and details on top, Call and Text buttons below), forms go single-column. Figtree for UI, Newsreader for page titles. Saves show a small toast "Saved". Deletes ask for confirmation.
- **/admin/login**: centered card on ink: logo, "Office sign-in", email, password, "Sign in", "Forgot password?" (email code reset), and the "Demo office login" card.
- **Alert banner** (top of every admin page): red when an alert failed ("A booking alert didn't send: Email to hello@larkspurdental.example on Dec 3 at 2:14 PM. The appointment is saved." with "View", "Retry", "Dismiss"); otherwise ONE slim warning banner naming channels that need setup: on desktop "Alerts need setup: email (verify a sending domain) and texts (add Twilio keys). Bookings and reminders are still saved." with "Open settings"; under 768px the shorter "Alerts need setup: email and texts. Bookings are still saved." with a "Settings" link, on at most two lines.
- **Today = the schedule** (/admin, refs 11 and 13): header "Friday, December 4" in Newsreader with prev/next arrows, a "Today" button, a date picker, and a summary row of chips with counts: "22 visits · 6 done · 2 in chair · 3 arrived · 1 no-show", plus "3 requests waiting" (signal: lagoon outline button → /admin/requests). Below: the grid. A left time column 7 AM to 6 PM with 15-minute rows (24px tall each, so 96px an hour; hour lines darker, labels "7 AM", "8 AM"), and five chair columns with a sticky header: the provider's avatar, the chair name ("Hygiene 2") on line 1 and the provider's full name with credential ("Tara Hughes, RDH") on line 2, and "6 visits". The grid scrolls vertically inside the page with the headers sticky; on load it scrolls to 7 AM, or to one hour before now on today. Blocks:
- Appointments: positioned by start and duration, background a 12% tint of the provider's colour, 3px left border in the colour, white backing under the tint, 6px radius, showing the time ("9:00–10:30"), the patient name (600), the visit type, and a status chip (Booked grey, Confirmed lagoon, Arrived amber, In chair info blue, Done green with a check; No-show red outline with the name struck through). Small icons: "New" pill for new patients, ClipboardCheck in green when forms are complete (ClipboardList in amber when not started), and a red AlertTriangle with the alert text on hover when the patient has a medical alert (e.g. "Latex allergy", "Blood thinner"). A 30-minute block shows the time and status chip on line 1 and the patient name on line 2; a 45-minute or longer block adds the visit type; nothing is ever cut mid-line (each line ellipsizes on its own). The full detail is in a hover card (ref 11's hover card, cleaner: name, age, visit type, provider, carrier, status, alerts, forms).
- Requested appointments sit in their held slot with a dashed lagoon border and a "Request" chip; clicking opens the request with Approve.
- Emergency holds: hatched grey "Emergency hold" with a small "Release" button (frees it for any visit type that day). Lunch: hatched grey "Lunch" across all chairs. Closed time and closed days: shaded. The schedule always shows every appointment on a day, even a closed one.
- A red now-line across all columns on today, drawn above the gridlines and behind the blocks, with a small dot on the time column.
- **Drag to move**: drag a block (@dnd-kit, pointer and keyboard sensors; a GripVertical handle appears on hover, the whole block is draggable) to another time or another chair column; it snaps to 15 minutes and shows a ghost with the new time while dragging. Dropping on another chair moves it to that chair's provider: if that provider doesn't do this visit type, show a confirm "Dr. Sato doesn't usually do implant consults. Move anyway?" On drop the server re-checks in a transaction (inside hours, no overlap with another appointment or hold in that chair or for that provider, using the same SlotLock rows) and saves; a conflict snaps the block back with a red outline flash and a toast "That overlaps Ken Park at 10:00 in Op 2." Success: the block animates into place (layout animation) and a toast "Moved Maria Alvarez to 10:15 AM with Dr. Whitaker" with a "Text Maria the new time" sms link. Moves persist (reload shows the new place) and write an Event. Give @dnd-kit custom screen-reader announcements in plain words ("Picked up Maria Alvarez, 8:15 AM, Hygiene 1", "Moved over Op 2 at 10:15 AM", "Dropped Maria Alvarez on Op 2 at 10:15 AM", "Move canceled") and custom instructions, never its default ids.
- Click a block to open a **side sheet** (480px): patient name with age, New/Returning, phone with Call (tel:) and Text (sms:) buttons, carrier, visit type, provider, chair, day and time; the **check-in status** as a segmented control "Booked · Confirmed · Arrived · In chair · Done" (tapping one sets it and records its time; times shown under each reached step, e.g. "Arrived 9:52 AM"); a "No-show" switch (red; turning it on sets the flag and strikes the block); "Reschedule" (opens a picker with this visit's real open times for the next 14 days, any provider who does it); "Cancel visit" (reason, frees the slot); the **intake forms** panel ("Complete · signed Dec 4, 9:41 AM" with "View forms" opening the full forms in a dialog: every answer grouped by step, medical flags as red chips, medication table, allergies, the signature image with the typed name and time; or "Not started" with "Copy forms link" and "Text forms link" (sms: prefilled "Hi Maria, here are your new-patient forms for Larkspur Family Dental: <absolute /forms link>")); alerts; notes (add a note, timestamped); the notification history for this appointment; and "Text a reminder" (sms: prefilled "Hi Maria, this is Larkspur Family Dental. See you tomorrow at 8:15 AM. Reply C to confirm or call (970) 555-0148.").
- Status changes made in one tab appear in another within 15 seconds (poll).
- Phone (under 768px): chair chips across the top (scrollable) switch the visible column, the day is a list of time blocks for that chair, and each block has a "Move" button that opens a sheet with chair and time pickers (open times only). The side sheet becomes a full-height sheet.
- **Requests** (/admin/requests): tabs with counts "New · Approved · Declined". Each request is a card: patient name, "New patient" badge or "Returning", age, mobile with Call and Text buttons, email, carrier, visit type, the requested time and provider ("Tomorrow, 8:15 AM · Jess Moreno, RDH · Hygiene 1"), "Requested 40 min ago" and the source, the offer code if any, the note; the **intake forms** strip ("Forms: complete · signed 9:41 AM" in green, "Forms: not started" in amber, or "Not needed" for returning patients) with "View intake" expanding inline: medical flags as red chips first ("Latex allergy", "Takes a blood thinner"), then the answers grouped by step, the medication table, the allergies, the dental history and comfort preferences, and the signature image with name and time. Buttons: "Approve" (status booked, sends the confirmation through the notification pipeline: text when Twilio works, email when Resend works and there's an email; logged either way; toast "Approved. Confirmation: text needs setup, email sent"), "Reschedule" (a picker with the real open times for that visit type and provider or first available; saves the new time with new locks, status booked, sends the new time the same way), "Decline" (a reason select "We can't take your insurance" / "We need to see you sooner, please call" / "Duplicate request" / "Other" + note; frees the slot; notifies). Approved and declined cards move to their tabs with who and when.
- **Patients** (/admin/patients): a table that fits 1280–1440px with no hidden columns: Name (age under it, a "New" pill for patients whose first visit is upcoming, a Smile Plan pill), Mobile with Call and Text icon buttons inline to the right of the number on the same line (rows about 56px tall; the row is clickable without nesting a link inside a link), Carrier, Last visit ("Jun 12" or "Never"), Recall due (chip: "Overdue 23 days" error tint, "Due in 12 days" warning tint, "Booked Dec 9" success tint, "Not due"), Next visit, Provider. Search (name, phone, email), filters (carrier, recall status, new patients, Smile Plan members), sortable columns, 25 per page. Row click opens the patient page: header with name, badges, age and DOB, actions Call, Text, Email, "Book a visit" (opens the admin booking drawer for this patient), and "Send recall reminder"; left column: contact, address, insurance (carrier, subscriber, relationship), emergency contact, preferred language; main: medical alerts, upcoming visits, visit history (date, provider, visit type, status, notes), intake forms (latest, with "View"), the recall card (type, interval, due date, reminders sent and last reminded, "Send reminder"), notes timeline, Smile Plan membership. Admin can also add a patient and book a visit for them from the schedule (an "Add visit" button and clicking an empty slot opens the booking drawer: patient search or new patient, visit type, provider, open times only from the same engine (the office may skip lead time and window, never overlaps or hours), note, source "phone").
- **Recall** (/admin/recall, ref 12): H1 "Recall", sub "Patients due for their cleaning. One tap sends a reminder." Filter tabs with counts: "Overdue · Due in 30 days · Reminded · All", a provider filter and a type filter (Cleaning 6 months, Gum care 3 months, Kids 6 months). Table (fixed layout that fits 1280–1440px with no column overlapping another): checkbox, Due date ("Nov 12" with a "22 days overdue" chip), Patient (age), Interval and type, Last visit and hygienist, Contact (the mobile number nowrap on its own line, the email under it, ellipsized), Reminders (at least 120px; "2 · last Nov 20 by text" or "None yet"), Status (Due, Overdue, Reminded, Booked), and row actions: one primary small "Send reminder" button plus two 36px icon buttons (Book, Call) with tooltips and aria-labels. "Send reminder" is one tap: it renders the reminder template ("Hi Maria, it's time for your cleaning at Larkspur Family Dental. Book online: <absolute /book?r=<recallToken> link> or call (970) 555-0148.") and sends it through the notification pipeline (text via Twilio when connected, else email via Resend when it works and the patient has an email); when no channel can send, it is a demo send: a NotificationLog row with status "demo" and the note "Demo send: connect Twilio or a Resend domain to send reminders for real". Either way the row updates at once to "Reminded · just now" with a channel tag ("Text", "Email" or "Demo"), the reminder count goes up, and a toast says what happened ("Reminder logged as a demo send. Connect texts in Settings to send for real."). Select rows + "Send reminders (5)" sends them in a batch. A "Reminder log" button opens a drawer listing every reminder NotificationLog row (time, patient, channel, to, status, error). The template is editable in Settings. Booking from a reminder link marks that recall "Booked".
- **Coverage checks** (/admin/coverage): an inbox list (newest first) with status tabs and counts "New · Checking · Replied": name, mobile with Call/Text, email, carrier, plan or employer, member DOB, the question, received ("Today, 9:12 AM"), source; open one to change status, add notes and "Text reply" (sms: prefilled "Hi Maria, this is Larkspur Family Dental. Good news: ..."). New ones show a badge in the sidebar.
- **Smile Plan** (/admin/smile-plan): members table (name, tier, billing, family members, started, renews "in 12 days", status Active / Pending payment / Canceled, cleanings used this year "1 of 2"); under 768px members are stacked cards. Filters "Renewing in 30 days", "Pending payment". Tier editor (name, monthly and yearly price, kids price, benefits list).
- **Content** (/admin/content), tabs:
- "Site": emergency strip switch, text and link label (with a live preview of the strip); hero headline, subline and checks; hero photo (upload, stored in Vibecode Storage as public site media, checked by its first bytes); new-patient offer (on/off, title, price, regular price, checklist, terms, "Show as demo price" flag; a preview of the tab and card); financing label, link and text; Medicaid note; parking, access and bus notes.
- "Services & prices": edit each service (name, slug, icon, short line, body, price lines, insurance line, "Covered by most plans" chip, mapped visit type, photo, active, order) and the visit types (label, duration, new-patient duration, which providers, colour, active). Changes show on the site at once.
- "Insurance": the plan list (add, rename, remove, reorder; note per plan; "Sample list" flag).
- "Hours": per weekday open/close, lunch, closed switch; provider working hours and emergency holds per weekday.
- "Team": provider profiles (name, credential, role, years, bio, quote, languages, photo, colour, chair, active).
- "Reviews" (add, edit, delete, demo flag, owner reply, Google review link), "Gallery" (before/after pairs with captions), "FAQ" (add, edit, reorder, hide).
- **Notifications** (/admin/notifications): the full NotificationLog (time, kind: owner alert / confirmation / reschedule / decline / recall reminder / coverage alert / plan join, channel, to, status sent / failed / needs setup / demo, error) with filters, and Retry on failed rows.
- **Export** (/admin/export): cards with a description and a "Download CSV" button each: "Appointments" (with a date range; ref, created, status, no-show, patient, mobile, email, visit type, provider, chair, start, end, new patient, source, offer code, UTM source/medium/campaign, gclid, landing page), "Patients" (name, DOB, mobile, email, carrier, last visit, next visit, recall due, Smile Plan), "Recall list" (current filter), "Coverage checks". Downloads come from authenticated GET endpoints with `Content-Disposition: attachment; filename="larkspur-appointments-2026-12-04.csv"`, properly escaped. CSVs never include medical history, medications, allergies or signatures (a note on the page says so).
- **Settings**: Practice facts; Booking rules (lead time, emergency lead time, window, slot step, buffer, cancellation notice); Notifications (alert email, alert mobile, "Send alerts from" address, the recall reminder template with {first}, {link}, {phone} placeholders; Email (Resend) and Text (Twilio) status: "Connected", "Needs setup" or "Failing"; "Send test booking", which runs a real request through the pipeline and shows each channel's result); Payments (Stripe: "Not connected" with how to add STRIPE_SECRET_KEY; never fake "Connected"); Tracking (GTM ID, Google Ads conversion ID and label, canonical domain); Google review link; Demo mode switch; Account (change email and password).
- **Publish checklist**: computed items with status icons and "Fix" links: "Replace the demo reviews (16 left)", "Replace the sample photos (n left)", "Replace the sample team profiles", "Replace the before-and-after samples", "Set your real phone, email and address", "Review your services, prices and insurance list", "Set or turn off the new-patient offer", "Set your financing link", "Change the office password", "Send a test booking and confirm the alert arrived", "Connect texts (Twilio) for confirmations and recall reminders", "Connect Stripe for Smile Plan payments (optional)", "Sign business associate agreements (BAAs) with your hosting, email, text and form providers before you take real patient information" (manual tick, links to the README section), "Add your Google review link", "Turn off demo mode", "Connect your domain and HTTPS" (manual tick).
## Functions that must actually work
- **Availability engine** (one module, used by the booking card, "Next opening" lines, admin reschedule, admin booking and drag validation): for a visit type and a provider (or every eligible provider for "first available"), duration = the type's duration (new-patient duration for new patients), busy block = duration + buffer. Candidate starts every slot step inside the provider's working hours for that weekday AND the office hours, outside lunch; the whole busy block must fit before closing; skip anything before now + lead time (emergency: 30 min) or after the booking window; skip overlaps with any appointment for that provider OR in that provider's chair whose status is requested, booked, confirmed, arrived, in chair or done (including buffers); skip emergency holds unless the visit type is emergency (and the hold isn't released); skip chair blocks. Build wall-clock times in America/Denver and convert to UTC with date-fns-tz, so DST and day edges are right. "First available" returns each time once, assigned to the provider with the fewest visits that day. Days with no openings come back marked so the day pills can disable them.
- **No double booking, enforced by the database**: creating, approving, rescheduling, admin booking and drag-moves run in one Prisma transaction that re-checks availability, writes the Appointment, and inserts one SlotLock row per 15-minute block of the busy block with BOTH `@@unique([providerId, blockStart])` and `@@unique([chairId, blockStart])` (two lock tables or one table with both constraints). A unique violation rolls back and returns 409 slot_taken. Canceling or declining deletes the locks. Prove it with a script (backend/scripts/double-book.ts) that fires two simultaneous POSTs for the same slot: exactly one 201 and one 409.
- **Store first, then notify.** POST /api/appointments validates with Zod, finds or creates the Patient by mobile + date of birth, saves the Appointment, its locks, an empty IntakeForm (new patients) and a "requested" Event in one transaction FIRST, returns {ref, token, formsToken}, and only then sends notifications in the background: an owner alert email (Resend via the proxied RESEND_API_KEY at https://api.resend.com/emails, from the "Send alerts from" setting, never from a Vibecode domain), an owner text via Twilio's REST API when TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN and TWILIO_FROM_NUMBER exist (otherwise logged "needs_setup"), and a patient "request received" email when they gave one. Every attempt writes a NotificationLog row (kind, channel, to, status sent / failed / needs_setup / demo, error, time) and an Event. Resend 401/403/422 = needs_setup; network errors or 5xx = failed. Failures drive the admin banner and have a Retry. Coverage checks, Smile Plan sign-ups, approvals, reschedules, declines, cancellations and recall reminders use the same pipeline. Test Resend from the sandbox and report what happened. Owner alert emails never include health answers, only "Forms complete" and a link to admin.
- **Intake privacy**: health answers and signatures are only readable through authenticated /api/admin routes, or by the patient through their own forms token before submission. The signature PNG goes to Vibecode Storage (or a private server folder outside webapp/public); its storage URL never reaches a browser; admin gets a 15-minute HMAC-signed URL (`/api/files/signature/:id?exp=…&sig=…`) that the route checks before streaming. Uploads are checked by their first bytes. No health data in logs, analytics, dataLayer events or CSVs.
- **Spam:** an invisible honeypot field (unique id per form, tabindex -1, autocomplete off) and a 2.5 s minimum fill time on the booking, coverage and Smile Plan forms; caught submissions are stored as spam, never notify, never take a slot (no locks), and show under a "Spam" filter in Requests.
- **Attribution:** on first visit store utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, landing page and referrer in localStorage (newer gclid/UTM replaces) and send them with every booking, coverage check and Smile Plan sign-up. GTM loads only on public marketing pages (not /forms, /booked or /admin) and only when an ID is set.
- **Working contact links:** tel:+19705550148, sms:+19705550148 (prefilled texts use the `sms:+1…?&body=` form that works on iOS and Android), mailto:, and the Google Maps directions link, all from the Business row.
- **Recall:** each patient has a recall type and interval (cleaning 6 months, gum care 3 months, kids 6 months) and a due date = last cleaning + interval; completing a cleaning (status done) moves the due date forward; a future booked cleaning shows the recall as "Booked <date>". Each recall has a token for the reminder link.
## Data model (Prisma, SQLite; string fields for enum-like values validated with Zod)
Business (id, name, phone, smsPhone, email, street, suite, city, state, zip, lat, lng, foundedYear, ownerName, timezone, currency, locale, leadTimeMin, emergencyLeadMin, windowDays, slotStepMin, bufferMin, cancelNoticeHours, emergencyNote, emergencyStripOn, emergencyStripText, emergencyLinkLabel, offerOn, offerTitle, offerPriceCents, offerRegularCents, offerIncludes JSON, offerTerms, offerCode, offerIsDemo, financingUrl, financingLabel, financingText, insuranceIntro, medicaidNote, parkingNote, accessNote, busNote, gtmId, adsConversionId, adsConversionLabel, canonicalDomain, googleReviewUrl, instagramUrl, facebookUrl, notifyEmail, notifyPhone, alertsFrom, reminderTemplate, demoMode, ownerPasswordChanged, fileSigningSecret) · Hours (weekday, opens, closes, lunchStart, lunchEnd, closed) · Chair (id, name, sortOrder) · Provider (id, name, shortName, kind [dentist|hygienist], credential, role, years, bio, quote, languages JSON, photoUrl, isSample, color, chairId, active, sortOrder) · ProviderHours (providerId, weekday, start, end) · HoldTemplate (providerId, weekday, start, end, kind [emergency]) · HoldRelease (providerId, day, start) · ChairBlock (id, chairId, startsAt, endsAt, reason, isDemo) · VisitType (id, key, label, durationMin, newPatientDurationMin, providerIds JSON, color, sortOrder, active) · Service (id, slug, name, icon, shortDesc, body, included JSON, steps JSON, priceLines JSON, insuranceLine, coveredChip, visitTypeKey, imageUrl, isSample, active, sortOrder) · Faq (id, question, answer, serviceId?, sortOrder, hidden) · InsurancePlan (id, name, note, sortOrder, isSample) · Patient (id, firstName, lastName, dob (a "YYYY-MM-DD" string), phone, email, street, city, zip, carrier, subscriberName, relationship, memberId, preferredLanguage, emergencyName, emergencyPhone, alerts JSON, recallType, recallIntervalMonths, recallDueDay, recallToken unique, lastVisitDay, remindersSent, lastRemindedAt, lastReminderChannel, familyId, notes, createdAt, isDemo) · Appointment (id, ref unique, token unique, formsToken unique, patientId, providerId, chairId, visitTypeId, isNewPatient, startsAt, endsAt, busyUntil, status [requested|booked|confirmed|arrived|in_chair|done|canceled|declined], noShow, statusTimes JSON, source, note, offerCode, declineReason, cancelReason, utm*, gclid, landingPage, referrer, isSpam, createdAt, updatedAt, isDemo) · SlotLock (id, appointmentId, providerId, chairId, blockStart; @@unique([providerId, blockStart]); @@unique([chairId, blockStart])) · IntakeForm (id, appointmentId, patientId, status [not_started|in_progress|complete], about JSON, medical JSON, meds JSON, allergies JSON, dental JSON, consent JSON, signatureFileId, signatureName, signedAt, updatedAt, isDemo) · CoverageCheck (id, name, phone, email, carrier, planOrEmployer, memberDob, question, status [new|checking|replied], notes, source, utm*, isSpam, createdAt, isDemo) · PlanTier (id, name, monthlyCents, yearlyCents, kidMonthlyCents, kidYearlyCents, benefits JSON, chip, sortOrder) · Member (id, patientId, tierId, billing, familyJson, startedAt, renewsAt, status, cleaningsUsed, stripeSessionId, isDemo) · Review (id, author, visitLabel, providerName, rating, text, topics JSON, ownerReply, source, date, isDemo) · GalleryPair (id, title, duration, line, providerName, beforeUrl, afterUrl, isSample, sortOrder) · OfficePhoto (id, url, caption, isSample, sortOrder) · ContentBlock (key, valueJson, hidden) · Counter (key, value) · NotificationLog (id, kind, appointmentId?, patientId?, coverageCheckId?, memberId?, channel, to, status, error, at) · Event (id, appointmentId?, patientId?, type, data JSON, at, isDemo) · Note (id, patientId?, appointmentId?, text, at, isDemo) · DemoState (id, seededDay) · Better Auth tables for the owner.
## Seed data (all fictional; dates relative to "now" in America/Denver, all isDemo)
- Business, hours, 5 chairs, 5 providers with working hours and emergency holds, 7 visit types, 9 services with the copy and prices above (3 FAQs each), 8 home FAQs, 12 insurance plans, 2 Smile Plan tiers, offer on ($129, usually $385, code NEWPT129), emergency strip on.
- **Patients** (48; mobiles (970) 555-0100 to 0199, emails @example.com, fictional Fort Collins streets like "418 Whitcomb Bend" or "2207 Prairie Sage Ct", dates of birth from kids to retirees), carriers spread across the plan list with 7 uninsured (4 of them Smile Plan members), two families (the Park family: Ken, Mina and kids Leo 8 and Ava 5; the Alvarez family: Maria and her son Diego 10), medical alerts on 6 (latex allergy, blood thinner, artificial knee, penicillin allergy, diabetes, anxious patient), recall types (most cleaning 6 months, 5 gum care 3 months, kids 6 months). Past visit history over the last 14 months (about 160 done appointments with notes), so every patient has a believable last visit.
- **Today's schedule** (shifted every day with the demo; keep these seeded statuses whatever the time of day the demo is opened; 22 visits):
- Op 1 · Dr. Okafor: 7:30–9:00 Crown prep, lower left molar (Ken Park, done) · 9:15–10:15 Implant consult (Robert Hale, in chair; alert "Blood thinner") · 10:30–11:15 Emergency hold · 11:30–12:00 Filling, one tooth (Sofia Lindgren, arrived) · 1:00–2:15 Root canal, upper molar (Greg Tan, confirmed) · 2:30–3:15 Emergency hold, holding the web request below · 3:30–4:00 Crown seat (Paula Brandt, booked).
- Op 2 · Dr. Whitaker: 8:00–8:45 Clear aligner consult (Hannah Cole, done) · 9:00–9:30 Whitening consult (Derek Moss, booked, no-show flag on) · 10:00–10:45 Aligner check-in (Lucy Ward, in chair) · 11:00–11:45 Filling, two teeth (Sam Ortiz, confirmed) · 1:00–2:15 Crown prep (Irene Fox, confirmed) · 3:00–3:30 Whitening trays fitting (Nora Byrne, booked).
- Op 3 · Dr. Sato: 8:00–8:45 Kids' visit (Leo Park, done) · 8:45–9:30 Kids' visit (Ava Park, done) · 9:45–10:30 Sealants (Diego Alvarez, arrived) · 10:45–11:30 Kids' first visit (Milo Grant, age 1, confirmed) · 1:30–2:15 Kids' cleaning (June Hart, booked).
- Hygiene 1 · Jess Moreno: 7:00–8:00 Cleaning and exam (Ellen Shaw, done) · 8:00–9:00 Cleaning and exam (Mina Park, done) · 9:15–10:45 New-patient visit (Tom Becker, in chair; forms complete) · 11:00–12:00 Gum care (Walt Ames, arrived; alert "Artificial knee") · 1:00–2:00 Cleaning and exam (Rita Gomez, confirmed) · 2:30–4:00 New-patient visit (Chloe Reyes, booked; forms not started).
- Hygiene 2 · Tara Hughes: 7:30–8:30 Gum care (Frank Doyle, done) · 8:45–9:45 Cleaning and exam (Amy Lund, done) · 10:00–11:00 Cleaning and exam (Victor Huang, confirmed) · 1:00–2:00 Cleaning and exam (Beth Kim, booked) · 2:15–3:15 Gum care (Carl Weiss, booked).
- **Requests waiting** (3, status requested, with locks): (1) Maria Alvarez, new patient (her first visit; Diego is already a patient), "Cleaning and exam", tomorrow 8:15 AM with Jess Moreno, Delta Dental PPO, offer code none, requested 40 min ago from "hero", forms complete and signed (latex allergy, takes no medications, last visit "1–2 years", nervous 4 of 5, comfort: headphones and numbing gel first; a seeded sample signature drawn as a simple script-like path PNG); (2) Chris Novak, new patient, "Toothache or emergency", today 2:30 PM with Dr. Okafor in the emergency hold, Cigna Dental PPO, requested 12 min ago, note "Lower left back tooth, since last night, hurts to chew", forms not started; (3) Hannah Cole (returning; she had her aligner consult this morning), "Clear aligner consult" follow-up, next Tuesday 4:00 PM with Dr. Whitaker, MetLife PDP, requested 3 hours ago, forms not needed.
- **The next 14 days**: about 35% of hygiene time and 35% of dentist time booked with confirmed or booked visits, so the picker has real gaps and real taken times. Guarantee that on EVERY open weekday of the next 14 days each hygienist has at least two open 90-minute new-patient windows (one morning, one afternoon) and at least three open 60-minute windows, and each dentist has at least three open 45-minute windows plus the emergency holds. The next open weekday is busy but has openings. Keep every patient's recall consistent with their seeded future cleanings. Prove it with a small script that prints, for the next 14 days, the number of open start times per provider for a new-patient cleaning, a returning cleaning and an emergency.
- **Recall**: 9 patients overdue (5 to 60 days), 11 due in the next 30 days, 3 already reminded (1–2 reminders, last by text or email, 3–10 days ago), 4 booked.
- **Coverage checks**: 3 (one new today at 9:12 AM "Does my plan cover a crown? Aetna through my employer", one checking, one replied).
- **Smile Plan members**: 9 (6 Essentials incl. one family of three, 3 Gum Care; 2 renewing within 30 days, 1 pending payment).
- **Reviews** (16, Google, isDemo, 15 five-star and 1 four-star, dated 4 to 220 days ago), each naming the visit and often the provider, plain voice: e.g. Maria S. (Cleaning and exam, 5★, 9 days ago): "First cleaning in three years and I was dreading it. Jess was so gentle and never once made me feel bad about it. They had my insurance sorted before I showed up." · Greg T. (Emergency visit, 5★): "Cracked a molar on a Saturday, called Monday at 8 and was in the chair by 10:30. Dr. Okafor showed me the X-ray and gave me two options with prices." Owner reply "Thanks Greg. Glad you're chewing on both sides again." · Lena P. (Kids' dentistry, 5★): "Dr. Sato let my four-year-old count her teeth with the mirror. She asked when we're going back." · Mark D. (Crowns, 4★): "Great work on my crown. Waited about 15 minutes past my time, but they told me why." Owner reply "Thanks Mark. We're keeping a closer eye on the morning schedule." Write the other twelve in the same voice, covering aligners, whitening, implants, root canal comfort, Smile Plan, Spanish-speaking care with Jess, evening hours and the forms being easy. Give each 1–3 topics.
- **Appointment references**: "LF-" + 4 digits from a Counter row. Seeded appointments use LF-1001 upward; after seeding set the counter so the first real booking is LF-3001.
- **Feedback, NotificationLog, Members' Stripe sessions**: none (don't seed fake notification results).
## Images (generate them, AI people only)
Write one script (backend/scripts/generate-images.ts) that generates every image with `gpt-image-2.5-flare` through the project's proxied OPENAI_API_KEY at https://api.openai.com/v1/images/generations (quality "high", 1536x1024 unless noted), four at a time, skipping files that already exist, converting to JPEG (quality 82, max 1600px wide) with sharp into webapp/public/images/. Start it in the background as soon as the schema exists and keep building while it runs; until a file exists the UI shows a lagoon-50 box with the Sample chip. Style for all: photorealistic, soft natural daylight, a modern small dental office in Colorado (white walls, light oak, sage and lagoon-green accents, big windows with distant foothills), calm and uncluttered, no text, no logos except where stated, no watermarks, faces natural, no surgical gore, no blood.
- hero/hygienist-patient.jpg (1600x1000): a hygienist in lagoon-green scrubs sitting beside a relaxed adult patient in a modern dental chair, both smiling and talking before the cleaning, window light, foothills outside.
- office/reception.jpg, office/treatment-room.jpg (an empty operatory with a window view), office/kids-corner.jpg (a small play nook with books and a low bench), office/exterior.jpg (a single-storey brick and wood medical building with a small "LARKSPUR FAMILY DENTAL" sign in dark letters, a parking lot, blue sky, foothills far away).
- team/<name>.jpg (5, 1024x1280 portraits, lagoon-green scrubs or a white coat over scrubs, neutral office background, friendly): Dr. Nadia Okafor (Black woman, mid 40s, short natural hair), Dr. Ben Whitaker (white man, late 30s, short beard), Dr. Elena Sato (Japanese-American woman, early 30s), Jess Moreno (Latina woman, late 20s, hair in a bun), Tara Hughes (white woman, mid 50s, short grey hair, glasses).
- services/<slug>.jpg (9; mostly hands and objects, no open mouths): a gloved hand holding a mirror and polishing tool over a neat tray; a shade guide beside tooth-coloured filling material; a porcelain crown on a gloved fingertip; a dentist pointing at a tooth X-ray on a monitor; an implant model with a crown on a tray; a clear aligner in an open case on a desk; whitening trays and a small syringe on a white counter; a child's toothbrush and a stuffed bear on a small dental chair; a dentist and patient looking at an intraoral photo on a screen.
- gallery/<n>-before.jpg and gallery/<n>-after.jpg (6 pairs, 1024x768, close-up smiles showing only lips and teeth, same framing and lighting in each pair): yellowed teeth / whitened; crowded lower front teeth / straight; a broken molar edge / a porcelain crown; a chipped front tooth / repaired; a gap from a missing tooth / an implant crown; a dark old metal filling / a tooth-coloured filling.
- og.jpg (1200x630): compose with sharp: the hero photo with an ink overlay on the left half, the logo mark and "Larkspur Family Dental / Gentle dental care in Fort Collins" in white Newsreader-style bold type. Use it as og:image and twitter:image.
- A sample signature for the seeded request: draw a simple cursive-like stroke path into a transparent 600x160 PNG with sharp/SVG (no image model).
## Local SEO
- index.html: title "Larkspur Family Dental | Dentist in Fort Collins, CO", a matching description, Open Graph and Twitter tags, theme-color #1B2A2F, the new favicons.
- Each public route sets its own title, description and absolute canonical (canonical domain from Settings, else window.location.origin) and injects Dentist JSON-LD from the live Business facts (name, telephone, email, url, image, priceRange "$$", full address, geo, openingHoursSpecification, availableService list with prices, isAcceptingNewPatients true; no aggregateRating while reviews are demo). /forms, /booked and /admin are noindex.
- Prerender for crawlers: a small Vite plugin (closeBundle) writes dist/<route>/index.html for /, /services/<slug>, /insurance, /smile-plan, /new-patients and /privacy with that route's title, meta, JSON-LD and a plain semantic HTML snapshot of the main text inside #root (React replaces it on load), reading the same seed data module the backend seeds from. It also writes dist/sitemap.xml, dist/robots.txt and dist/llms.txt (practice facts, services with prices, insurance list, Smile Plan, hours, contact, FAQ). Static files use absolute URLs only (canonical domain from the backend at build time, else VITE_SITE_URL); when no domain is known, leave the canonical tag and the robots Sitemap line out. Server-built absolute URLs always use https:// except on localhost. Also serve live versions at /api/seo/llms.txt and /api/seo/sitemap.xml.
## Motion, states, accessibility
- Framer Motion, subtle and calm: sections fade up 12px once in view (400ms), cards stagger 60ms, header shadow on scroll, accordion height animation, booking steps slide 24px with a fade, the offer card scales in from the tab, schedule blocks animate to their new slot on drop (layout animation), status chips cross-fade, the bottom bar slides up on load. Respect prefers-reduced-motion. No parallax, no bouncing.
- Loading: skeletons for times, reviews, the schedule, requests and admin tables. Errors: friendly inline messages with the phone number on public pages ("We couldn't send that. Your details are still here. Try again or call (970) 555-0148."; form values kept, a draft of the booking details in localStorage, never the health answers), toasts in admin. Empty states with a next step ("No requests right now. New online bookings show up here.", "Nobody is overdue. Nice work.", "No visits on this day. Click an empty slot to add one.").
- Labels on every input, visible lagoon focus rings (white on ink), 44px touch targets, alt text on every image, lazy-loaded images except the hero, the before/after slider and signature pad usable by keyboard (the signature pad offers the typed name as an accessible alternative signature).
## README
Write README.md for the practice owner: what's in the template, the demo office login, how to replace the practice facts, photos, team, prices, insurance list and offer, how booking rules and emergency holds work, how notifications and recall reminders send (Resend domain, Twilio keys) and what "demo send" means, how to connect Stripe for the Smile Plan, and the demo data refresh. Include a section titled "Before you use this with real patients (HIPAA)" that says plainly: dental practices in the US are covered by HIPAA; before real patients enter health information here you need a signed business associate agreement (BAA) with every company that stores or sends it for you (hosting and database, file storage, email and text providers, and any form or payment tools), or keep health information out of this app and collect intake forms in your practice software instead; this template is not HIPAA compliant out of the box, and neither the site nor this README claims it is.
## Build order (small files)
Build it in small source files (one component per file, no file over ~250 lines), in this order, and get each step running before the next:
1. Prisma schema, seed modules (backend/src/seed/*.ts), auto-seed on empty DB, the demo date shift (startup + hourly, with SlotLocks) and DemoState; Better Auth with the seeded owner, sign-up disabled and session IP/UA blanking; authSecret. Start the image script in the background.
2. The time helpers and the availability engine, then the booking transaction with SlotLocks; run the double-booking script (one 201, one 409).
3. Public API (/api/public/site returns everything the home page needs in one request; GET /api/availability?visitType&provider&patient&from&days; POST /api/appointments; GET /api/booked/:token and cancel; GET/PUT /api/forms/:token per step, POST signature + submit; POST /api/coverage; POST /api/smile-plan/join; /api/recall/:token prefill) and the notification pipeline. Admin API (schedule by day, move, status, no-show, requests approve/reschedule/decline, patients, recall send and batch send, coverage, members, content, export CSVs, settings, checklist). Test every route with curl against $BACKEND_URL.
4. Theme tokens, fonts, logo, layout (demo bar, utility row, header, emergency strip, phone bottom bar, offer tab, footer).
5. Home sections in order (each its own file under src/components/home/), the booking card and /book, /booked, attribution and GTM.
6. /forms/:token with the signature pad, /services/:slug, /insurance, /smile-plan and welcome, /new-patients, /privacy, 404.
7. Admin: login, layout, the schedule with drag and drop (@dnd-kit) and the side sheet with check-in status and intake view, phone chair mode, Requests, Patients and patient page, Recall with one-tap and batch reminders and the log, Coverage checks, Smile Plan, Content, Notifications, Export, Settings with test booking, Publish checklist.
8. SEO plugin, favicon, OG image and README.
9. Run everything, then test in a browser at 1440px and 390px: book a new-patient cleaning from the hero (check the time you took disappears from the picker for the next visitor), fill in all five form steps and sign, see it in Requests with the intake attached, approve it, find it on the schedule and drag it to another time and chair and reload to see it stayed, step a visit through Confirmed → Arrived → In chair → Done and flag a no-show, book an emergency into a hold, send one recall reminder and a batch of three and see them in the log, send a coverage check and see it in admin, switch the emergency strip off and on from Content and see the site change, edit a service price and the offer price and see them on the home page, join the Smile Plan (demo), download every CSV, and check tel:/sms: links. Fix every error and console warning.
10. Clean up before you finish: delete every record you created while testing (appointments, their locks, intake forms and signatures, patients you created, coverage checks, members, events, notes, notification logs) and put back every seeded row you changed to its seeded state (statuses, no-show flags, times, chairs, recall dates and reminder counts, emergency strip on, offer and prices as seeded), reset the counter so the next booking is LF-3001, and delete every Session and Verification row. The admin must show exactly the seeded data. Make sure backend/prisma/dev.db is tracked in git (`git check-ignore backend/prisma/dev.db` prints nothing), run `PRAGMA wal_checkpoint(TRUNCATE); VACUUM;` on it, and check dev.db-wal is 0 bytes. Don't sign in again afterwards. Delete the refs/ folder and any other downloaded reference screenshot: other companies' screenshots must not ship with the site.
Build it fully, run it, and fix every error. Deliver the complete app, not a plan.
More templates
All templates- View template

Hollis & Daughter Plumbing
WebA plumbing company site with upfront prices and emergency booking, plus estimates customers sign online.
- View template

Keel
iOSA pocket CRM for insurance agents: follow-ups due today, renewals in the next 30 days and one-tap calls.
- View template

Copperline Heating & Air
WebAn HVAC company site that books visits by the half-day, with a drag-and-drop dispatch board and a tech app.
- View template

Nelson CRM
WebA CRM site in surreal collage: clouds torn like paper, marble statues, starry skies and an electric blue UI