This site is built with TanStack Start!
This template uses the following tools:
- Bun as the package manager
- Biome as the linter & formatter
- Lefthook as the git hooks manager
- Tailwind CSS as the CSS framework
We use Alchemy to be orchestrate the deployment on Cloudflare with a KV & a D1 Database ready to be used.
Tip
Looking for a simpler template? Checkout the Start Basic template.
To setup a project from this template, the simplest way is to use gitpick:
git clone https://github.com/depsimon/tanstack-start-cf.git my-app
cd my-app
bun install
bun run deploy # Initial deployment of resources, required to use the bindings locally
bun db:migrate # Apply migrations locally
From your terminal:
bun dev
This starts your app in development mode, rebuilding assets on file changes.
When you're ready to deploy, you can run:
bun run deploy
By default, this will deploy a dev version of your app.
If you want to deploy a different version, the deployment accepts a STAGE
env that you can use to deploy any branch/environment.
bun run deploy # Will deploy resources in a `dev` namespace
STAGE=prod bun run deploy # Will deploy resources in a `prod` namespace
STAGE=staging bun run deploy # Will deploy resources in a `staging` namespace
By default the state of your resources is stored in the file system of your project.
You can change that by using another state storage like Durable Objects.
You can easily do that by adding a few env variables or by copying the .env.example
to .env
and adapting the values.