A React 19 front end goes inside a Worker you already have, wired end to end. The SPA and the API build together, deploy together, and answer on one origin — with the screens you were going to write already written.
pithy ui add react --worker apiIt scaffolds the client into the Worker's own directory and edits three files to connect them: an assets stanza in wrangler.jsonc with SPA fallback and an allowlist of the API paths the Worker answers itself, a dev block so pithy dev runs Vite for this Worker, and a ui block so pithy deploy builds the client before shipping.
Your Worker entry is untouched, before and after.
$ pithy ui add react --worker api
▸ client apps/api/src
▸ wrangler assets + SPA fallback
▸ dev vite, one process
▸ deploy builds before shipping
Done.
What you get depends on what the Worker already composes — that is the composability doing the work rather than a template menu.
Compose auth and you get the sign-in screens: magic link, the OTP entry, and the callback route. Compose payments and you get the paywall, the pricing screen and the subscription screen. Compose neither and you get a router and one screen of your own.
pithy/sign-in.tsx auth magic link
pithy/otp.tsx auth code entry
pithy/callback.tsx auth the return leg
pithy/paywall.tsx payments gated content
pithy/pricing.tsx payments plans, priced live
pithy/subscription.tsx payments manage, cancel
index.tsx yours
No generated SDK, no types file to regenerate and commit. What the front end knows about each capability comes from virtual modules resolved in memory at build time, so it cannot drift from the Worker it ships beside.
Add a capability and its client projection appears. Remove one and the import stops typechecking, which is the point.
import { auth } from "virtual:pithy/auth";
import { payments } from "virtual:pithy/payments";
// Narrowed to exactly what this Worker composes —
// resolved in memory, never written to disk.
export const pithy = { auth, payments };
The scaffold is a starting point you own. Rewrite styles.css from scratch, delete a Pithy screen and write your own, change the router. Nothing upstream will argue with you and nothing silently reverts.
What stays a package is small: useRead, useAction and Redirect from @pithy-sh/ui-core, which the screens load data, run calls and leave through, and the route table the router builds from each screen's declared path. The web screens and the React Native ones share all of it. A fix to them arrives with an upgrade, not a re-scaffold.
It does not overwrite a file you own — running it twice will not clobber the edits you made. The one file it rewrites is client-env.d.ts, the kit's own generated declarations, when a later screen set needs newer ones.
$ rm apps/api/src/routes/pithy/sign-in.tsx
$ # write your own; nothing upstream objects
$ pithy dev
▸ vite one process, one origin
▸ api same Worker, same port
Done.
pithy ui add react-native writes an Expo app for iOS, Android and the web into an apps/ directory of its own, beside the Worker it calls rather than inside it. The screens are the web set's, in React Native primitives, under the same file names and the same string keys, so one translation covers both.
On a phone the app calls the Worker's own origin with a bearer session the kit ships: the session token in the Keychain or the Keystore, rotated before it expires. A redirect sign-in starts in the system browser and comes back to the app with a one-time code. Each platform sells through a rail you choose: the App Store or Google Play in the app, or a hosted checkout.
Metro cannot read a virtual module, so the app's config is a file, and pithy ui sync rewrites it when the Worker changes. Store builds go through EAS. pithy deploy leaves the app alone.
pithy ui add react-native --worker api # apps/app, an Expo app
pithy ui sync --app app --ios-rail apple # after the Worker changes
pithy dev # the Worker and Metro, together
eas build --platform ios # a store build
What it does not do
It scaffolds into one that exists. pithy worker add makes new ones.
Your Worker's index.ts is identical before and after.
Run it twice and your edits survive. The kit's generated client-env.d.ts is the one file it brings up to date.
No generated SDK or types file on disk — virtual modules, resolved in memory. A React Native app keeps one config file, which pithy ui sync rewrites.
Which social providers you offer lives in pithy.config.ts and nowhere else.
The React Native app gets a directory of its own, and pithy deploy never builds it.
Sign-in, paywall, pricing and subscription screens, scaffolded from what you already compose.