Skip to main content
Use this page to add Veryfront to a codebase that already exists. To start from a scaffold instead, see Create project. Veryfront installs as a normal dependency. It does not rewrite your package.json scripts, your tsconfig.json, or any source file you already have.

Prerequisites

  • Node.js 22.3 or later.
  • An existing TypeScript project.

Install the framework

The package ships the framework and the veryfront CLI, so you can run commands with npx veryfront <command> without a global install. See Installation for pnpm, yarn, bun, Deno, and global-CLI variants.

Configure TypeScript

The package ships a base config with everything Veryfront needs. Extending it is the shortest correct route:
Make sure include covers wherever you keep your own source as well as your routes. The base config sets "noEmit": true: Veryfront bundles your routes itself and uses tsc only for typechecking. If your existing build emits JavaScript with tsc, do not replace your config with the extends form: the build keeps exiting 0 but silently stops emitting, and your output directory goes stale. Keep your own config and add the three options below instead, or set "noEmit": false in the config your build compiles with.

Setting the options yourself

If your project cannot extend that config, including when your build emits with tsc, three settings matter:
moduleResolution must understand package exports. Veryfront’s entry points are subpaths such as veryfront/agent, which the older node and classic modes cannot resolve:
bundler, node16, and nodenext all work. jsx is needed because Veryfront routes are .tsx files. skipLibCheck is recommended rather than required. Installing veryfront on its own no longer pulls MDX into your dependency tree, so a strict project typechecks clean without it. It becomes necessary once you opt into MDX:
That package depends on @types/mdx, which refers to a global JSX namespace React 19 no longer declares. Everything under node_modules/@types is included by tsc automatically, so it fails on a dependency you never import:
Scaffolded projects set all three already, which is why the first two only surface when adding Veryfront to a project you already have. Without @veryfront/ext-content-mdx installed, .mdx and .md routes report a missing ContentProcessor naming the package to install. Every other route works. The compiled veryfront binary embeds MDX support and is unaffected.

Add an entry route

Veryfront serves the app/ directory. Without it the dev server still starts, but reports that it found no route directories. Create one page:

Run it

The CLI prints the URL it bound:
The dev server uses port 3000 by default. When that port is taken it falls forward and prints the port it actually used, so open the URL the CLI prints.

Verify it worked

Open the URL the CLI printed. The page renders Hello from Veryfront. To check it without a browser, use the port from that URL rather than assuming 3000. If the port fell forward, 3000 still belongs to whatever took it, so curling it verifies the wrong server:
The response contains Hello from Veryfront. Your existing scripts are untouched. Confirm the build you had before still runs:
If that build emits files, check that its output was actually regenerated. A tsc build that inherited "noEmit": true still exits 0 while writing nothing.

Next steps