Semantic feature flags for websites, powered by Jev.
Your site knows what visitors clicked. Now it can know what they’re trying to do.
const technical = useIntent("technical_evaluation");
if (technical.confidence > 0.8) return <TechnicalHero />;This repository holds the open-source SDK and the landing page that runs it on itself.
OpenJEV support: Jev is built by TypeSafe. This fork keeps TypeSafe as the default and adds optional support for OpenJEV, a free community gateway to the same Jev model — set
OPENJEV_API_KEY(orJEV_PROVIDER=openjev) to use it. Original project: https://github.com/bvicsay/adaptmypage by @bvicsay.
| path | what |
|---|---|
packages/adaptmypage |
The npm package: React hooks, <Intent>, vanilla core, server handler, Jev client, heuristic fallback, tests |
apps/web |
The landing page and the live demos (Next.js 16). /demo/<id> shows the same page for two visitors side by side with a change log; /demo/<id>/frame is the page itself |
Four real pages, each with its own route and custom Jev questions, in apps/web/src/demos:
| demo | brand | what changes |
|---|---|---|
pricing |
Relay | Comparison table for comparers, trial button for buyers, SSO/SOC 2 block for procurement, "recommended" badge from team_size |
product |
Ando | The one reassurance the shopper needs from concern (fit, shipping, price, durability), specs up front for runners, sticky buy bar |
docs |
Vex OCR | Right language tab from integration_target, guided vs reference depth from expertise, one comparison card from deciding_factor |
signup |
Ledgerly | Shorter form on friction, blocker-specific reassurance from blocker, CLI for developers, finish-later link on abandon risk |
Each demo is a folder with config.ts (site context, questions, scripted personas, code shown in the hub) and Page.tsx (the page, using the SDK hooks). Scripted personas replay through the real API, so every change on screen is a real judgment.
- Observe. The SDK collects semantic events in the browser: sections entering the viewport, dwell, hovers over controls, copied code, form activity, exit intent, rage clicks. No coordinates, keystrokes or field values.
- Judge. Every few seconds a compact snapshot goes to one route. The route sends it to Jev (TypeSafe AI's decision model) with six typed questions and gets probabilities back in one 70–500 ms pass.
- Act. Your code reads the answer like any other flag.
Measured on this site through OpenRouter: six answers in ~300–500 ms for ~1,700 input tokens, about $0.00007 per judgment.
pnpm install
pnpm build:sdk # builds packages/adaptmypage → dist
pnpm dev # builds the SDK, then runs the site at http://localhost:3000
pnpm test # SDK unit tests (vitest + jsdom)
pnpm typecheckCopy apps/web/.env.example to apps/web/.env and set one Jev credential:
TYPESAFE_API_KEY=… # direct: https://typesafe.ai
# or
AI_GATEWAY_API_KEY=… # https://vercel.com/ai-gateway/models/jev
# or
OPENROUTER_API_KEY=… # https://openrouter.ai/typesafe
# or
OPENJEV_API_KEY=… # https://openjev.sh — free community gateway to JevWithout a key the API route answers with a transparent rules-based evaluator and every response is labelled source: "heuristic". The live panel shows which one answered.
For the email list set RESEND_API_KEY + RESEND_AUDIENCE_ID, or SUBSCRIBE_WEBHOOK_URL. In development with neither set, sign-ups append to apps/web/.data/subscribers.jsonl.
While editing the SDK and the site together, run pnpm --filter adaptmypage dev in a second terminal so dist/ rebuilds on save.
The site is a standard Next.js app. On Vercel:
- Import the repository, set Root Directory to
apps/web. - Build command
pnpm --filter adaptmypage build && pnpm --filter web build(or leave the default and set the rootbuildscript) and install commandpnpm install. - Add the environment variables above plus
NEXT_PUBLIC_SITE_URL=https://your-domain.
cd packages/adaptmypage
npm login
pnpm publish --access public # runs typecheck + tests + build firstBump version in packages/adaptmypage/package.json before each release.
MIT © Barnabas Vicsay. Jev is a model by TypeSafe AI; adaptmypage is not affiliated with TypeSafe or Vercel.