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.
Astro: Creating Astro Sites
Section titled “Astro: Creating Astro Sites”const site = yield* Archil.Website.Astro("Web", { rootDir: "./app",});Astro: Static Sites
Section titled “Astro: Static Sites”const site = yield* Archil.Website.Astro("Docs", { rootDir: "./docs", astro: { output: "static" }, assets: { notFoundHandling: "404-page" },});Foldkit
Section titled “Foldkit”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.
Foldkit: Creating a Website
Section titled “Foldkit: Creating a Website”const site = yield* Archil.Website.Foldkit("Web", { rootDir: "./app",});Foldkit: Server Configuration
Section titled “Foldkit: Server Configuration”const site = yield* Archil.Website.Foldkit("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com" },});Nextjs
Section titled “Nextjs”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.
Nextjs: Creating Next.js Sites
Section titled “Nextjs: Creating Next.js Sites”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").
Nuxt: Creating Nuxt Sites
Section titled “Nuxt: Creating Nuxt Sites”const site = yield* Archil.Website.Nuxt("Web", { rootDir: "./app",});Octane
Section titled “Octane”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.
Octane: Creating Octane Sites
Section titled “Octane: Creating Octane Sites”const site = yield* Archil.Website.Octane("Web", { rootDir: "./app",});ReactRouter
Section titled “ReactRouter”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.
ReactRouter: Creating React Router Sites
Section titled “ReactRouter: Creating React Router Sites”const site = yield* Archil.Website.ReactRouter("Web", { rootDir: "./app",});ReactRouter: Server Configuration
Section titled “ReactRouter: Server Configuration”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
export function loader() { return { apiBase: process.env.API_BASE ?? "unset" };}SolidStart
Section titled “SolidStart”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.
SolidStart: Creating SolidStart Sites
Section titled “SolidStart: Creating SolidStart Sites”const site = yield* Archil.Website.SolidStart("Web", { rootDir: "./app",});SolidStart: Server Configuration
Section titled “SolidStart: Server Configuration”const site = yield* Archil.Website.SolidStart("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com", },});SolidStart: Prerendering
Section titled “SolidStart: Prerendering”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"] } },});StaticSite
Section titled “StaticSite”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.
StaticSite: Basic Usage
Section titled “StaticSite: Basic Usage”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,});StaticSite: Building from a Subdirectory
Section titled “StaticSite: Building from a Subdirectory”const site = yield* Archil.Website.StaticSite("Web", { cwd: "apps/web", command: "npm run build", outdir: "dist",});StaticSite: Local Development
Section titled “StaticSite: Local Development”const site = yield* Archil.Website.StaticSite("App", { command: "npm run build", outdir: "dist", dev: { command: "npm run dev" },});SvelteKit
Section titled “SvelteKit”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.
SvelteKit: Creating SvelteKit Sites
Section titled “SvelteKit: Creating SvelteKit Sites”const site = yield* Archil.Website.SvelteKit("Web", { rootDir: "./app",});TanStackStart
Section titled “TanStackStart”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",});TanStackStart: Server Configuration
Section titled “TanStackStart: Server Configuration”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
const getApiBase = createServerFn({ method: "GET" }).handler(() => ({ apiBase: process.env.API_BASE,}));Vinext
Section titled “Vinext”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.
Vinext: Creating vinext Sites
Section titled “Vinext: Creating vinext Sites”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.
Vite: Creating Vite Sites
Section titled “Vite: Creating Vite Sites”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 });Vite: Multi-Page Sites
Section titled “Vite: Multi-Page Sites”const site = yield* Archil.Website.Vite("Docs", { assets: { notFoundHandling: "404-page" },});Vite: Build Configuration
Section titled “Vite: Build Configuration”const site = yield* Archil.Website.Vite("Docs", { outDir: "build", base: "/docs/",});Vite: Local Development
Section titled “Vite: Local Development”// `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: Creating Vocs Sites
Section titled “Vocs: Creating Vocs Sites”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/).
Waku: Creating Waku Sites
Section titled “Waku: Creating Waku Sites”const site = yield* Archil.Website.Waku("Web", { rootDir: "./app",});