Skip to content

Astro, Svelte, Vite

This site uses Astro and Starlight for documentation, Svelte for interactive components, and Vite as the frontend toolchain.

For the static FrontMark container, the build output is prepared as static files and served by Nginx.

Delivery output

Build toolchain

Interactive islands

Site framework

Content source

provides pages

applies docs UI

mounts islands

serves dev mode

bundles components

generates assets

adds behavior

serves static output

Markdown

Astro

Starlight

Svelte

Vite

HTML · CSS · JS

Nginx

The static container build is a two-stage process. The first stage uses Node to compile the site. The second stage copies only the prepared static output into an Nginx image.

StepWhat happensMain output
Install dependenciesnpm ci installs the locked Node dependencies from package-lock.json.Reproducible build environment.
Resolve build versionThe Docker build computes FRONTMARK_COMMIT_COUNT from Git, unless it is passed as a build argument, then appends it to VERSION.Version metadata available in the generated site.
Build Svelte bundlenpm run svelte:build runs Vite with svelte-components/vite.config.mjs. It compiles Svelte components as an ES module library.public/svelte/frontmark-svelte-components.js and CSS.
Build tag indexnpm run tags scans documentation content and writes the search/tag metadata.public/search/tags.json.
Optimize imagesnpm run optimize prepares optimized image variants and a manifest when image optimization is enabled.public/_optimized/manifest.json and image variants.
Build Astro siteFRONTMARK_RUNTIME=static ... astro build renders Starlight pages, routes, assets and static content. In static mode, the Node adapter is not used.dist/ with static client assets.
Prepare static runtimescripts/prepare-static-runtime.mjs copies the Astro client output into dist/static-root, applies the configured base path, and writes an Nginx config.dist/static-root and dist/nginx.conf.
Assemble runtime imageThe final image is based on nginx:1.27-alpine and copies only dist/static-root, dist/nginx.conf and VERSION.Small static container listening on port 4321.
ToolPrecise role in this build
AstroConverts Markdown/Starlight content and configured routes into static HTML and assets.
StarlightProvides the documentation shell, navigation, table of contents and docs-oriented rendering.
SvelteProvides interactive components that are compiled before the Astro build consumes them.
ViteBundles the Svelte component library and also powers Astro’s frontend asset pipeline.
NginxServes the prepared static root; no Node server is required in the final image.

Astro logo

Astro is the site framework used to assemble pages, layouts, content collections and static routes.

In the sigMAX website, Astro is responsible for:

  • rendering documentation pages from Markdown and MDX-style content;
  • organizing routes such as documentation, tags and product pages;
  • integrating Starlight for the documentation experience;
  • producing static assets that can be served by Nginx or another web server.

Astro is a good fit when most pages are content-driven and only specific parts of the page need interactivity.

Common alternatives include:

AlternativeTypical use
Next.jsReact applications with server rendering, API routes and broad ecosystem support
NuxtVue applications with server rendering and convention-based routing
EleventyStatic documentation or content sites with a smaller runtime surface
DocusaurusDocumentation portals with React-based customization

Svelte logo

Svelte is the component framework used when a page needs client-side interaction.

In the sigMAX website, Svelte can be used for:

  • interactive widgets;
  • generated frontend components;
  • local state and user interactions;
  • focused UI islands inside mostly static documentation pages.

Svelte compiles components ahead of time, which keeps the browser payload small for interactive areas.

Common alternatives include:

AlternativeTypical use
ReactLarge component ecosystems and broad team familiarity
VueProgressive adoption and template-oriented components
SolidFine-grained reactivity with a JSX-oriented model
Web ComponentsFramework-independent reusable browser components

Vite logo

Vite is the frontend build tool used by Astro and the local development workflow.

In the sigMAX website, Vite is responsible for:

  • fast local development;
  • module resolution and dependency handling;
  • bundling frontend assets;
  • optimizing JavaScript, CSS and imported resources for production.

Vite is not the application framework. It is the build and development layer underneath the frontend stack.

Common alternatives include:

AlternativeTypical use
WebpackMature bundling setups with extensive legacy plugin support
RollupLibrary-oriented bundling and fine control over output
esbuildVery fast low-level JavaScript and TypeScript bundling
ParcelZero-config application bundling