Skip to content

Archil.Website reference

Source: packages/archil/src/Website/Astro.ts

Deploy an Astro application to an Archil sandbox: the Node adapter bundle as the sandbox’s program on port 3000, static assets uploaded with the program. Pages render on demand by default (output: "server"); output: "static" in your astro.config.* or astro: { output: "static" } prerenders every page and deploys assets-only.

The build runs through @alchemy.run/frontend-frameworks/astro with the @alchemy.run/frontend-frameworks/astro/node deploy target. Your astro.config.* must not declare an adapter.

const site = yield* Archil.Website.Astro("Web", {
rootDir: "./app",
});
const site = yield* Archil.Website.Astro("Docs", {
rootDir: "./docs",
astro: { output: "static" },
assets: { notFoundHandling: "404-page" },
});

Source: packages/archil/src/Website/Foldkit.ts

Deploy a Foldkit application to an Archil sandbox. Browser-only apps use SPA routing. With ssr.build enabled in the Foldkit Vite plugin, prerendered pages and assets are served first, followed by Foldkit’s generated request handler for SSR and hybrid routes.

The build uses @alchemy.run/frontend-frameworks/foldkit and the project’s Vite configuration. No application adapter is required. Native Foldkit development and live reload run without cloud resources; Alchemy.remote() opts into a live deployment during development.

const site = yield* Archil.Website.Foldkit("Web", {
rootDir: "./app",
});
const site = yield* Archil.Website.Foldkit("Web", {
rootDir: "./app",
env: { API_BASE: "https://api.example.com" },
});

Source: packages/archil/src/Website/Nextjs.ts

Deploy a Next.js application to an Archil sandbox: next build then a long-running next({ dev: false }) program on port 3000. Does not use OpenNext (those wrappers are Lambda/workerd).

The .next output (and public/ when present) is packed into the program’s files. next, react, and react-dom are installed next to the program with npm install rather than bundled.

During alchemy dev the site is next dev and no cloud resources are declared; Alchemy.remote() opts back into the live sandbox.

const site = yield* Archil.Website.Nextjs("Web", {
rootDir: "./app",
});

Source: packages/archil/src/Website/Nuxt.ts

Deploy a Nuxt application to an Archil sandbox: the nitro Node server as the sandbox’s program on port 3000, static assets uploaded with the program.

The build runs through @alchemy.run/frontend-frameworks/nuxt with the @alchemy.run/frontend-frameworks/nuxt/node deploy target (nitro.preset "node").

const site = yield* Archil.Website.Nuxt("Web", {
rootDir: "./app",
});

Source: packages/archil/src/Website/Octane.ts

Deploy an OctaneJS application to an Archil sandbox: Octane’s SSR server as the sandbox’s program on port 3000, static assets uploaded with the program.

Archil.Website.Octane selects hosting and automatically wraps Octane’s default native Node output. Keep compiler and route settings in octane.config.ts without an adapter. The legacy Node marker adapter remains optional for existing projects.

const site = yield* Archil.Website.Octane("Web", {
rootDir: "./app",
});

Source: packages/archil/src/Website/ReactRouter.ts

Deploy a React Router v7 app (framework mode) to an Archil sandbox: the SSR server as the sandbox’s program on port 3000, static assets uploaded with the program.

The build runs through @alchemy.run/frontend-frameworks/react-router with the @alchemy.run/frontend-frameworks/react-router/node deploy target — both must be installed in your project, alongside @react-router/dev, react-router, and vite.

Your vite.config.ts needs no adapter wiring. React Router’s server build is a ServerBuild manifest rather than a request handler, so the integration makes the server pass’s build input a module that wraps the manifest with createRequestHandler and packages the resulting fetch handler as a Node HTTP server.

React Server Components (React Router’s unstable RSC plugin) and multi-environment builds are not supported yet — the build fails with an actionable error when more than one server entry is emitted.

const site = yield* Archil.Website.ReactRouter("Web", {
rootDir: "./app",
});

Process Environment

const site = yield* Archil.Website.ReactRouter("Web", {
rootDir: "./app",
env: {
API_BASE: "https://api.example.com",
},
});

Read An Environment Variable From A Loader

app/routes/home.tsx
export function loader() {
return { apiBase: process.env.API_BASE ?? "unset" };
}

Source: packages/archil/src/Website/SolidStart.ts

Deploy a SolidStart application to an Archil sandbox: the SSR server as the sandbox’s program on port 3000, static assets (prerendered pages included) uploaded with the program.

The build runs through @alchemy.run/frontend-frameworks/solidstart with the @alchemy.run/frontend-frameworks/solidstart/node deploy target — both must be installed in your project, alongside @solidjs/start and @solidjs/vite-plugin-nitro-2.

Your vite.config.ts needs no adapter wiring: the integration drives the project’s own vite build and appends its own nitro plugin instance carrying nitro’s node preset.

const site = yield* Archil.Website.SolidStart("Web", {
rootDir: "./app",
});
const site = yield* Archil.Website.SolidStart("Web", {
rootDir: "./app",
env: {
API_BASE: "https://api.example.com",
},
});

The integration owns the nitro plugin instance (a nitroV2Plugin() in your vite.config.* is rejected), so nitro options — prerendering included — go on the nitro prop. Prerendered pages are uploaded with the program and served as static assets.

const site = yield* Archil.Website.SolidStart("Web", {
rootDir: "./app",
nitro: { prerender: { routes: ["/", "/about"] } },
});

Source: packages/archil/src/Website/StaticSite.ts

