01One lead route
Ten distinct form shapes across seven components post to `/api/lead`: feasibility, poultry qualification, general inquiry, universal contact, four investor landing pages, the investor popup and the vacancy application. My route composes them into one name plus a readable summary of whichever fields were supplied, attached to both the Bitrix24 Contact and the Deal. I catch investor leads two ways, by an exact-match set of `source` strings and by the `contactingAs` value on the shared contact form where an investor is otherwise indistinguishable, and give them the category ID for the dedicated pipeline.
02Answer, then forward
The thank-you page was taking about thirty seconds. The cause was two sequential Bitrix round trips, with the deal creation firing the account's own automation rules. My route now validates fully, returns immediately, and hands off to the CRM unawaited, which is safe only because this runs as a long-lived Node server rather than a serverless function that would freeze after the response; my catch handler logs the whole lead so a restart mid-flight leaves it recoverable.
03Readable by agents
My `proxy.ts` serves four discovery manifests that cannot be App Router routes, because dotfolders are not routable: an RFC 9727 api-catalog linkset, an MCP server card, an agent-skills index and a message-signatures directory. Any GET carrying `Accept: text/markdown` receives the page as markdown instead of HTML. I hand-wrote `/api/mcp` as a JSON-RPC 2.0 server exposing four read-only tools, and a small client component registers two site actions with the experimental in-browser agent API, no-opping where it is absent.
04Cache headers
I serve page routes `private, no-cache, must-revalidate`. The App Router reserves `Vary` for RSC and drops the `Accept` value, so a shared CDN cannot tell the markdown variant from the HTML one, and a stale copy had been pinning old headers. I inline the CSS because PageSpeed showed the 27.6 KiB chunk costing 630 ms on mobile.
05A design lab
The client called the ROI block the page's main attention grabber, so I built `/lab/roi` to render twelve competing versions of it from one registry: arc gauges, range bars on a shared scale, a scroll-scrubbed ascent, a growth curve, layered depth cards, each with a one-line note on what it encodes. Option 06, the connected flow rail, was chosen, and I promoted it into production; the registry now imports it back from the production component so the lab cannot drift from what shipped. The route is still live, unlinked and noindexed.