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 path | Main APIs | Reference |
|---|---|---|
@effront/core | Application, PageViewTransition | Application, components |
@effront/core/http | toHttpEffect, makeHttpEffect | Native HTTP |
@effront/core/workers | createFetchHandler, WorkersRequestContext, context readers | Fetch and Workers context |
@effront/cloudflare/workers | CloudflareExecutionContext, Cloudflare context readers | Fetch and Workers context |
@effront/server/node | Node.js serve | Node.js / Bun server |
@effront/server/bun | Bun serve | Node.js / Bun server |
@effront/server/assets | withAssets | Node.js / Bun server |
@effront/alchemy/cloudflare | applicationHttpEffect, makeApplicationHttpEffect | Alchemy |
@effront/vite | effront, EffrontViteOptions | Vite and Cloudflare plugins |
@effront/cloudflare | effrontCloudflare, EffrontCloudflareOptions | Vite and Cloudflare plugins |
@effront/server/vite | effrontServer | Node.js / Bun server |
@effront/alchemy/cloudflare/vite | effrontAlchemy | Alchemy |
@effront/markdown | createMarkdownCollection, parseMarkdown, MarkdownError | Markdown |
@effront/tailwind | effrontTailwind | Tailwind |
@effront/markdown/document | MarkdownDocument, MarkdownDocumentProps | Markdown |
@effront/markdown/math | Math | Markdown |
@effront/markdown/mermaid | Mermaid | Markdown |
| @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.
| Member | Result | Reference |
|---|---|---|
Component, Page, Layout, Loading | Rendered content and route UI definitions | Components |
Routes, Middleware | Route groups and scoped request middleware | Routes and Middleware |
ServerFn | Schema-validated Server Functions | ServerFn |
withMiddleware | Derived factories with additional middleware and the same application identity | Application |
make | An application definition, not a running server | Application |
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.