Open sourceFarm.js is in beta
00Build / Ship / Scale

A Framework forProduct integrated Apps

Bring the stack you already use. Farm.js connects your app router, typed APIs, middleware, integrations, docs, and deployment so they work together as one product.

Use Farm.js to build this production-ready React product app. First read the Farm.js framework map at https://farmjs.dev/llms.txt and the current Farm.js skill at https://farmjs.dev/api/docs/skill.md, then use their linked docs as the source of truth. Follow Farm.js conventions for App Router, typed APIs, server functions, middleware, framework Cron, integrations, environment boundaries, data loading, and deployment. Preserve existing patterns, validate external input, keep secrets server-only, add focused tests, and run type checks plus a production build before finishing.
01.1Development

A blazingly fast dev server

Start the whole app once, then see every page request and response time as you work.

pnpm dev
$ pnpm devFarm.js v1.0.0 ready in 253ms➜ Local:http://localhost:3000/➜ Network:http://192.168.1.24:3000/[FARM] [PAGE] [GET] /contact - 200 (8ms)[FARM] [API] [POST] /api/waitlist - 200 (5ms)[FARM] [PAGE] [GET] /docs - 200 (11ms)
01.2Typed APIs

Types from route to client

Define an API route once. Farm.js generates a client with typed inputs and responses.

GET/api/userstsx
const { data, error } = await api.users.get({  query: { limit: "5" },});if (error) throw error;data?.users[0]?.name;//   ^? string | undefined
01.3Integrations

Add product features as integrations

Bring in auth, billing, email, jobs, storage, docs, and agent runtimes through one integration system.

