API reference

API reference

Find public import paths, application factory APIs, and dependency compatibility requirements.

Effront separates application APIs from host adapters and build integrations. Use @effront/core to define pages, routes, services, and Server Functions. Choose the other packages for hosting, Markdown, or styling.

Public API map

Import pathMain APIsReference
@effront/coreApplication, PageViewTransitionApplication, components
@effront/core/httptoHttpEffect, makeHttpEffectNative HTTP
@effront/core/workerscreateFetchHandler, WorkersRequestContext, context readersFetch and Workers context
@effront/cloudflare/workersCloudflareExecutionContext, Cloudflare context readersFetch and Workers context
@effront/server/nodeNode.js serveNode.js / Bun server
@effront/server/bunBun serveNode.js / Bun server
@effront/server/assetswithAssetsNode.js / Bun server
@effront/alchemy/cloudflareapplicationHttpEffect, makeApplicationHttpEffectAlchemy
@effront/viteeffront, EffrontViteOptionsVite and Cloudflare plugins
@effront/cloudflareeffrontCloudflare, EffrontCloudflareOptionsVite and Cloudflare plugins
@effront/server/viteeffrontServerNode.js / Bun server
@effront/alchemy/cloudflare/viteeffrontAlchemyAlchemy
@effront/markdowncreateMarkdownCollection, parseMarkdown, MarkdownErrorMarkdown
@effront/tailwindeffrontTailwindTailwind
@effront/markdown/documentMarkdownDocument, MarkdownDocumentPropsMarkdown
@effront/markdown/mathMathMarkdown
@effront/markdown/mermaidMermaidMarkdown

| @effront/core/query | query, queryAtom, stream, streamAtom, typed Server Function errors | Query Server Functions, Stream Server Functions |

Runtime imports from @effront/core require the react-server condition. Keep them in the application graph configured by effront(), not in a host process with react-server enabled globally. For application setup, refer to Getting started and Platforms.

Application factory index

Application.effront<Services>() returns these factories and methods. Related definitions must share one factory instance or a derivative from withMiddleware.

MemberResultReference
Component, Page, Layout, LoadingRendered content and route UI definitionsComponents
Routes, MiddlewareRoute groups and scoped request middlewareRoutes and Middleware
ServerFnSchema-validated Server FunctionsServerFn
withMiddlewareDerived factories with additional middleware and the same application identityApplication
makeAn application definition, not a running serverApplication

Dependency compatibility

Install packages by name without version suffixes in ordinary setup commands. Use the installed Effront packages' peerDependencies as the source of supported dependency ranges instead of a copied version table. Keep Effront package versions aligned, including optional adapters and integrations, and retain the application lockfile for reproducible installation. React and React DOM must match, and the RSC transport supplied by @vitejs/plugin-rsc must be compatible with that React installation. Effront's page transitions use ViewTransition and addTransitionType. Keep one coherent Effect installation across the application and host-specific Effect packages. Before upgrading Alchemy, check the installed adapter's peer requirements and integration compatibility notes. Vite integrations declare a public Vite peer dependency of *. The setup guides use VitePlus.