An extremely shiny React app starter featuring:
- TanStack Start + Router + Query
- Package management, TS scripting with Bun
- Deployed to a Bun server
- Integrated WASM library with Rust and wasm-bindgen
- Styling with TailwindCSS
- Formatting + linting with Biome
- Project dependencies managed by asdf
- Dockerized deployment (I recommend fly.io)
To use this template as intended, you'll need all the following installed:
- asdf (+ run
asdf plugin add bun
) - Bun (via asdf, run
asdf install
) - Biome.js IDE integration
- Fly.io account & flyctl (or your preferred hosting provider)
- chromedriver (
brew install --cask chromedriver --no-quarantine
) - Rust (via rustup)
- wasm-bindgen-cli + wasm-pack
All of the above assumes macOS. Where I've not included links to installation, please refer to a search engine for the relevant instructions for your machine.
- Rename root directory, replace all uses of "tanstack-bun-wasm-starter" name.
- Rename WASM crate directory - replace all uses of "acrate" name.
- Replace my name with your own in maintainers, author, in package.json and Cargo.toml.
- Replace "yourdomain.com" with your actual domain in robots.txt and sitemap.xml (BYO DNS config, see fly certs.
- Run
bun run setup
- If all's well run
bun run dev
- Happy coding ✌️
I deploy this to Fly.io, so these instructions will be specific. I've intentionally not included the autogenerated fly.toml
file in this repository so you can generate it yourself:
- Create an account with Fly.io
- Install flyctl and authenticate.
- Run
flyctl launch
from the root directory and follow the prompts. - Deploy with
flyctl deploy
.
Note that flyctl launch
will also generate a GitHub Action for deployment. Be sure to note down the FLY_API_TOKEN
and save it to your repo action secrets if you'd like to automate deployments this way.