ts
import { betterAuth, resend, stripe } from "@farm.js/integrations";import { auth } from "./auth";import { emailTemplates } from "./email";export const integrations = {    auth: betterAuth({ instance: auth }), // Better Auth    billing: stripe({ secretKey: process.env.STRIPE_SECRET_KEY }), // Stripe    email: resend({ // Resend        apiKey: process.env.RESEND_API_KEY,        templates: emailTemplates,    }),} as const;
01.4Production

Build once. Deploy together.

Farm.js packages routes, middleware, typed clients, and deployment config into one production build.

production buildbash
$ farm build --preset node-server[info] 🚜 Building Farm.js application with preset: node-server...[info] 🔍 Discovering routes and API endpoints...[info] 📦 Building client and SSR bundles in parallel...[bench] Fixture build wall time 527ms median[info] 📁 Output directory: .farm/.output

Framework benchmarks

Startup advantage

Farm gets your first page running: 5.47× faster than Next.js; 3.17× faster than SvelteKit; 9.21× faster than Nuxt; 3.17× faster than TanStack Start.

Cold dev startup through the first rendered SSR page, measured against the same routed fixture.

Production build

Farm builds the same fixture: 4.53× faster than Next.js; 3.19× faster than SvelteKit; 8.47× faster than Nuxt; 1.25× faster than TanStack Start.

A complete production compile of the same SSR project, with generated output ready to boot.

01.5Benchmark

Farm.js leads the benchmark app across latency and output size. Raw medians for startup, build, boot, SSR, and HTML.

Farm.jsNext.jsSvelteKitNuxtTanStack Start
2.33s253msDEV START30ms1.72msWARM DEV4.46s527msBUILD254ms64msPROD BOOT3.43ms0.63msSSR30.1 KB7.4 KBHTMLNEXT.JSDEV START MEDIAN · 1.39sRANGE 253ms → 2.33sNEXT.JSWARM DEV MEDIAN · 30msRANGE 1.72ms → 30msNEXT.JSBUILD MEDIAN · 2.38sRANGE 527ms → 4.46sNEXT.JSPROD BOOT MEDIAN · 254msRANGE 64ms → 254msNEXT.JSSSR MEDIAN · 3.43msRANGE 0.63ms → 3.43msNEXT.JSHTML MEDIAN · 30.1 KBRANGE 7.4 KB → 30.1 KBSVELTEKITDEV START MEDIAN · 802msRANGE 253ms → 2.33sSVELTEKITWARM DEV MEDIAN · 1.80msRANGE 1.72ms → 30msSVELTEKITBUILD MEDIAN · 1.68sRANGE 527ms → 4.46sSVELTEKITPROD BOOT MEDIAN · 66msRANGE 64ms → 254msSVELTEKITSSR MEDIAN · 0.63msRANGE 0.63ms → 3.43msSVELTEKITHTML MEDIAN · 8.2 KBRANGE 7.4 KB → 30.1 KBNUXTDEV START MEDIAN · 2.33sRANGE 253ms → 2.33sNUXTWARM DEV MEDIAN · 2.95msRANGE 1.72ms → 30msNUXTBUILD MEDIAN · 4.46sRANGE 527ms → 4.46sNUXTPROD BOOT MEDIAN · 117msRANGE 64ms → 254msNUXTSSR MEDIAN · 1.00msRANGE 0.63ms → 3.43msNUXTHTML MEDIAN · 8.3 KBRANGE 7.4 KB → 30.1 KBTANSTACK STARTDEV START MEDIAN · 803msRANGE 253ms → 2.33sTANSTACK STARTWARM DEV MEDIAN · 4.40msRANGE 1.72ms → 30msTANSTACK STARTBUILD MEDIAN · 658msRANGE 527ms → 4.46sTANSTACK STARTPROD BOOT MEDIAN · 80msRANGE 64ms → 254msTANSTACK STARTSSR MEDIAN · 0.94msRANGE 0.63ms → 3.43msTANSTACK STARTHTML MEDIAN · 9.1 KBRANGE 7.4 KB → 30.1 KBFARM.JSDEV START MEDIAN · 253msRANGE 253ms → 2.33sFARM.JSWARM DEV MEDIAN · 1.72msRANGE 1.72ms → 30msFARM.JSBUILD MEDIAN · 527msRANGE 527ms → 4.46sFARM.JSPROD BOOT MEDIAN · 64msRANGE 64ms → 254msFARM.JSSSR MEDIAN · 0.66msRANGE 0.63ms → 3.43msFARM.JSHTML MEDIAN · 7.4 KBRANGE 7.4 KB → 30.1 KB

Dev start

253ms3.17× edge

Warm dev

1.72ms1.05× edge

Build

527ms1.25× edge

Prod boot

64ms1.03× edge

SSR p50

0.66msnear lead

HTML

7.4 KB1.10× edge
01Connected systems

Bring the tools you already use

Choose built-in integrations for auth, billing, email, jobs, storage, agents, API keys, and UI, or connect your own.

02.1Routing

The app router you know

Build pages, layouts, API routes, loading states, and typed links in one app directory.

approute explorer
04 routesmanifest synced
02.3Documentation

Docs for people and agents

Enable docs in your app config, then serve pages, Markdown, search, and agent-ready endpoints from the same source.

farm.config.tsts
import { defineConfig } from "@farm.js/core";export default defineConfig({    docs: {        enabled: true,        entry: "/docs",        search: true,        mcp: true,    },});
02.4Layers

Share architecture, not boilerplate

Compose routes, middleware, integrations, components, and config from local or package layers. Project files always win.

ts
import { defineConfig } from "@farm.js/core";export default defineConfig({    routeRules: {        "/products/**": { swr: 300 },    },});
02.5Storage

Storage built into the runtime

Mount SQLite, Redis, S3, or any supported driver once, then reuse the storage layer across server code, middleware, rate limits, and integrations.

ts
export default defineConfig({    storage: {        mounts: {            app: sqliteStorage({ path: "./data.sqlite" }),            cache: redisStorage({ url: process.env.REDIS_URL! }),        },    },});
02.6Advanced routes

Configure the whole route in one place

Validate params, prepare request data, load the page, and run post-load work in one typed route definition.

ts
export const ProductRoute = createRoute("/products/[id]", {    params: ProductParams,    data: {        before: ({ context }) => requireUser(context.session),        main: ({ params, before }) => getProduct(params.id, before.id),        after: ({ data }) => recordView(data.id),    },    pending: ProductSkeleton,    error: ProductError,    component: ProductPage,});
03Agent systems

Bring the agent runtime you already use

Run Eve on Vercel or Cloudflare Agents on Workers. Farm joins each runtime to your app in development and production while its native SDK stays intact.

Farm connects the application origin to Eve on Vercel and Cloudflare Agents on Workers.
Farm app
Same origin/
Eve
/eve/*Vercel
Cloudflare Agents
/agents/*Workers
03.1Agent runtimes

Run agents beside the app

Choose Eve or Cloudflare Agents. Farm starts the runtime in development, owns its same-origin routes, and composes supported production output.

ts
import { eve } from "@farm.js/eve";export default defineConfig({    integrations: {        agent: eve(),    },    deploy: {        target: "vercel",    },});
03.2Native clients

Keep the provider-native SDK

Use useEveAgent for durable conversations or useAgent for typed WebSocket state and RPC. Farm does not add a duplicate client layer.

ts
"use client";import { useEveAgent } from "eve/react";export function useChat() {    const agent = useEveAgent();    return {        messages: agent.data.messages,        send: agent.send,    };}

One framework. The whole product.

Build routing, APIs, integrations, agents, docs, and deployment together in one React framework.