a static web app template with optional Rust for the fuz-stack
- SvelteKit with Svelte and Vite and optional Rust
- fuz_css: CSS framework and design system based on style variables
- fuz_ui:
- Svelte UI library - ui.fuz.dev
- is optional, to remove,
npm uninstall @fuzdev/fuz_uiand delete the imports
- Gro:
- extends SvelteKit and Vite
- integrated TypeScript with Svelte and svelte-check
- testing with Vitest
- formatting with Prettier
- linting with ESLint
and
@ryanatkn/eslint-config - also has a task system with a bunch of builtins, codegen, and other things
- optional utilities library
@fuzdev/fuz_util
This project uses SvelteKit with the static adapter
and Vite,
so the normal commands like vite dev work as expected.
It also uses Gro
for tasks like deploying and more.
If you're logged into GitHub, click "Use this template" above, or clone directly:
git clone https://github.com/fuzdev/fuz_template.git cooltoy
cd cooltoy
npm i
# then
vite dev
# or
npm run dev
# or
gro dev # npm i -g @fuzdev/gro
gro sync # called by `gro dev`, refreshes generated files and calls `svelte-kit sync`Windows will not be supported because I chose Bash instead - Fuz recommends WSL
The template includes
@sveltejs/adapter-static
so it can deploy
with no further configuration.
To learn how to swap it out for another deployment target, see
the SvelteKit adapter docs.
To make it your own, run the molt wizard (requires Rust and a clean git tree — commit or stash first):
cargo moltIt renames the project, strips the demo components, and deletes itself — see molt below.
Prefer to do it by hand (or skip installing Rust)? Change @fuzdev/fuz_template
and template.fuz.dev to your project name in the following files:
package.json— also remove or replace theglyph,logo, andlogo_altfieldssrc/routes/+layout.sveltesrc/routes/+page.sveltesrc/routes/about/+page.svelte- update or delete
static/CNAME, ./.github/FUNDING.yml, and ./.github/ISSUE_TEMPLATE/
And to remove the Rust workspace, delete Cargo.toml, Cargo.lock, crates/,
.cargo/, rust-toolchain.toml, clippy.toml, and the rust job in
.github/workflows/check.yml.
To remove the docs system, delete src/routes/docs/ and
src/routes/library.ts, remove the docs link in
src/routes/+page.svelte, and drop the
svelte-docinfo devDependency along with its wiring in
vite.config.ts and src/app.d.ts.
Then run npm i to update package-lock.json.
The template is MIT-licensed (LICENSE, plus license fields in
package.json and Cargo.toml), copyright fuz.dev — to keep MIT for your
project, replace the copyright holder with your own; or swap in
another license.
The template doubles as a Rust workspace, and crates/fuz_template is
molt, a simple wizard that transforms this clone into your own project,
then deletes itself.
cargo molt # interactive wizard: prompts, prints the full plan, confirms
cargo molt check # verify molt's file anchors still match the templateWhat it does, driven by your answers:
- renames the project everywhere (
package.json, page titles, headings) - updates or removes
static/CNAME,homepage, andrepository - deletes the demo components and writes a minimal starting page
- regenerates
README.mdandCLAUDE.mdfor your project - deletes the template's MIT
LICENSEandlicensefields — your project chooses its own license - keeps or strips each optional feature —
rust(the whole workspace),cli(the starter crate atcrates/app_cli, renamed to your project name),docs(the docs system), andgithub-extras(funding + issue templates, personalized when kept) — via prompts or--keep/--striplists (e.g.--strip rustor--keep github-extras --strip docs); strippingclialone is rejected — a kept workspace needs a crate - deletes its own crate
It refuses to run without a clean git tree, so an applied plan can be undone
with git reset --hard && git clean -fd (the tree was clean, so git clean
removes only files molt created). --force lets a dirty tree through for planning,
but applying to a dirty tree always requires an interactive confirmation —
without a terminal it refuses (exit 2), because there'd be no clean undo
point. Run with flags instead of prompts for non-interactive use
(cargo molt --help); in that mode nothing is written without --wetrun.
npm run build
# or
gro buildSee Gro's build docs for more.
npm test
# or
gro test
gro test filepattern1 filepatternB
gro test -- --forwarded-args 'to vitest'See Vitest,
src/test/example.test.ts,
and Gro's test docs for more.
Deploy
(build, commit, and push) to the deploy branch, e.g. for GitHub Pages:
npm i -D @sveltejs/package # enables Gro's library plugin by default
npm run deploy
# or
gro deploySvelte ∙ SvelteKit ∙ Vite ∙ esbuild ∙ Vitest ∙ TypeScript ∙ ESLint ∙ Prettier ∙ fuz_css ∙ Fuz ∙ Gro ∙ @fuzdev/fuz_util ∙ Zod ∙ & more