# Farm.js > Farm.js is the framework for modern integrated apps, unifying routing, typed APIs, middleware, integrations, docs, and deployment. ## Agent Discovery - [Agent manifest](/.well-known/agent.json): Farming Labs discovery manifest - [API catalog](/.well-known/api-catalog): RFC 9727 API catalog - [Agent Skills index](/.well-known/agent-skills/index.json): Hashed Agent Skills discovery - [Full docs text](/llms-full.txt): every docs page in one file ## Pages - [Farm.js - Framework for modern integrated apps](https://mcp.farmjs.dev/index.md): Farm.js is the framework for modern integrated apps, unifying routing, typed APIs, middleware, integrations, docs, and deployment. - [Agent infrastructure — Farm.js](https://mcp.farmjs.dev/agents.md): Farm.js apps serve Markdown versions of every page, llms.txt and JSON-LD by default, and config turns on MCP tools, WebMCP, and agent runtimes. Plus upcoming infrastructure for deploying agents and MCP servers. - [Agent-ready check — Farm.js](https://mcp.farmjs.dev/agents/check.md): Score any website on what AI agents can read and call: Markdown, llms.txt, robots.txt, MCP, OpenAPI and structured data, with a fix for each gap. - [Blog — Farm.js](https://mcp.farmjs.dev/blog.md): Releases, engineering notes, and ideas from the people building Farm.js. - [Farm.js v0.1.0: Stable, Integrated, and Agent-Native](https://mcp.farmjs.dev/blog/0.1.0.md): Our first stable release. Built for apps and agents. - [Farm.js design](https://mcp.farmjs.dev/design.md): The Farm.js visual system and the Farming Labs design-engineering rules: tokens, type, layout, components, motion, SVG figures, and how to verify a design pass. - [Farm.js Documentation](https://mcp.farmjs.dev/docs.md): The complete Farm.js framework guide, powered by @farming-labs/docs. - [Post-response Work](https://mcp.farmjs.dev/docs/after.md): Schedule short server work with after() without delaying the response. - [API Client](https://mcp.farmjs.dev/docs/api-client.md): Call app API routes with apiClient.hello.get style inference, cache policies, invalidation, retries, callbacks, and optimistic updates. - [API Routes](https://mcp.farmjs.dev/docs/api-routes.md): Expose HTTP handlers from src/app/api and validate input with schemas before handler code runs. - [Built-in Authentication](https://mcp.farmjs.dev/docs/auth.md): Enable Farm's built-in email/password authentication with one config key, server helpers, and a React hook. - [Cache and PPR](https://mcp.farmjs.dev/docs/cache-ppr.md): Use shared runtime cache helpers, tag/path invalidation, ISR-style revalidation, and static shell caching for PPR pages. - [CLI](https://mcp.farmjs.dev/docs/cli.md): Use the Farm CLI to run, build, generate types, migrate apps, deploy output, and add integrations. - [Configuration](https://mcp.farmjs.dev/docs/configuration.md): Use farm.config.ts as the single project control plane for source paths, integrations, docs, KV storage, database clients, deployment, and framework behavior. - [Cron](https://mcp.farmjs.dev/docs/cron.md): Map portable UTC schedules to ordinary Farm API routes, run them locally, and compile them to deployment-native cron triggers. - [Deployment](https://mcp.farmjs.dev/docs/deployment.md): Build deployable output with Farm's deploy config and Nitro presets, from first-class targets to custom Nitro output. - [Built-in DevTools](https://mcp.farmjs.dev/docs/devtools.md): Inspect Farm's resolved routes, APIs, integrations, KV storage, schedules, and deployment settings in the browser during development. - [Docs Engine](https://mcp.farmjs.dev/docs/docs-engine.md): Serve a @farming-labs/docs-powered docs runtime from Farm config, including human pages and agent-readable API routes. - [Doctor](https://mcp.farmjs.dev/docs/doctor.md): Run Farm's runtime diagnostics from the terminal and CI, against a live app or from project state alone. - [Environment Functions](https://mcp.farmjs.dev/docs/environment-functions.md): Keep server-only and client-only implementations out of the wrong Farm bundle. - [Examples](https://mcp.farmjs.dev/docs/examples.md): Use the examples folder as executable docs for routing, RSC, agents, docs, markdown, auth, billing, email, jobs, and API keys. - [Fonts](https://mcp.farmjs.dev/docs/fonts.md): Load local and remote fonts as self-hosted, hashed Farm assets without runtime loader code. - [Getting Started](https://mcp.farmjs.dev/docs/getting-started.md): Create a Farm.js app, understand the files that matter, and run the development server. - [Images](https://mcp.farmjs.dev/docs/images.md): Render responsive images with static dimensions, blur placeholders, secure remote optimization, and deployment-native providers. - [Farm Infra analytics](https://mcp.farmjs.dev/docs/infra-analytics.md): Send request and MCP tool analytics to your Farm Infra project by setting two environment variables. - [Integrations](https://mcp.farmjs.dev/docs/integrations.md): Register services once, get owned routes, typed callers, agent runtimes, providers, middleware, database models, lifecycle hooks, and validation. - [Agent Frameworks](https://mcp.farmjs.dev/docs/integrations/agent-frameworks.md): Run AI SDK, Mastra, LangGraph, the OpenAI Agents SDK, or any other agent framework in a Farm API route, with one chat UI. - [Auth Integrations](https://mcp.farmjs.dev/docs/integrations/auth.md): Choose and configure Better Auth, Auth.js, Clerk, Auth0, WorkOS, or Supabase in a Farm app. - [Auth0 Integration](https://mcp.farmjs.dev/docs/integrations/auth/auth0.md): Add Auth0 login, callback, logout, profile, and protected-route flows to Farm. - [Auth.js Integration](https://mcp.farmjs.dev/docs/integrations/auth/authjs.md): Mount an Auth.js handler at Farm's catch-all auth route and keep using Auth.js native helpers. - [Better Auth Integration](https://mcp.farmjs.dev/docs/integrations/auth/better-auth.md): Mount a Better Auth instance in Farm and use its native client, database adapter, methods, and plugins. - [Clerk Integration](https://mcp.farmjs.dev/docs/integrations/auth/clerk.md): Register ClerkProvider and protect Farm routes with Clerk request authentication. - [Supabase Integration](https://mcp.farmjs.dev/docs/integrations/auth/supabase.md): Use Supabase email/password auth, OAuth, SSR sessions, custom pages, and protected Farm routes. - [WorkOS Integration](https://mcp.farmjs.dev/docs/integrations/auth/workos.md): Add WorkOS AuthKit login, sealed sessions, logout, and protected routes to Farm. - [Autumn Integration](https://mcp.farmjs.dev/docs/integrations/autumn.md): Add subscription and usage billing with Autumn while keeping Farm's integration and database APIs stable. - [Cloudflare Agents Integration](https://mcp.farmjs.dev/docs/integrations/cf-agent.md): Run Cloudflare Agents beside Farm and deploy the UI, Agent classes, WebSockets, and Durable Objects as one Worker. - [Custom Integrations](https://mcp.farmjs.dev/docs/integrations/custom.md): Build a first-class Farm integration with typed APIs, route handlers, lifecycle hooks, config validation, middleware, providers, database schemas, and runtime logs. - [Resend Integration](https://mcp.farmjs.dev/docs/integrations/email.md): Render React Email templates, send with Resend, schedule messages, preview templates, and receive webhooks. - [Eve Integration](https://mcp.farmjs.dev/docs/integrations/eve.md): Run a filesystem-first Eve agent beside Farm with same-origin routes and automatic Vercel composition. - [Inngest Integration](https://mcp.farmjs.dev/docs/integrations/inngest.md): Send typed events to existing Inngest functions, batch them, and inspect runs from Farm. - [Jobs Integration](https://mcp.farmjs.dev/docs/integrations/jobs.md): Define typed job contracts and call existing Trigger.dev tasks or Inngest functions through one Farm API. - [Database and ORM Clients](https://mcp.farmjs.dev/docs/integrations/orm-storage.md): Use relational models through @farming-labs/orm, schema-backed Farm integrations, or an integration's own database adapter. - [Polar Integration](https://mcp.farmjs.dev/docs/integrations/polar.md): Use Polar for products, checkout, customer portals, subscriptions, webhooks, and entitlement-aware app flows. - [Sanity Integration](https://mcp.farmjs.dev/docs/integrations/sanity.md): Read content from Sanity with typed server queries, serve images from the Sanity CDN, and invalidate cached pages the moment an editor publishes. - [Strapi Integration](https://mcp.farmjs.dev/docs/integrations/strapi.md): Read Strapi 5 content with typed server queries, serve generated image variants, and invalidate cached pages after an editor publishes. - [Stripe Integration](https://mcp.farmjs.dev/docs/integrations/stripe.md): Add checkout, portal sessions, billing status, webhooks, product catalogs, metering, and database-backed billing snapshots. - [Trigger.dev Integration](https://mcp.farmjs.dev/docs/integrations/trigger.md): Trigger, schedule, batch, inspect, and cancel existing Trigger.dev tasks through typed Farm callers. - [UI Registry](https://mcp.farmjs.dev/docs/integrations/ui-registry.md): Opt into shadcn-style UI scaffolds for built-in integrations when you want working screens with the integration setup. - [Unkey Integration](https://mcp.farmjs.dev/docs/integrations/unkey.md): Create, verify, revoke, update, and delete API keys, plus protect routes with key verification and rate-limit checks. - [Internationalization](https://mcp.farmjs.dev/docs/internationalization.md): Build localized Farm apps with typed ICU messages, locale-aware routing, request detection, formatting, caching, and RTL from one config. - [Layers](https://mcp.farmjs.dev/docs/layers.md): Compose reusable Farm application directories and packages with predictable project overrides. - [Layouts and Route Boundaries](https://mcp.farmjs.dev/docs/layouts.md): Wrap routes with root and nested layouts, then use loading, error, and not-found files for route-level UX. - [Local-First Patterns](https://mcp.farmjs.dev/docs/local-first.md): Layer local-first behavior over the API you already have: instant cached reads, optimistic writes, retry and reconnect recovery, and an installable offline shell. - [Markdown Mirrors](https://mcp.farmjs.dev/docs/markdown.md): Expose markdown versions of app pages so agents, crawlers, docs tools, and support workflows can read rendered content as text. - [Middleware](https://mcp.farmjs.dev/docs/middleware.md): Run request behavior before routes, pass request-scoped data to pages, and short-circuit with redirects or responses. - [Migrations](https://mcp.farmjs.dev/docs/migrations.md): Move apps from Next.js, TanStack Start, SvelteKit, and Nuxt to Farm with source-specific guides and agent-ready parity references. - [Migrate from Next.js](https://mcp.farmjs.dev/docs/migrations/nextjs.md): Move a Next.js App Router project to Farm: routes, server actions, route handlers, middleware, metadata, and Next.js modules. - [Migrate from Nuxt](https://mcp.farmjs.dev/docs/migrations/nuxt.md): Move a Nuxt application to Farm by mapping Vue pages, layouts, server routes, middleware, data, and runtime configuration. - [Migrate from SvelteKit](https://mcp.farmjs.dev/docs/migrations/sveltekit.md): Move a SvelteKit application to Farm by mapping routes, layouts, load functions, endpoints, hooks, environment variables, and adapters. - [Migrate from TanStack Start](https://mcp.farmjs.dev/docs/migrations/tanstack.md): Move a TanStack Start app to Farm: file routes, the root route, loaders, server functions, and server routes. - [Observability and tracing](https://mcp.farmjs.dev/docs/observability.md): Export OpenTelemetry traces and listen to correlated Farm runtime events in development and production. - [OpenAPI Reference](https://mcp.farmjs.dev/docs/openapi.md): Generate and publish API reference docs from Farm API route metadata, with Scalar-style presentation. - [Plugin Ecosystem](https://mcp.farmjs.dev/docs/plugins.md): Extend Farm's server and browser lifecycle with typed runtime, router, render, build, navigation, and development hooks. - [Bundle Analyzer](https://mcp.farmjs.dev/docs/plugins/analyzer.md): Understand the client and server weight of a Farm production build, connect initial assets to emitted pages, and enforce size limits in CI. - [Blyp](https://mcp.farmjs.dev/docs/plugins/blyp.md): Add request-scoped logging, trace propagation, and Farm lifecycle and browser telemetry with the community-maintained Blyp plugin. - [Client Plugin API](https://mcp.farmjs.dev/docs/plugins/client.md): Define typed hydration, navigation, error, performance, and cleanup hooks directly inside a Farm plugin. - [Content](https://mcp.farmjs.dev/docs/plugins/content.md): Load local Markdown, MDX, JSON, and YAML as schema-validated, typed server content without a second config file. - [Create a Plugin](https://mcp.farmjs.dev/docs/plugins/create-plugin.md): Build a typed Farm plugin with private state, request context, Web Request transforms, and framework lifecycle hooks. - [DevTools](https://mcp.farmjs.dev/docs/plugins/devtools.md): A development workspace for routes, APIs, integrations, runtime diagnostics, and syntax-highlighted browser module inspection. - [Federation Plugin](https://mcp.farmjs.dev/docs/plugins/federation.md): Publish and load independently deployed browser modules while Farm keeps server code and credentials isolated. - [Health Plugin](https://mcp.farmjs.dev/docs/plugins/health.md): Expose dependency-aware liveness, readiness, and startup probes for Farm applications and hosting platforms. - [Hints Plugin](https://mcp.farmjs.dev/docs/plugins/hints.md): Find accessibility, performance, HTML, and third-party script problems while developing a Farm app. - [API MCP](https://mcp.farmjs.dev/docs/plugins/mcp.md): Compose typed API routes, server functions, and standalone tools in one authenticated MCP server. - [MSW Plugin](https://mcp.farmjs.dev/docs/plugins/msw.md): Share Mock Service Worker handlers between Farm development SSR and browser requests without shipping mocks to production. - [Partytown](https://mcp.farmjs.dev/docs/plugins/partytown.md): Move explicitly opted-in third-party scripts off the browser main thread with a typed Farm.js plugin. - [PWA Plugin](https://mcp.farmjs.dev/docs/plugins/pwa.md): Generate a route-aware service worker with safe offline navigation, update prompts, and concise SWR image caching. - [Plugin Tables](https://mcp.farmjs.dev/docs/plugins/schema-tables.md): Let a plugin declare the tables its schema needs, so farm migrate can create them from the schema alone. - [Scripts](https://mcp.farmjs.dev/docs/plugins/scripts.md): Load external browser SDKs with typed handles, deliberate timing, consent gates, dependencies, retries, and Farm lifecycle integration. - [Search Plugin](https://mcp.farmjs.dev/docs/plugins/search.md): Generate a self-hosted, serverless search index from Farm's static pages and query it through a typed browser client. - [Sentry](https://mcp.farmjs.dev/docs/plugins/sentry.md): Report Farm server errors with route context, trace requests, and flush pending Sentry events safely. - [StyleX](https://mcp.farmjs.dev/docs/plugins/stylex.md): Use StyleX in Farm with extracted production CSS, pre-paint development styles, and HMR. - [Sync Plugin](https://mcp.farmjs.dev/docs/plugins/sync.md): Turn a schema into browser-side collections with optimistic writes, offline queueing, and warm starts, backed by your own database. - [WebAssembly Plugin](https://mcp.farmjs.dev/docs/plugins/wasm.md): Import prebuilt WebAssembly modules in browser code and browser workers. - [WebMCP Plugin](https://mcp.farmjs.dev/docs/plugins/webmcp.md): Expose a small, explicit, typed browser tool surface to AI agents with the experimental WebMCP API. - [Instant Preview](https://mcp.farmjs.dev/docs/preview.md): Expose a running local Farm app through a public URL for sharing, webhook testing, OAuth callbacks, mobile QA, and browser automation. - [Project Structure](https://mcp.farmjs.dev/docs/project-structure.md): The compact file layout Farm expects, plus the optional files you add only when the app needs them. - [Query and Params](https://mcp.farmjs.dev/docs/query.md): Parse search params and route params with typed helpers on the server and synchronized state on the client. - [Reference](https://mcp.farmjs.dev/docs/reference.md): A compact map of the main package exports and where to learn more. - [Renderers](https://mcp.farmjs.dev/docs/renderers.md): Choose React, Preact, Solid, Vue, or Svelte for application UI while keeping FARMJS routing, server APIs, middleware, observability, and deployment. - [Preact Renderer](https://mcp.farmjs.dev/docs/renderers/preact.md): Use Preact components, hooks, SSR, streaming, hydration, and typed FARMJS server calls through the @farm.js/preact adapter. - [React Renderer](https://mcp.farmjs.dev/docs/renderers/react.md): Use FARMJS with the default React renderer, including client hooks, streaming SSR, and the experimental AOT compiler. - [Solid Renderer](https://mcp.farmjs.dev/docs/renderers/solid.md): Use Solid components, signals, SSR, and hydration with FARMJS routing and renderer-neutral server primitives. - [Svelte Renderer](https://mcp.farmjs.dev/docs/renderers/svelte.md): Use Svelte 5 components, runes, SSR, hydration, and typed FARMJS server calls through the @farm.js/svelte adapter. - [Vue Renderer](https://mcp.farmjs.dev/docs/renderers/vue.md): Use Vue Single-File Components, SSR, hydration, and typed FARMJS server calls through the @farm.js/vue adapter. - [Route Runtime](https://mcp.farmjs.dev/docs/route-runtime.md): Choose where dynamic pages and API routes execute, inherit deployment defaults from layouts, and set provider duration and region hints. - [Routing](https://mcp.farmjs.dev/docs/routing.md): Farm uses an app directory routing model with static routes, dynamic segments, catch-all routes, and typed navigation. - [Server Queries](https://mcp.farmjs.dev/docs/server-queries.md): Define typed server reads once, deduplicate requests, prefetch browser data, use stale-while-revalidate, and invalidate route, API, and query consumers with one key. - [Rendering Model](https://mcp.farmjs.dev/docs/server-rendering.md): Choose dynamic rendering, static rendering, ISR, or PPR with route-level exports and config. - [Stability and Support](https://mcp.farmjs.dev/docs/stability.md): What Farm 0.1 treats as stable, beta, and experimental, which renderers and deployment targets are verified, and how breaking changes are introduced. - [KV Storage](https://mcp.farmjs.dev/docs/storage.md): Use Farm's key/value API for caches, settings, counters, idempotency records, and object-backed values. - [Product telemetry](https://mcp.farmjs.dev/docs/telemetry.md): Understand and control Farm.js CLI and production-site telemetry. - [Testing](https://mcp.farmjs.dev/docs/testing.md): Test Farm requests, programmatic routes, API endpoints, and server functions with the real framework runtimes. - [Themes](https://mcp.farmjs.dev/docs/themes.md): Configure light, dark, and system color modes with a pre-paint selector, Tailwind variants, and typed client and server APIs. - [Upgrading to 0.1](https://mcp.farmjs.dev/docs/upgrading.md): Move a Farm app from the 0.1.0 betas to the stable 0.1 release: upgrade commands, behavior changes, and deprecated APIs to replace before 0.2.