a web app template with TypeScript + SvelteKit + optional Rust for the fuz-stack
- SvelteKit with Svelte and Vite and optional Rust
- fuz_css: semantic-first CSS framework and design system
- 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 a clean git tree — commit or stash first):
npm run molt # or `cargo molt` — twin implementations, identical resultsIt renames the project, strips the demo components, and deletes itself — see molt below.
Prefer to do it by hand? 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.
molt is a simple wizard that transforms this clone into your own project,
then deletes itself. It ships as twin implementations at full behavior
parity — same flags, same prompts, byte-identical results — so you pick by
toolchain: src/lib/molt.ts runs on the Node you already have, and the
molt crate comes with the template's Rust workspace.
npm run molt # interactive wizard: prompts, prints the full plan, confirms
npm run molt -- check # verify molt's file anchors still match the template
cargo molt # the Rust twin — same flags and behavior
cargo molt checkWhat 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 both of its own implementations (the crate, the script, and its tests)
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
(npm run molt -- --help or cargo molt --help); in that mode nothing is
written without --wetrun. A terminal always confirms before applying, so
the only ungated write path is --wetrun on a clean tree without a terminal.
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 run deploy
# or
gro deploySvelte ∙ SvelteKit ∙ Vite ∙ esbuild ∙ Vitest ∙ TypeScript ∙ ESLint ∙ Prettier ∙ fuz_css ∙ Fuz ∙ Gro ∙ @fuzdev/fuz_util ∙ Zod ∙ & more