* fix(copy): contact mail goes to a mailbox that exists
hello@ and support@petvity.com sat on the footer, every legal page, the
structured data and every email template. petvity.com is not ours (it is a
Netlify site with Zoho MX; lib/config/email.ts already lists it as "not
ours"), so privacy and support mail went to a stranger. APP.email is now
cato@orangecat.ch, the one address on the receiving apex, and supportEmail
is folded into it. lib/config/app.test.ts fails if it leaves the apex.
The pet-edit form also showed "petvity.com/pets/" as the share prefix; it
now derives the host from APP_URL.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(copy): privacy and cookie policies describe the running system
Privacy: Neon was decommissioned in 2026-06 (the database is PostgreSQL on
the same Hetzner box, listening on 127.0.0.1 only), Google sign-in is not
configured in production while OrangeCat sign-in is, groomers and guest
checkout were missing, and "database connections use TLS" did not hold for
a localhost connection.
Cookies: Auth.js v5 sets authjs.* cookies, not next-auth.*, plus PKCE/state
cookies during OrangeCat sign-in; NEXT_LOCALE is a session cookie set on any
locale page, not a one-year cookie set only by the switcher.
Effective dates moved to October 2, 2026.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(copy): marketing pages say only what the product does, in all 9 languages
- pricing: Pro and Clinic cards cut. Their buttons were href="#", neither
plan is on ROADMAP.md, yet the FAQ called them "next".
- pros: cut vets reading clients' health history and sitters logging health
during stays (records are owner-scoped; "Vet-facing records" is 0% on the
roadmap), the unmeasured "growing community" card, and a sitter card that
repeated its heading. Reviews tie to completed bookings, not confirmed ones.
- features: no refill tracking exists; charts span 30 days, not months; the
twin is not built from 30 days on the dashboard (7); unverified pros are
listed; cross-border adoption and "any language" were not true; handle host
is the live one; groomers added.
- about: the "Behind the project" section was empty in 4 locales and claimed
"a team of software engineers" in 5; cut.
- ar/ja/ko/tr/zh: the features, pricing, pros and about pages carried an
older, differently ordered copy (stats swapped, "data export coming soon",
"VitaReba"); retranslated from the current English.
- CHANGELOG: removed "health metrics that matter per species" (the
observations config is not wired into any screen) and the Stripe claim;
added 2026-10-02. ROADMAP: OrangeCat sign-in shipped, Google item dropped.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(copy): close the gaps the verifier found, in all 9 languages
- Cookie policy names both ways NEXT_LOCALE is set: a session cookie per
page, one year when picked with the language switcher.
- Privacy policy lists the Loki feedback widget as a service provider.
- /pros no longer says owners share pet records or Digital Twin data with
vets and sitters (a booking shows them only the pet's name): rewrote
metaDesc, heroDesc, vet/sitter hero copy; cut vb1 ("months of structured
health history"); dropped 72 unrendered pros keys that still shipped the
same claims in every page's message payload.
- Cut unmeasured timings: home heroSub ("30-second check-in"),
benefitTrackDesc ("in 30 seconds"), "set up in minutes", "a few minutes".
- Species guide CTA: a record to show your vet, not one shared with them.
- ROADMAP/CHANGELOG: email+password sign-up still works for new users;
changelog line lists what was cut instead of claiming all copy is true.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* fix(copy): privacy names what an OrangeCat sign-in stores; drop a dead features key
- Privacy, "Data we collect": an OrangeCat sign-in also stores the name and
profile picture from the OrangeCat account (accountkit's orangecatProfile
maps name and picture onto users.name and users.image), not only the id.
- features.heroSubtitle is rendered nowhere but still shipped in every page's
message payload, carrying "cross-border adoption" and "in any language" —
both cut elsewhere in this PR. Removed from all nine locales.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The fleet's building-in-public contract puts each product's record in its
own repository as two markdown files and renders it through Loki's fleet map
via bip-kit. Petvity had neither the files nor the pages.
- ROADMAP.md: Now / Next / Later / Shipped, derived from the phases in
AGENTS.md and the merged history. Planned work is written as plans.
- CHANGELOG.md: Keep-a-Changelog dialect, user-facing, newest first, from
merged PRs; today's homepage rewrite is the top entry.
- /[locale]/roadmap and /[locale]/changelog render bip-kit's DevelopmentPage
inside the marketing nav/footer; the records are English by contract, the
chrome and metadata stay localized (keys in all 9 locales, footer links).
- lib/config/development.ts is the SSOT for the map URL, slug and profile;
lib/development/records.ts fetches with revalidate 300 and an 8s ceiling.
- The --bp-* theme scope already mapped for the blog (.pv-longform) covers
the records; the page title and record name take the editorial faces.
- Vitest covers the data path with a fleet-map fixture, no network.
- Sitemap lists both pages.
Verified at 390px in de/en/ar: no horizontal overflow.
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
Co-authored-by: Claude <noreply@anthropic.com>
Owner feedback: far too much text; visitors should look and act.
- Hero: short headline + one sub-line + HeroCTA (sign up / demo), CTA above
the fold at 320-390px
- Three one-line benefit tiles, one compact check-in mock
- 'Free, forever' with three checks and a final CTA
- Removed species strip, feature essays, digital-twin and signal sections,
ecosystem cards, live proof, how-it-works and the 9-item pricing list
- New keys in all 9 locales; unused home keys dropped
- .btn-editorial-wrap lets long localized CTAs wrap on 320px
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
Co-authored-by: Claude <noreply@anthropic.com>
The About page said, in English and seven translations:
"We also build VitaReBa — a clinic management portal for rehabilitation
therapists"
Both halves are wrong about someone else's product.
VitaReBa was retired as a product name on 2026-09-11. And the description does
not match what it is: its own live title reads "Vita · Metabolische Psychiatrie
& Systemische Longevity · Zürich", and its own meta description "Klinik in
Zürich für metabolische Psychiatrie und systemische Longevity". It is a clinic,
not a management portal, and metabolic psychiatry, not rehabilitation therapy.
So this was not a stale name beside a true sentence; the sentence was untrue,
published, and translated eight times.
The replacement is that product's OWN words rendered in each language, not new
copy invented here — "a Zürich clinic for metabolic psychiatry and systemic
longevity". Nothing else in the paragraph changed.
Verified: every messages/*.json updated, and no message file mentions the
retired name any more.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The public storefront was a brochure. It shipped a Product/Offer JSON-LD so
search engines treat it as purchasable, then the only buy path was
"Sign up to buy" -> /register?returnTo=/portal/shop, which both forced
registration before a first purchase and dropped the product the visitor came
for. Cold traffic could not buy anything.
A visitor can now add to cart on the catalogue and the product page, check out
in one page with an email and an address, and read their order back from a
receipt link. No account anywhere in that path.
orders.userId becomes nullable, alongside guestEmail and an unguessable
publicToken. A CHECK constraint enforces exactly one of userId / guestEmail,
because an order with no reachable buyer cannot be repaired after the fact.
The token is the guest's only handle on their order: it is emailed, never
listed, and authorises resuming payment and cancelling while pending.
Order placement moves to placeOrder() in lib/domain/orders.ts so the authed
cart and the guest checkout share one implementation -- the stock reservation
and its compensation must not exist twice. setOrderStatus() joins it for the
same reason: a cancellation that forgot to restore stock destroys inventory,
and that happens when one route remembers and another does not.
Two joins were fixed before any UI existed. app/api/orders/seller and
app/api/admin/orders inner-joined users on orders.userId; with a nullable
column that drops every guest order from the views of the people who have to
ship them -- real revenue, invisible, nothing appearing broken. Both are now
leftJoin + COALESCE onto the address the buyer typed.
Also fixed while reviewing:
- toLocale() used `value in LOCALE_CONFIG`, true for inherited keys like
"constructor", and the result goes straight into a URL path.
- orderShippingSchema accepted any two letters as a country, so "XX" could be
stored and printed on an undeliverable label. Checked against a new ISO-3166
SSOT whose names come from Intl.DisplayNames, so all nine locales are
translated with no message files to maintain.
- Guest input (shippingName, notes) reaches a seller's inbox unauthenticated;
email templates now escape it.
Guards, not just fixes: locale parity across all nine message files is now a
test rather than a convention, and the prod walkthrough places a real guest
order and asserts the seller can see the buyer's email -- the check that goes
red if anyone reintroduces an inner join there.
The public endpoints are deliberately outside PRIVATE_API_PREFIXES; a session
guard there would silently delete the feature. They are rate limited per
client, and the payment and cancel routes require the order token.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Publishing meant editing a TypeScript array in lib/content/blog.ts, opening a
PR, and waiting for a deploy. That is not a blog anyone will actually write in —
and it made every post a developer task. There was exactly one post.
Posts now live in the database, written and published at /admin/blog. A post
goes live the moment it is published; nothing is rebuilt or redeployed.
Authoring markup is a deliberately tiny subset of Markdown:
## Subheading
- bullet
anything else is a paragraph
No Markdown dependency. A full parser would buy inline HTML we would then have
to sanitise — an XSS surface in exchange for syntax nobody asked for. Parsing
to the closed block set the post page already styles means untrusted text can
never become markup, which a test pins with a <script> tag rendering as literal
text. The editor previews the parsed blocks live, so a mistyped bullet is
visible before publishing rather than after.
Body is stored as written and parsed at render, so the author's source stays
the single truth and the renderer can improve without a data migration.
Publish dates are stamped once, on the first publish, and preserved after that.
Unpublishing to fix a typo and publishing again must not silently re-date the
post and reshuffle the index — tested in both directions.
Drafts 404 publicly rather than merely being unlisted, so guessing a slug does
not reveal unpublished writing.
The migration carries the existing post across. Its URL
(/[locale]/blog/a-platform-for-both-sides-of-pet-care) is already public, so
losing the row would 404 an indexed page; the insert is dollar-quoted for the
apostrophes and ON CONFLICT DO NOTHING so it is safe to re-run.
Deleting is a two-step inline confirm rather than a confirm() dialog: deleting a
published post breaks its URL, and a browser dialog is both easy to click
through and impossible to drive from a test.
Both public pages are force-dynamic — content that an editor changes must not be
frozen into the build.
The walkthrough now fetches a real post and asserts its prose, which exercises
the table, the content migration and the renderer together. It fetches the body
itself rather than reading $LAST_BODY, which page() never sets — asserting on it
would have grepped whatever the previous request happened to leave behind.
27 new tests; pnpm verify green (678 tests / 75 files).
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Browsing offered one control — a category pill. Any shopper who knew what they
wanted had to eyeball the grid for it, and there was no way to see the cheapest
option first. That is fine for six products and useless at sixty.
Public storefront (/[locale]/shop) does it server-side, as a plain GET form with
sort as links. Results are therefore a shareable, indexable URL and work with
JavaScript disabled — a storefront that only works with JS is a storefront
Google browses badly. Search matches name OR description, so someone searching
"harness" finds one whose name is a brand they don't know.
Portal shop filters in memory: the whole catalogue is already loaded there, so
round-tripping to the API to filter it would be slower and no more correct.
Results narrow as you type.
Filters compose rather than clobber. Searching and then picking a category
keeps the search — each control rewrites only its own parameter, so no
combination silently discards another. A search that finds nothing offers a way
back to the full catalogue instead of the sign-up prompt, which is the wrong
answer to "no results".
Sort ids are SSOT in lib/config/products.ts. They appear in the URL, so they
are part of the page's public contract — shared links and search engines keep
them; add ids, don't rename them. `?sort=` is attacker-controlled and indexes
an ORDER BY map, so it is narrowed to a known value before use, covered by
tests including __proto__ and constructor.
`newest` is the default and is omitted from the URL, so the canonical
/en/shop stays a clean URL rather than gaining a redundant query string.
13 tests on the config; pnpm verify green (638 tests / 72 files).
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Listing a product required pasting an image URL, which quietly assumed the
seller already hosted the picture somewhere. Everyone who sells has photos on
their phone; nobody has a CDN. That single field is why a real listing could
not be created without leaving the product first — and prod currently has zero
products.
Both product forms (seller's /portal/my-products and /admin/products) now take
a file: pick, preview, replace, remove.
The upload endpoint is deliberately not scoped to a product id. The seller
chooses the photo while filling in the "new product" form, before a row exists;
scoping it would force create-then-upload and leave a product visibly imageless
whenever the second call failed. It returns a URL the form submits as imageUrl,
so create and edit take the identical path.
Files land in UPLOADS_DIR (/opt/petvity/uploads on the box, outside the app
directory so they survive deploys) and Caddy serves them from /uploads/*.
Also fixes a drift this would have made worse: the upload limits lived inline
in the avatar route, and its file picker offered JPEG/PNG/WebP while the API
also accepted GIF — so a GIF was rejectable by the UI and acceptable to the
API. Limits are now SSOT in lib/config/uploads.ts, used by both routes, both
pickers and the hint text, so they cannot disagree again.
/api/uploads is added to PRIVATE_API_PREFIXES — it writes files to disk and
must never be reachable without a session.
8 tests cover the endpoint: stores and returns the URL, keys uploads by
uploader, refuses anonymous callers, no file, over-cap, exactly-at-cap,
non-image type, and a storage failure reported instead of a fake success. The
size gate needed real bytes — FormData rebuilds the File from its content, so a
patched `size` property is discarded in transit and the gate would never fire.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The header sweep missed the nested pages. Check-in, add-pet, edit-pet, health
and health-log still hand-rolled their own <h1>, and had drifted apart exactly
the way the sweep was meant to stop: font-bold vs font-semibold, mb-1 vs mb-2
vs mb-6, three spellings of the same back link. Two of them never said what
they were for at all.
All five now use PageHeader. Add-pet and health-log already had a subtitle, so
those are structural only; check-in, edit-pet and health needed a purpose line,
added in all nine locales.
The dashboard read "All 1 pets checked in today" for anyone with one pet — the
common case for a new owner, and the first sentence the demo shows. The string
had no plural form. Now pluralised via ICU for the six languages with
grammatical number; ja/zh/ko keep a single form, which is how every other count
string in those files is already written.
While fixing it, the same sentence turned out to exist twice — checkinAllDone /
checkinProgress on the check-in page and allCheckedIn / partialCheckedIn on the
dashboard, identical in meaning and already drifted in wording ("{done} /
{total}" vs "{done} of {total}"). Fixing the plural in one would have left the
other wrong, so the pair is consolidated onto the better-worded one and the
duplicates are deleted from all nine locales.
Verified the ICU by parsing every message in every locale (13914 messages, 0
malformed) and by formatting allCheckedIn at n=1 and n=3 in all six pluralised
languages. The walkthrough now covers all five pages for both a title and a
purpose line, so "every page opens the same way" is checked rather than assumed.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
PR #34 introduced PageHeader but only nine pages used it. The other
eighteen hand-rolled their own heading markup, and the copies had drifted:
mb-8 vs mb-6, items-center vs items-start, and five variants of the same
back link (gap-1 vs gap-1.5, mb-1 vs mb-5 vs none) that all meant "go up
one level". Two admin pages skipped the heading classes entirely.
All of them now render <PageHeader>, which gains two things it needed to
absorb the stragglers:
- `back` — the "← Pet name" link above a title, now one .back-link class
instead of eighteen lines of duplicated utilities per page.
- `flush` — drops the bottom margin where the parent already spaces its
children. An `mb-0` utility from outside would not reliably win, because
Tailwind resolves same-property utilities by stylesheet order rather than
attribute order, so the choice is made inside the component.
Copy: two pages had no purpose line at all. /portal/pets showed a pet count
where a purpose belongs, and /portal/seller-profile explained itself only
while the store was new — an existing seller landed on an unexplained form.
Both now state what the page is for, in all nine locales. The dead petsCount
key is removed. Four admin pages traded vague labels ("Platform at a glance")
for sentences that say what you can do there.
Also splits .stat-value / .stat-label / .stat-caption out of .page-title.
Admin was styling numbers with the page-heading class, so restyling a page
title would have silently restyled every stat card. Tints are modifier
classes, not utilities — .stat-value is unlayered, so a text-[var(--teal)]
beside it would have been silently dead.
Verified: lint clean · tsc --noEmit exit 0 · css-vars ✓ · 1220/1220 tests
across 137 files · pnpm build succeeds.
The readiness checklist required `isAcceptingClients` before calling a profile
live, but the directory queries treat it as an optional filter — a professional
who was temporarily full appeared in search results while their own dashboard
told them they were invisible. The directory behaviour is the correct one: a
full pro is worth showing, badged as not accepting, so owners can find them and
come back. The checklist now matches, and the dead `readyStep_accepting` string
is removed from all nine locales.
The production walkthrough caught this: it created professionals with partial
profiles and asserted they were browsable, which the gate correctly refused.
It now completes each profile before expecting a listing, and — more usefully —
asserts the negative first: an incomplete vet must NOT appear in browse. That
turns the readiness gate itself into a permanent regression check rather than
something only asserted in unit tests.
135/135 checks pass against production.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The dashboard answered one question — how are my pets? — and left everything
else the platform does undiscovered behind the sidebar. It now also shows what
is already in motion (the next three appointments, the three most recent
orders) and a role-aware "what would you like to do?" grid: find care, shop,
adopt, and either offer your services or manage your bookings, either set up a
store or manage the one you have.
The greeting was computed from new Date().getHours() during a server render,
which is the box's UTC rather than the reader's clock — an evening visitor in
Zurich could be wished good afternoon. It is now clock-free, and the space it
occupied says what the page is for instead.
Page purpose lines, all nine locales. The worst of them was Find a Pro:
"Connect with verified veterinarians and trusted pet sitters" claimed a
verification most professionals do not have, and omitted groomers entirely
even though grooming has been a first-class vertical since #27. Six others
described what the page contained rather than what you could do on it.
PageHeader replaces the hand-rolled title/subtitle/action markup on bookings,
find, settings, shop and orders — one header instead of five near-copies.
Status badges now resolve to the semantic badge-* tones from globals.css
through a `badge` field on the status config, rather than a parallel set of
arbitrary-value Tailwind strings that happened to render the same colours.
Documented that the liveness probe is /api/healthz: /api/health is the private
prefix for health metrics and records, so it always redirects to /login and can
never report healthy — the runbook pointed at a path that could not work.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Three things made the marketplace a demo rather than a business.
1. Orders had no delivery address. A seller could receive an order and have
nowhere to send it. Orders now carry a required address (migration 0004,
additive); the API rejects an order without one, and both the seller and
admin order views expose it so fulfilment is actually possible.
2. The directory was populated by five invented businesses. Dr. Brunner,
Sam Keller, Nadia Roth, Pfoten & Co. and Tierheim Sonnenhof do not exist —
a customer in Zurich searching for a groomer would have found a fiction.
They are removed from lib/config/resident-pet.ts, and ensureCommunity is
gone from the resident-checkin cron so nothing recreates them.
3. Nothing replaced them. lib/domain/profile-readiness.ts is now the single
rule for when a professional or seller is real enough to be listed:
identity, services, price, location, a 40-character intro, contact, and
the pro's own "accepting clients" switch. The same predicate drives the
ProfileReadiness checklist the pro sees and the SQL conditions the public
directory queries use — so the listing is earned, never hand-curated.
Selling was already open to any account (products.sellerId = userId) but was
undiscoverable; /portal/become-a-pro now says so and links to the store setup,
which shows the seller's own readiness checklist including "list your first
product".
Also: deleting a pet was reachable only by guessing it lived inside the edit
form — the pet profile now links straight to the danger zone. Professionals
could not accept a booking from /portal/bookings, and groomers were missing
from the booking role union entirely.
E2E gains two checks: an order without an address must be rejected, and the
seller must be able to see where to ship.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The two-sided answer. 'How do I find a groomer in Zürich?' had no
logged-out answer — the directory lived behind auth. Now /find is a
public, SEO-indexed directory (vets/sitters/groomers tabs, city filter,
ItemList schema, review aggregates, links to public profiles) with a
provider CTA; the megamenu pros pillar and footer point at it.
'If I'm a groomer, how do I find customers?' — your profile IS your
storefront, and the new blog post documents the whole two-sided
proposition honestly (/blog, content SSOT in lib/content/blog.ts,
BlogPosting schema; no invented claims, resident accounts disclosed).
Portal navigation: six entries, no section labels needed — Care, Shop,
and Adopt are hubs whose sibling pages became segmented tabs (HubTabs;
same URLs). Seller/pro upsells moved out of daily nav into a Grow card
in Settings; active sellers get one 'My Store' entry.
Portal design vocabulary (the missing discipline): .page-title/.page-sub,
.badge + tones, .icon-tile(-lg), .modal-overlay/.modal-panel, .hub-tabs —
71 hand-built repetitions of these patterns replaced across portal+admin.
verify + build green; /find (incl. groomers/Zürich), blog, and post pages
render-verified locally.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Header: Platform ▾ · Pricing · ❤️ Adopt + locale/login/CTA. 'How it works'
(anchor), 'For Pros' (now a megamenu pillar), and the header demo link
(hero + login page still carry the demo funnel) are gone; Adopt no longer
appears twice. The megamenu is rebuilt from 9 fake-depth items (all
pointing at /features, hardcoded English) to 4 translated pillars that
link to their real surfaces — Health & Digital Twin, Vets/Sitters/
Groomers, Marketplace, Adoption — plus species guides driven by the
species SSOT instead of a duplicated hardcoded list.
Sidebar: ~10 flat links become four labelled groups (Care team /
Marketplace / Adoption / Your business) — same routes, half the scanning.
Footer: the three dead '#' links (Help Centre, Status, Community) are
gone; Company section (About, Live demo, Contact) replaces them; Shop and
Join-as-groomer added.
Homepage: hero subtitle and Find-a-Pro card repositioned from
health-tracker copy to the full platform (pros incl. groomers,
marketplace, adoption). All copy ×9 locales.
verify + build green; header/megamenu browser-verified.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
- Homepage: the invented testimonials ('Sarah M.', 'James T.', 'Amara O.'
with fake 5-star rows) are gone, replaced by a section that is TRUE and
verifiable in one click: Milo and Rosie's live public profiles, tracked
daily in the open
- Seller CTA no longer claims 'thousands of pet owners'
- Resident professionals (Dr. Brunner, Sam Keller, Nadia Roth) keep their
seeded profiles (per policy: profiles OK for testing) but lose the
unearned Verified badges and ALL fabricated bookings + 5-star reviews;
the cron no longer seeds reviews at all — ratings now only ever come
from real completed bookings
- Prod data surgery accompanies this deploy (fake reviews/bookings deleted,
residents de-verified)
verify + build green; homepage section browser-verified.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Groomer joins vet and sitter everywhere a professional exists:
- user_role enum + groomer_profiles (salon, services, from-price) + migration
- /api/groomers browse + /api/groomers/me CRUD; role plumbed through
registration (?role=groomer), become-a-pro, availability, bookings,
conflict guard, admin verification, dashboards, sidebar
- Find a Pro gains a Groomers tab; booking modal books grooming as a
one-hour session with the salon's from-price in the header
- Public pro profile renders groomers (salon, services, starting price)
- Resident groomer Nadia Roth / Salon Pfotenschick seeds via the daily
cron with a completed booking + 5-star review, so the tab ships alive
- 6 grooming services in the professionals SSOT; role badge tokens in
globals.css; ~25 strings x 9 locales
Verified end-to-end locally: register groomer -> profile -> visible in
browse -> booked 201 -> overlap 409. verify + build green.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* chore: nudge CI (pull_request event was never delivered)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat(ux): humane booking flow, self-serve pro upgrade, role-aware dashboard
Booking modal rebuilt around how people actually book:
- Sitter: drop-off/pick-up dates (no datetime-local minute-picking), live
'N nights × rate = total' before any commitment
- Vet: one date + tap-a-time-slot chips (1h appointments)
- Availability surfaced BEFORE submit: busy ranges fetched from the new
/api/bookings/busy (privacy-safe date ranges), clashing dates disable the
button with a plain-words warning instead of a post-submit 409
- One pet -> stated, not asked; request-not-final explainer under the CTA
True multi-tenancy path: existing owners can now become professionals —
/portal/become-a-pro (sidebar 'Offer your services') POSTs the new
/api/account/role (pet_owner -> vet/sitter only, trust-first like
registration), session refreshes in place via the update trigger.
Dashboard attention strip now spans every role: pending booking requests
(pros) and open orders (sellers) join adoption applications and vaccines.
24 new strings x 9 locales. verify green (1212 tests), build green,
modal + clash state + sidebar verified in the browser.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* feat(bookings,shop): calendar conflict blocking + Stripe payment integration
Tier-1 scheduling: the booking API now rejects (409) any request that
overlaps a professional's active bookings or their self-declared blocked
dates; vets/sitters manage blocked ranges at /portal/professional-profile
(new professional_blocked_dates table + /api/availability CRUD).
Payments: full Stripe Checkout flow, env-gated like Resend — without
STRIPE_SECRET_KEY nothing changes; with it, checkout redirects to Stripe,
the signed webhook (/api/payments/webhook) marks orders paid, and unpaid
orders stay payable from /portal/orders (Pay now + paid/awaiting badges).
orders gains paid_at + checkout_session_id.
Critical bug found by the smoke test: the login JWT callback wrote
resolveRole(email) back to the DB, silently DEMOTING every vet/sitter to
pet_owner at their next sign-in (residents were safe only because they
never log in). ADMIN_EMAILS now only promotes; professional roles survive.
Verified end-to-end locally: sitter registers → blocks dates → owner
booking overlap 409, blocked-dates 409, disjoint 201; checkout w/o keys
falls back to recorded orders. verify green (1209 tests incl. 12 new).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* chore: nudge CI (pull_request event was never delivered)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
- /api/healthz: public DB-pinging healthcheck. /api/health is the auth-gated
pet-data API, so deploys and uptime monitors had nothing honest to probe.
- /demo: signs a visitor into the shared demo account in one click; linked
from the marketing hero ('Try the live demo') and nav across all locales.
Also fixes two hardcoded English strings in HeroCTA.
- Demo seed claims the public handle /pets/luna (when free), so the
public-influencer-profile feature has a live showcase.
- New-pet grace: a profile younger than the 7-day alert window with no data
and nothing overdue reads healthy/'new profile' instead of an alarming
Watch badge seconds after creation. Overdue vaccinations still escalate.
- Digital-twin score is labeled 'Emotional wellness' (9 locales) so it stops
reading as a contradiction of the all-metric wellness % on the health page.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* fix(api): accept the form wire format on medical-history create routes
The portal forms serialize every empty optional input as null
(buildBody: `form.notes.trim() || null`), but the create schemas for
vaccinations, medications, and health records modeled optionals as
.optional() alone — which rejects null. Every save from the UI failed
with 400 'Invalid input', making the entire medical-history feature
set unusable in production. Unit tests stayed green because they
omitted the keys instead of sending null.
Schemas now use .nullish() for optional fields (the update routes were
already nullable-aware), and a new test posts the exact UI payload —
nulls included — against all three routes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(marketing): species guide pages no longer 500 in production
/[locale]/species/[id] was the only page declaring generateStaticParams,
but the locale layout's getMessages() needs request context — the static
prerender attempt threw DYNAMIC_SERVER_USAGE at runtime (500 in prod,
invisible in dev, where everything renders dynamically). Render it
dynamically like every other marketing page.
Also reskins the page to the editorial design system (cream/gold/serif),
matching the landing page.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(i18n): resolve 7 missing message keys and end the class with an audit test
The public adopt page rendered raw keys ('public.adoptFilterAll',
'public.adoptSearch', …) to users: its filter-bar labels live in the
portal namespace, and four more keys (adoptNoResults, adoptClearFilters,
adoptFree, portal.loading) existed in no locale at all. The page now
reads the shared filter labels from the portal namespace, and the four
genuinely missing keys are added to all 9 locales.
New test statically extracts every literal t("key") per translator
namespace and asserts it resolves in messages/en.json — tsc and eslint
are both blind to this class; this test is not (it found 4 of the 7).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(i18n): substitute {app} once at message-load time
47 message keys reference {app}; requiring each t() call site to pass
{ app: APP.name } shipped literal '{app}' into rendered copy on the
features page (heroDesc, ccDesc). next-intl v4 removed
defaultTranslationValues, so the request config now deep-replaces the
placeholder when messages load (memoized per locale). Call sites that
still pass the value are harmless; APP.name stays the SSOT.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(proxy): null-safe role access in the auth redirect
session?.user.role crashes the middleware — and with it every route,
turned into a 500 — whenever NextAuth yields a session without a user
(observed locally with auth misconfiguration). One optional chain makes
the failure mode 'treated as logged out' instead of 'site down'.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* design(marketing): extend the editorial system to all marketing subpages
/features, /about, /pricing, and /pros still wore the old teal-SaaS
look (teal gradient heroes, multicolor icon chips, teal CTA bands) while
the landing page had moved to the petvity.com editorial brand. All four
now use the same language: cream sections, gold ed-icon chips, Cormorant
ed-title headlines, pill btn-editorial CTAs, warm-dark closing bands.
Presentation classes only — copy, translation keys, and structure are
untouched. (The species guide moved in the previous commit.)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Vercel is decommissioned; petvity runs self-hosted on the Hetzner box
behind Caddy at petvity.orangecat.ch. Repoint every current-setup Vercel
reference to that reality:
- Remove vercel.json (Vercel Cron is gone; CLAUDE.md cron table is the
schedule SSOT, driven by host cron/systemd timers).
- Privacy page: Vercel hosting -> Hetzner; drop "Vercel Blob" vendor
(avatars now on local disk, not a third party).
- Cookies page: drop the Vercel Analytics claim (no analytics package is
installed) -> state no third-party analytics.
- FAQ (de/en/es/fr): "Vercel's global edge infrastructure" -> self-hosted
European infrastructure.
- schema.ts / avatar route / forgot-password: comments no longer say
"Vercel Blob"/"Vercel logs".
- .gitignore: drop the .vercel ignore.
Kept: lib/storage.ts "replaces @vercel/blob" narrative and the CLAUDE.md
"there is no Vercel Cron" guardrail. Lockfile transitive deps untouched.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
- lib/db/schema.ts: add sellerProfiles table (displayName, bio, city, country, phone, website, isActive)
- app/api/sellers/me: GET / POST / PATCH handler with requireSession() guard
- proxy.ts: add /api/sellers to PRIVATE_API_PREFIXES
- app/(portal)/layout.tsx: query sellerProfiles, pass hasSeller to SidebarNav
- app/(portal)/portal/seller-profile/: page.tsx (server) + SellerProfileForm.tsx (client, full i18n)
- messages/*.json: add 17 seller i18n keys to all 9 locales (EN DE FR ES JA ZH KO TR AR)
- register/page.tsx: redirect pet owners to /portal/pets/new?from=registration after sign-up
- portal/pets/new/page.tsx: show welcome banner + redirect to health log on first pet creation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Each new species gets a blurb + 5 care tips across all 9 locales (EN/DE/FR/ES/JA/ZH/KO/TR/AR).
generateStaticParams, SPECIES_BLURB_KEY, CARE_TIP_KEYS, sitemap, nav megamenu, and footer updated
to cover all trackable species. Footer now derives its guides list from SPECIES_CONFIG + public
translations rather than hardcoded per-species i18n keys.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
userRoleLabel() and formatSitterServices() returned hardcoded English shown
to users in booking cards, settings, find page, and public pro profiles.
Replaced with role_* / service_* i18n keys in the portal namespace; public
pro profile page now loads the portal namespace alongside public for services.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Renames bookingPetFallback → petFallback (SSOT: one generic key for all
pet-name fallback contexts) and wires it into the vaccinations, medications,
and records breadcrumbs that previously showed hardcoded English.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
useHealthList hook silently swallowed DELETE failures — users saw no feedback
when deleting a vaccination, medication, or health record failed. Now:
- Adds `deleteError` state returned from hook to all 3 pages
- Accepts `messages.deleteFailed` (translated) so errors are locale-aware
- `handleSubmit` uses `messages.saveFailed` instead of hardcoded English
- All 3 pages render {deleteError && alert-error} above the form
Also fixes medications page "→ ongoing" date suffix hardcoded in English;
adds `medsOngoing` to all 9 locale files. Adds `.playwright-mcp/` and
`Manu Communications/` to .gitignore.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
/api/vets, /api/sitters: city filter moved from client-side JS into SQL
WHERE ILIKE so the LIMIT applies AFTER filtering (not before). Returns
meta.hasMore=true when there are >50 matching results.
/api/products (public): hard LIMIT 100 prevents full-table scans as
product catalog grows.
find/page.tsx: city input now debounces 300ms then refetches from the
API with ?city=X instead of filtering all-loaded results in memory.
Shows "Showing top 50" note when meta.hasMore is true.
Fixes: unbounded full-table-scan queries on every Find a Pro page visit;
eliminates the case where LIMIT could hide city matches.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
formatPetAge and formatPetAgeShort now accept a t() function so callers
pass their locale context instead of receiving hardcoded English. Adds 7
translation keys to the public namespace (petAgeMonths, petAgeYears,
petAgeYearsMonths, petAgeShortMonths, etc.) with proper plural forms and
natural phrasing for DE/FR/ES/JA/ZH/KO/TR/AR. Also adds unnamedPet key
to eliminate the last hardcoded English fallback in the booking modal,
and routes OG image price/fee strings through formatPrice/formatAdoptionFee
instead of inline $ calculations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After an application is approved, the applicant now sees the owner's
name and a mailto link on the listing detail page, closing the contact
gap where users were told 'the owner will be in touch' with no way to
reach them. On the owner side, approved applications now show an email
button for the applicant. All 9 locales updated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses native <form method="GET"> so filters work without JS, produce shareable URLs,
and remain SEO-friendly. Species pills submit the form keeping the location value;
location search preserves active species via hidden input. Clear filters link resets
both. Translates all 4 new strings across all 9 locales.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a "needs attention" strip above the pet grid that shows: (1) a clickable
banner to /portal/adoptions when the owner has pending adoption applications to
review, and (2) a warning when any pet has vaccinations due within 14 days.
Computed from one new parallel query + existing vacc data (no N+1). Translated
across all 9 locales with ICU plural for correct singular/plural forms.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shows a green ReferenceArea band between species-specific normalMin/normalMax instead of
two separate dashed lines, making the "healthy zone" immediately obvious at a glance.
Adds a "Normal range" legend swatch (translated across all 9 locales) to physical charts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add SignalReasonData structured type to computePetSignal return value;
create lib/i18n/signal-reason.ts helper; replace hardcoded English reason
strings with translateSignalReason() calls in dashboard, check-in, pet
profile, health page, and public pet profile; add 13 signal namespace
keys (reasonNoMetrics, reasonStale, reasonOutOfRange,
reasonOverdueVaccinations, metric_*) across all 9 locale files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all hardcoded English labels in hero card, tracking, records,
and digital twin mock sections with t() calls; add mockRabiesDays,
mockHeartgard keys to all 9 locale files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- portal/adopt/page.tsx: add tPub to ListingCard and AdoptPage,
replace species/sex .label config usages with tPub(species_*/sex_*)
- Species filter dropdown: replace static English options with
t(allSpecies) + translated species names from public namespace
- Add allSpecies key to portal namespace across 9 locales
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all hardcoded English config .label fields with t() calls across
portal dashboard, pets list, pet profile, pet new/edit forms, adopt listing
detail, adopt applications, and public pet profile metadata:
- species_* from public namespace (dashboard, pets list/profile, adopt pages, forms)
- sex_* from public namespace (pet list/profile, forms); add sex_unknown key (9 locales)
- listingStatus_* from portal namespace (adopt listing detail, applications)
- appStatus_* from portal namespace (adopt applications)
- trait_* from public namespace (adopt listing detail — also fix variable shadow)
- Form selects: species options use emoji + translated name; sex options fully translated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all hardcoded English config .label fields with t() calls across
portal dashboard, pets list, pet profile, pet new/edit forms, adopt listing
detail, adopt applications, and public pet profile metadata:
- species_* from public namespace (dashboard, pets list/profile, adopt pages, forms)
- sex_* from public namespace (pet list/profile, forms); add sex_unknown key (9 locales)
- listingStatus_* from portal namespace (adopt listing detail, applications)
- appStatus_* from portal namespace (adopt applications)
- trait_* from public namespace (adopt listing detail — also fix variable shadow)
- Form selects: species options use emoji + translated name; sex options fully translated
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Homepage species pills: replaced s.label with tPub(species_${id}) from public namespace
- Shop product detail: replaced catCfg.label with t(cat_${category}) from existing public keys
- Species guide: load public namespace for translated species name in all headings/CTAs/meta;
add emotEnergyLabel / emotMoodLabel / emotAnxietyLabel / emotSocializationLabel to
speciesGuide namespace (9 locales) and replace HEALTH_METRIC_CONFIG[id].label with t()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces hardcoded English labels (species names, sex labels, listing
trait pills, product category tabs) on the public adopt, adopt detail,
pet profile, and shop pages with t() calls across all 9 locales.
Also fixes adoption fee badge showing "Free" in English regardless of locale.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces all hardcoded English cfg.label / status.label calls in portal
client components with t() lookups against 37 new portal namespace keys
covering vaccination, medication, health record, adoption listing/application,
order, booking statuses and housing types.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Convert static export const metadata to async generateMetadata in
/[locale]/(public)/shop/page.tsx and /[locale]/(public)/adopt/page.tsx.
Adds shopMetaTitle/shopMetaDesc and adoptMetaTitle/adoptMetaDesc keys
to public namespace in all 9 message files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previous session had a more complex key structure (heroTitle1/heroTitle2/heroBadge)
for EN/DE/FR/ES. Derive new simplified keys from old ones so all 9 locales have
the heroEyebrow/heroTitle/heroDesc/ctaButton pattern the rewritten pages expect.
Also adds vetTabLabel, sitterTabLabel, trust1-3 and combined vb1-vb6/sb1-sb6 keys
to pros namespace for EN/DE/FR/ES.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
263 new keys per locale across 4 new namespaces (features, pricing, about, pros).
Converted all 4 pages from static metadata + hardcoded English to async
generateMetadata + getTranslations. Lookup-table pattern for pillar/benefit
arrays keeps type safety with the t() call signature.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `home` namespace (95 keys) to all 9 message files and rewrites
app/[locale]/page.tsx to use getTranslations — hero, features, digital
twin, signals, ecosystem, testimonials, how-it-works, pricing, and
final CTA sections are now fully localized. Static metadata converted
to async generateMetadata with locale-aware SEO titles/descriptions.
App mockup card data (demo metrics, fake pet names) stays in English as
illustrative UI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>