We recently rewrote v0’s backend API using Elysia.
We added typed helpers to consume it internally (𝚞𝚜𝚎𝙰𝙿𝙸, 𝚞𝚜𝚎𝙿𝙾𝚂𝚃, 𝚙𝚛𝚎𝚏𝚎𝚝𝚌𝚑𝙰𝙿𝙸 for RSC, etc.) The overall DX is really nice.
We wanted our 𝚘𝚙𝚎𝚗𝚊𝚙𝚒.𝚓𝚜𝚘𝚗 as the source of truth, and Elysia had pretty solid support here. The goal was largely to turn our entire product into a headless SDK, and for our frontends to just be implementations.
Our web app, mobile app, MCP, public-facing SDK, AI SDK tools, and Eve integration all derive from the 𝚘𝚙𝚎𝚗𝚊𝚙𝚒.𝚓𝚜𝚘𝚗. Clients within our monorepo use an RPC without a codegen step (though it took some work to fix up our Zod types for TS perf).
In addition to creating an /api-v2
skill for new routes, we used agents to build extremely strict lint rules. Every route has consistent file structure and conventions around dependency injection and tests. It looks something like 𝚜𝚌𝚑𝚎𝚖𝚊.𝚝𝚜, 𝚍𝚋.𝚝𝚜, 𝚜𝚎𝚛𝚟𝚒𝚌𝚎.𝚝𝚜, 𝚊𝚙𝚒.𝚝𝚜 in each folder.
It’s surprising how much this helped us avoid slop. We invested a good amount of time making our first few routes until the conventions felt right before migrating anything.
I highly highly highly recommend sending Sol off to create a bunch of lint rules to enforce your codebase standards. Every human PR review could create a lint rule. To start, we made our rules only apply to touched files to make the migration incremental, but it results in a ton of cleaned up code.