Static files built by a shell command, served from an Archil sandbox by a small static-file server (GET assets, /health, optional SPA or 404 page) on a public https:// URL. A request to a stopped sandbox starts it again in a few seconds.

Use this when your site has its own build step: Hugo, Zola, Eleventy, or any custom pipeline. For Vite projects, prefer Archil.Website.Vite.

Deploying a Hugo site

const site = yield* Archil.Website.StaticSite("Blog", {
command: "hugo --minify",
outdir: "public",
});

SPA-style routing

const site = yield* Archil.Website.StaticSite("App", {
command: "npm run build",
outdir: "dist",
spa: true,
});
const site = yield* Archil.Website.StaticSite("Web", {
cwd: "apps/web",
command: "npm run build",
outdir: "dist",
});
const site = yield* Archil.Website.StaticSite("App", {
command: "npm run build",
outdir: "dist",
dev: { command: "npm run dev" },
});

Source: packages/archil/src/Website/SvelteKit.ts

Deploy a SvelteKit application to an Archil sandbox: kit’s SSR server as the sandbox’s program on port 3000, static assets (prerendered pages included) uploaded with the program.

The build runs through @alchemy.run/frontend-frameworks/sveltekit with the @alchemy.run/frontend-frameworks/sveltekit/node deploy target.

const site = yield* Archil.Website.SvelteKit("Web", {
rootDir: "./app",
});

Source: packages/archil/src/Website/TanStackStart.ts

Deploy a TanStack Start application to an Archil sandbox: the SSR server as the sandbox’s program on port 3000, static assets uploaded with the program.

The build runs through @alchemy.run/frontend-frameworks/tanstack-start with the @alchemy.run/frontend-frameworks/tanstack-start/node deploy target — both must be installed in your project, alongside @tanstack/react-start (or @tanstack/solid-start) and vite.

Your vite.config.ts needs no adapter wiring: TanStack Start is pure Vite, so the integration drives the project’s own vite build, forces the SSR bundle to be self-contained, and wraps its fetch handler as a Node HTTP server.

TanStackStart: Creating TanStack Start Sites

Section titled “TanStackStart: Creating TanStack Start Sites”
const site = yield* Archil.Website.TanStackStart("Web", {
rootDir: "./app",
});

Process Environment

const site = yield* Archil.Website.TanStackStart("Web", {
rootDir: "./app",
env: {
API_BASE: "https://api.example.com",
},
});

Read An Environment Variable From A Server Function

src/routes/index.tsx
const getApiBase = createServerFn({ method: "GET" }).handler(() => ({
apiBase: process.env.API_BASE,
}));

Source: packages/archil/src/Website/Vinext.ts

Deploy a vinext application to an Archil sandbox: vinext’s Vite build then a long-running startProdServer program on port 3000. Does not use the Cloudflare Worker entry (vinext/server/fetch-handler).

The dist/ output is packed into the program’s files. vinext, react, react-dom, and react-server-dom-webpack are installed next to the program with npm install rather than bundled.

During alchemy dev the site is vinext dev and no cloud resources are declared; Alchemy.remote() opts back into the live sandbox.

Basic vinext App

const site = yield* Archil.Website.Vinext("Web", {
rootDir: "./app",
});

Redis data cache

ISR / "use cache" default to in-process memory. Set env.REDIS_URL on this resource for a durable Redis store; the adapter is injected automatically.

const site = yield* Archil.Website.Vinext("Web", {
env: {
REDIS_URL: "redis://cache.internal:6379",
},
});

Source: packages/archil/src/Website/Vite.ts

Deploy a plain Vite application to an Archil sandbox: vite build output served by a static-file program on port 3000. For client-only projects — React/Vue/Solid SPAs, index.html multi-page apps — whose entire deployable output is static assets.

The build runs through @alchemy.run/frontend-frameworks/vite with the @alchemy.run/frontend-frameworks/vite/node deploy target — the package must be installed in your project. During alchemy dev the site is Vite’s own dev server and no cloud resources are created.

Basic Vite SPA

const site = yield* Archil.Website.Vite("Web");

Project in a Subdirectory

const site = yield* Archil.Website.Vite("Web", {
rootDir: "./app",
});

An Existing Sandbox

const box = yield* Archil.Sandbox("Box", { vcpuCount: 2 });
const site = yield* Archil.Website.Vite("Web", { sandbox: box });
const site = yield* Archil.Website.Vite("Docs", {
assets: { notFoundHandling: "404-page" },
});
const site = yield* Archil.Website.Vite("Docs", {
outDir: "build",
base: "/docs/",
});
// `alchemy dev` starts `vite` programmatically: site.url is the local
// dev server (HMR included); no sandbox is created.
const site = yield* Archil.Website.Vite("Web");

Source: packages/archil/src/Website/Vocs.ts

Deploy a Vocs documentation project to an Archil sandbox. Static assets first, then Vocs’ Waku RSC handler (/about → about/index.html, otherwise SSR).

Vocs Documentation Site

const docs = yield* Archil.Website.Vocs("Docs", {
rootDir: "./docs",
});

Custom Output Directory

const docs = yield* Archil.Website.Vocs("Docs", {
rootDir: "./docs",
outDir: "build",
});

Source: packages/archil/src/Website/Waku.ts

Deploy a Waku application to an Archil sandbox: the RSC server as the sandbox’s program on port 3000, static assets (SSG pages included) uploaded with the program. Prerendered pages are served extensionless (/about not /about/).

const site = yield* Archil.Website.Waku("Web", {
rootDir: "./app",
});