Loki's accountkit-switch.yml prove now runs a real reset: the product's
forgot-password page, the mail in a throwaway real inbox, its link, a new
password set on the reset page, and that password signing in. It passed
here; the doc no longer lists it as unproven.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
* feat(auth): every way in on AccountKit's own screens
Petvity has answered sign-in from AccountKit since this morning, through the
Auth.js compat layer, with AccountKit's sign-up, recovery, passkey and
two-factor endpoints closed. This finishes the move:
- /login, /register and /forgot-password render AccountKit's SignInForm,
SignUpForm and recovery form: email and password, an email sign-in link,
passkeys, two-factor, recovery, Continue with OrangeCat and the shared
bitbaum sign-in, each shown when its env is set.
/portal/settings/security renders AccountPanel (password, passkeys, second
factor, linked sign-ins, deleting the account).
- The compat layer passes screens: "accountkit" (AccountKit 0.20.0): every
AccountKit endpoint is open, and useSession and signOut keep Petvity's
session shape.
- AccountKit is the only credential writer. Petvity's registration route,
reset routes, settings password change and its own deletion are removed,
and so are Auth.js, its edge config, the Drizzle adapter and the
credential-less Google provider.
- Migration 0009 (additive) makes the panel's rename and deletion reach
users. The import attaches the new trigger too.
- A Petvity plugin keeps the shared demo account explorable (no sign-in
changes, no deletion, no mailed links) and keeps ADMIN_EMAILS promotion
at a password or email-link sign-in.
- Every imported account keeps working: same ids, bcrypt hashes through
legacyBcrypt, OrangeCat links, roles on users.
browser-smoke.yml now runs every way in against the production build and a
migrated, imported PostgreSQL: the method set at 320px and 390px, sign up,
sign out, a wrong password, sign in, an Auth.js-era bcrypt account, a reset
through the mailed link and an email sign-in link. AccountKit's real mail is
caught by scripts/ci/mail-sink.cjs. Long button labels now wrap (.btn-wrap):
the shared sign-in's label overflowed a 320px screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
* fix(ci): the mail sink path needs no runner context
Job-level env cannot read the runner context, so the workflow did not
parse. The sink sits at a fixed path outside the uploaded artifacts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
---------
Co-authored-by: Claude <noreply@anthropic.com>
Loki's accountkit-switch.yml prove ran on every switched app with
throwaway accounts: two sessions, a row change read on the next request,
a password write ending every session, sign-out, deletion, and a real
browser OrangeCat sign-in where offered. The docs listed these as waiting
on an approved test identity; they now say what was proven, what it
found, and what no machine can prove (a reset mail in a real inbox).
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
The switch ran from loki's accountkit-switch.yml: survey (nobody locked
out), import under locks, AUTH_RUNTIME=accountkit, restart, and a live
proof with a throwaway account. The docs said "staged, off"; they now say
what runs, how to roll back, and what still needs an approved test
identity.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
The next-auth/react bridge, its call helper, the session plumbing, the
AUTH_RUNTIME switch, the import rehearsal script and the journey-test cookie
client were copies of code five products each carried. They now come from
AccountKit 0.18.0:
- @bitbaum/accountkit/auth/nextauth-compat answers next-auth/react. The
product's compat.ts holds only what is its own: the session shape, how each
password form signs in, its login codes and hooks.
- @bitbaum/accountkit/auth/switch: sharedRuntimeEnabled().
- `pnpm run db:rehearse-import` runs AccountKit's accountkit-rehearse-import
on this product's import SQL.
- The journeys use @bitbaum/accountkit/auth/compat-testing.
Behaviour is unchanged with the switch off. With it on, a signed-out session
reads as null, and a resolver or hook failure is a readable refusal rather
than a 500. The real-database journeys pass unchanged.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
Petvity moves from Auth.js to @bitbaum/accountkit one reversible step at a
time, as evig and kivvi do. Nothing changes while AUTH_RUNTIME is unset.
- Migration 0008: AccountKit's tables under an `auth_` prefix, plus the
users <-> auth_users mirror functions, inert until attached.
- scripts/db/accountkit-import.sql: accounts under their own ids, bcrypt
hashes byte for byte, verification kept, orangecat_sub as an `orangecat`
account row; refuses collisions, drift or a live shared runtime, then
attaches the triggers. The rehearsal CLI always rolls back.
- lib/auth/shared/: the runtime (ids: 'uuid', legacy bcrypt, AccountKit
0.16.0), a session reader re-read from `users` on every request, a bridge
that answers next-auth/react including "Sign in with OrangeCat", and a
Petvity row for a person AccountKit creates itself. AccountKit's own
credential endpoints stay closed; Petvity's writers stay the only ones.
- lib/auth/claims.ts: the ADMIN_EMAILS promotion rule, written once.
- The proxy has one routing function and two session sources.
- browser-smoke.yml runs the account journey once per runtime; the
AccountKit leg first runs the rehearsal and the real-database journeys.
docs/ACCOUNTKIT-MIGRATION.md records what is left before switching.
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML
Co-authored-by: Claude <noreply@anthropic.com>
* 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 three 2026-08-16 fleet measurements/proposals move to docs/archive/ (they named a retired host, a renamed repo and a proposed shop.config.ts). CLAUDE.md's SSOT table named the retired lib/domain/blog-markup.ts; the parser is lib/domain/longform.ts. The investor memo link follows the move.
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD
Co-authored-by: Claude <noreply@anthropic.com>
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch,
LOKI_* env keys, loki-* units. This repo referenced the old name in
9 files changed, 15 insertions(+), 15 deletions(-).
Email addresses at the old sending domain stay until the new domain is
verified in Resend.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The memo is the SSOT for the investor presentation: problem, live product
surface, digital-twin moat and staged roadmap, business model table, market
ranges with named third-party sources, honest traction (pre-revenue,
pre-marketing, no invented numbers), and use of funds. The risk register
states plainly what diligence would find anyway — distribution untested,
two-sided surfaces empty, habit retention unmeasured, memorial ethics,
solo-founder concentration.
A shareable dark-editorial deck built from the memo is published separately
(Claude artifact); the memo remains the source of truth.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Found while inventorying what repeats across the fleet. Cron auth appears in 43
files across 9 repos, and the copies have diverged into two behaviours:
petvity if (auth !== `Bearer ${process.env.CRON_SECRET}`) OPEN
evig if (authHeader !== `Bearer ${cronSecret}`) OPEN
kivvi if (!cronSecret) { ... } guarded
aoz-housing if (!cronSecret || authHeader !== `Bearer ${cronSecret}`) guarded
With CRON_SECRET unset, the template literal evaluates to the string
"Bearer undefined", so a request carrying exactly that header is authorised.
All 8 cron routes here had the open version.
Behind that gate: /api/cron/reset-demo wipes and reseeds the demo account, and
weekly-digest, health-alerts, vaccination-reminders, medication-reminders and
booking-reminders each email every opted-in owner. So the blast radius of a
missing environment variable was a stranger mass-mailing the userbase and
destroying demo data.
Not exploitable today — CRON_SECRET is set in production. It is a gate that
fails open on an absent secret, which is a normal thing to happen on a new
environment or a typo, and the failure is silent.
requireCronAuth() denies everything when the secret is absent or blank, logs why
so a broken deployment is loud rather than quiet, requires the Bearer scheme,
and compares with timingSafeEqual. The timing part is close to unexploitable
over TLS and is not the point; a helper that is obviously correct removes the
need for anyone to reason about whether it matters.
Two test files, and the second is the one that matters. cron.test.ts pins the
helper's behaviour, including that "Bearer undefined" is refused when
unconfigured. cron-routes.test.ts asserts against the directory that every cron
route calls requireCronAuth and no route mentions process.env.CRON_SECRET —
because fixing eight routes fixes eight routes, while checking the directory
fixes the ninth one nobody has written yet.
Also adds docs/repeatable-across-projects.md: the full measured inventory of
what repeats across 25 repos, and a first-principles rule for what to do with
each. The short version is that copy count is the wrong question — it measures
typing, which is free. The right question is what divergence costs, which sorts
duplication into four classes with four different correct answers, of which
"leave it alone" is one.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Grounded in what the fleet already has rather than proposed from scratch.
Roughly 90% of a shop is identical between shops, and the 10% that differs is
nearly always the same 10%: what a product is, what the brand looks like, and
who ships it. Today a shop is 30-55 hours; almost all of that is the identical
part.
Three layers, and the middle one is the whole job:
shop.config.ts per shop catalogue shape, brand, currency, fulfilment
storefront kernel MISSING schema, routes, admin, checkout UI, emails
commercekit EXISTS money, cart, inventory, buyer, addresses
The decisive rule is that the kernel is a DEPENDENCY, never a template, and
that is settled by measured data rather than preference: SHARED.md records
auto-merge-sweep.sh living in 22 repos in 8 distinct versions, where a fix
reaches at most 9. A starter copied six times becomes six codebases within a
quarter, and the economic case collapses exactly when it should start paying.
The catalogue reconciles into a declarative schema — checked against all three
real shops, which are a common core plus per-shop custom fields (condition and
brand for refurbished hardware, size and colour for footwear).
Infrastructure is already solved and should not be rebuilt: apps.conf plus
sync-infra.sh generate the systemd unit, launch script and Caddy vhost from a
one-line manifest entry, idempotently, for 13 apps today.
Build order is extraction, not anticipation: build shops #1 and #2 normally,
extract the kernel from them, then #3-#6 are config. About a week plus six
hours. And build it on the simple first-party case, NOT on evig — generalising
from a P2P marketplace with escrow, disputes and payouts produces a kernel that
is complicated for everyone and right for one.
Also names the verticals the fleet has already written three times each —
commerce, booking, content, directory — which is what a studio spine would
carry.
Ends with what an hour does not buy, because the promise otherwise breaks on
shop #1: products, brand, tax rules, a payment account, legal review and
fulfilment. Petvity has a working checkout and zero products; evig has 213
listings nobody can buy. The bottleneck is not engineering time.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Measured against production rather than inferred from code.
evig/revampit 213 active listings, 21 users, 0 orders ever, and clicking
"Jetzt kaufen" on a live listing sends a stranger to
/auth/login. Verified in a browser today.
petvity 0 products, and the only 4 orders in the database are my own
e2e fixtures. Guest checkout works.
fitfoot not deployed anywhere, dormant since March, CI deliberately
disabled, built on Medusa.
The fleet does not have too many shops or under-built shops. It has two that
fail in exactly complementary ways: the one with real inventory cannot be bought
from, and the one that can be bought from has nothing to sell.
Decisions:
1. evig is the shop. Ship guest checkout there — the highest-value change
available in the fleet, and a port of something already proven in production
rather than speculative work. The plan is written file by file, including the
leftJoin/COALESCE trap that will otherwise hide every guest order from the
seller who has to ship it.
2. petvity is not a shop. Keep the guest checkout, stop treating "fill the
catalogue" as a priority. A P2P marketplace needs seller supply it does not
have; if it ever sells, sell first-party off the back of the health content,
which is the thing only petvity can do.
3. fitfoot: archive it, or rebuild it on commercekit. Not left dormant on a
framework the stack has decided against.
4. One engine, several storefronts. commercekit is the core; catalogue, order
state machine and fulfilment stay per-shop because they genuinely differ.
5. One question for a human: evig.orangecat.ch and revampit.orangecat.ch serve
the same build off the same database. Two brands on one codebase may be
deliberate, but it decides whose name is on the invoice.
Does not touch evig — that needs a session in that repo.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The seven metrics in health-metrics.ts are applied uniformly to all ten
species. That is tidy and, for several of them, wrong in ways that matter.
Body temperature is not a property a fish or a reptile has in the sense the
field implies. They are ectotherms: a fish's body temperature IS the water
temperature, and a reptile's depends on where it is sitting in a thermal
gradient. Heart rate is not measurable at home for a bird, a fish or a hamster.
Asking for either produces an empty field, and empty fields teach owners to
skip — a habit that generalises to the field that mattered.
Worse, none of the seven capture what actually kills these animals. A rabbit
that has not eaten and produced no droppings for twelve hours is a medical
emergency; gut stasis is the leading cause of death in pet rabbits. A male cat
straining without producing urine is fatal in 24-48 hours. A horse whose manure
output drops is the earliest practical warning of colic. A UVB bulb keeps
emitting visible light long after its UVB output has decayed, so the enclosure
looks fine while the animal develops metabolic bone disease.
lib/config/observations.ts is the SSOT for what is worth observing and for
which species. Each observation declares its species, cadence, whether an owner
can actually produce the answer, why it earns a tap, and what answer means
"call a vet" — with the reason, because an alert nobody believes is an alert
everybody dismisses. Records (microchip, parasite schedule, diet, farrier,
water changes) are modelled separately, since they are durable facts rather
than things that changed today.
The daily set is capped at five and the cap is a test that FAILS rather than a
slice that truncates. Printing the sets caught three real design faults that
the first round of tests passed: fish had an empty daily check-in because water
temperature is device-sourced and I was filtering device readings out; dogs and
cats had seven candidates silently cut to five by array order; and reptiles were
being asked about mood while the enclosure gradient that actually kills them was
excluded. Priority is now explicit and cadence can be overridden per species —
a snake fed weekly should not be asked daily whether it ate.
Clinical values are typical published ranges compiled for product design, NOT
clinically reviewed. REVIEW_STATUS records that, so it cannot quietly be
presented to an owner as authority.
Also adds docs/pet-health-science.md (the reasoning, species by species),
docs/digital-twin-and-legacy.md (twin staging, memorialisation, gamification
and revenue, including an explicit list of what not to build), and a first blog
draft. Nothing is published — that is a deliberate decision, not a side effect.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>