jev-design
A console whose design system is chosen by Jev at runtime.
Gonzalo Bilune asks whether a decision model can design a dashboard. One sentence of brief goes in, and the whole design system is decided while the page loads.
# Can a model design a dashboard? Designing one means making the visual decisions of a whole interface from a single sentence, and having them hold together across every component on the screen. That is a larger job than picking a colour or filling in a theme. This repo is the experiment. You type "an 18th century printed book" and, a second or two later, the console in front of you is one: aged paper, ink at zero chroma, small caps labels, hatched chart fills, square corners, and no icon set at all, because a printed book does not have any. https://github.com/user-attachments/assets/f22aefa5-4336-4fd1-87b8-078d04ccce19 Six briefs, 83 seconds, recorded in real time. Nothing in it is sped up or cut, so the pauses are the engine answering. The file is also in the repo at [docs/demo.mp4](./docs/demo.mp4). ```bash npm install cp .env.example .env.local # then fill in TYPESAFE_API_KEY npm run dev ``` The console runs without a key; the brief field is the part that needs one. `POST /api/design/generate` answers 503 until `TYPESAFE_API_KEY` is set, and the key stays on the server. Two routes reach the model. By default the TypeSafe SDK calls `api.typesafe.ai` with that key. Setting `JEV_ROUTE=gateway` sends the same questions through Vercel's AI Gateway instead, on `AI_GATEWAY_API_KEY`, which moves the billing and the observability to the Vercel account. The engine cannot tell the difference: `src/design/jev/client.ts` renames three fields between the two SDKs and derives a fourth, and that is the whole adapter. Either way the endpoint is metered, because either way a request spends real money against somebody's key. Two Vercel WAF rules on `POST /api/design/generate` do the metering at the edge, before the function is invoked: three generations per visitor per ten m