Official website scaffold for Whisker.
- TanStack Start
- React
- Tailwind CSS v4
- Cloudflare Workers
- Bun
bun run dev
bun run build
bun run test
bun run deploybun run deploy builds the app and deploys it with Wrangler.
This project was scaffolded with:
npx @tanstack/cli@latest create my-tanstack-app --agentAfter scaffolding, these commands were run:
npx @tanstack/intent@latest install
npx @tanstack/intent@latest listThe project now uses Bun. Before substantial TanStack-specific changes, load
the relevant local Intent skill as described in AGENTS.md.
No application-specific environment variables are required yet.
For Cloudflare Workers, set secrets with:
bunx wrangler secret put NAMEPublic Worker vars can be added to wrangler.jsonc under vars when needed.
Avoid module-scope process.env for Cloudflare runtime values.
Authenticate Wrangler before the first deploy:
bunx wrangler loginThen deploy:
bun run deployThe standalone Web app is served at /examples/chat/. Its production HTML,
JavaScript, and WebAssembly are checked into public/examples/chat, so normal
website builds and deployments do not require the Rust toolchain.
To refresh it, build Chat in the adjacent Whisker checkout and copy its output:
(cd ../whisker && cargo run -p whisker-cli --bin whisker -- build web --manifest-path examples/chat/Cargo.toml)
cp ../whisker/examples/chat/gen/web/dist/{index.html,whisker_app.js,whisker_app_bg.wasm} public/examples/chat/
bun run buildThe deployment path is configured with web.base_path("/examples/chat/") in
Chat's whisker.rs. API keys are entered by visitors; no credentials are needed
for the build.
public/_redirects uses exact rules for the JavaScript and WebAssembly files
before the wildcard that serves the app document under /examples/chat/.
New screens need no additional rewrite rules. If the build adds or renames an
asset, update its exact rule too; otherwise the SPA fallback will serve HTML
instead of that asset. public/_headers requires
revalidation of the app's stable asset filenames. To test these hosting rules
locally, use bunx wrangler dev --config dist/server/wrangler.json --local after
building the website.
The whisker-scene demo is served at /examples/commitcity/ and is checked
into public/examples/commitcity the same way. It has a single screen, so it
needs only the trailing-slash redirect in public/_redirects. To refresh it:
(cd ../whisker && cargo run -p whisker-cli --bin whisker -- build web --manifest-path examples/commitcity/Cargo.toml)
cp ../whisker/examples/commitcity/gen/web/dist/{index.html,whisker_app.js,whisker_app_bg.wasm} public/examples/commitcity/
bun run buildIts WebAssembly is about 17 MB because the Meshy-generated building models are embedded in it, which stays under Cloudflare's 25 MiB per-asset limit.
The whisker-map demo is served at /examples/livecities/ and is checked into
public/examples/livecities the same way, with the four face icons it loads as
assets. It also has a single screen. Its map tiles, glyphs and sprites come
from OpenFreeMap at runtime. To refresh it:
(cd ../whisker && cargo run -p whisker-cli --bin whisker -- build web --manifest-path examples/livecities/Cargo.toml)
cp ../whisker/examples/livecities/gen/web/dist/* public/examples/livecities/
bun run buildIts WebAssembly, with the four avatar models embedded, is about 13 MB, under Cloudflare's 25 MiB per-asset limit.