TanStart Barren
March 19, 2026 ยท View on GitHub
๐ฅ๏ธ Boilerplate for ๐๏ธ TanStack Start.
This boilerplate is part of a family of boilerplates:
| Boilerplate / Starter kit | Description |
|---|---|
| Tanstart A. J. Jolly | Static site boilerplate for Tanstack Start. |
| Tanstart Barren | Barebones boilerplate with Tanstack Start and basic Better Auth with password auth. Log in/sign on pages, dashboard and home page. |
| Tanstart Cumberland | Starter kit that expands Tanstart Barren with Better Auth with organizations, account and admin screens, email, side bar for navigation and layout examples. |
| Tanstart Dale Hollow | Starter kit that expands Tanstart Cumberland with maptiler maps and mastra. Not published yet. |
| Tanstart Eddy | Starter kit that expands Tanstart Dale Hollow with examples of CRUD functionality. |
| Tanstart Eddy Playwright | E2E tests for Tanstart Eddy. |
Features:
-
Server:
- Bun - Bun is a fast, incrementally adoptable all-in-one JavaScript, TypeScript & JSX toolkit.
React - The library for web and native user interfaces.
React Compiler - React Compiler is a new build-time tool that automatically optimizes your React app.
Vite - The Build Tool for the Web.
Nitro - Nitro extends your Vite application with a production-ready server, compatible with any runtime.
-
Linting and formatting:
-
TanStack:
TanStack Start
TanStack Router
TanStack Query
TanStack Form
- TanStack DevTools - form, query, router;
-
Data:
- PostgreSQL - The World's Most Advanced Open Source Relational Database.
Drizzle ORM - ORM for you to
settleship ship ship.Better Auth
Zod - TypeScript-first schema validation with static type inference.
-
Client/UI:
redaxios - Axios has a great API that developers love. Redaxios provides that API in 800 bytes, using native fetch().
Tailwind CSS - Rapidly build modern websites without ever leaving your HTML. A utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup.
Shadcn - The Foundation for your Design System. A set of beautifully designed components that you can customize, extend, and build on. Start here then make it your own. Open Source. Open Code.
Base UI - Unstyled UI components for building accessible user interfaces.
Development Setup
Clone The Repository
git clone https://github.com/thelordoftheboards/tanstart-barren.git
or
git clone https://github.com/thelordoftheboards/tanstart-cumberland.git
or
git clone https://github.com/thelordoftheboards/tanstart-eddy.git
Install Dependencies
bun i
Create a Database
Postgres 18 with vector extensions is required. You can set up your own database, or use docker compose as described:
-
Use
doc/standalone-db.env.exampleto createdevconfig/standalone-db.env. -
Using the setting you specified for
PROJECT_NAME, create a docker network:
docker network create ${PROJECT_NAME}-standalone-db-network
Example for PROJECT_NAME being my-project:
docker network create my-project-standalone-db-network
- Compose up the database container:
bun compose:db:up
Create an .env File
Use example doc/.env.example. If using the provided copose postgres container, the DATABASE_URL will be:
DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_EXPOSED_PORT}/${POSTGRES_DB}
for instance
DATABASE_URL=postgresql://user:password@localhost:5432/database-name
Generate the schema to your database with drizzle-kit:
bun db:generate
You can also push the schema to your database with drizzle-kit:
bun db:push
Alternatively, if the environment variable DATABASE_AUTOMATIC_MIGRATIONS=enabled, the application will perform migrations when started in development mode, or upon the first request that is recevied in production. For more details Drizzle Migrations.
Run the development server:
bun dev
The development server should now be running at http://localhost:8088.
Deploying to production
The vite config is currently configured to use Nitro v3 (nightly) to deploy on Vercel, but can be easily switched to other providers.
Refer to the TanStack Start hosting docs for deploying to other platforms.
Using Docker
Create docker-settings.sh following the example in docker-settings.sh.example.
Scripts:
docker:setup- Creates common docker objects used by the project. Run once before using the other scripts.ocker:build- Builds a dockerized version of the application.docker:run- Runs the built version.compose:db:up- Starts a database that can be used bybun run.compose:db:down- Destroys the database used bybun run.compose:full:up- Starts the database and app server together.compose:full:down- Destroys the database and app server together.docker:remove- Removes (some) of the docker objects created for the project.
Deploying using Dokploy
In addition to the using variables in .env add the following to the environment settings, where the domain is specified to be the domain you will be serving from:
NODE_ENV=production
SERVER_HOST=example.com
For the database server the recommended image is pgvector/pgvector:pg18 and the the mount /var/lib/postgresql
Issue watchlist
- Router/Start issues - TanStack Start is in RC.
- Devtools releases - TanStack Devtools is in alpha and may still have breaking changes.
- Vite 8 beta - We're using Vite 8 beta which is powered by Rolldown.
- Nitro v3 nightly - The template is configured with Nitro v3 alpha by default, read the nightly documentation.
Scripts
We use bun by default, but you can modify these scripts in package.json to use your preferred package manager.
auth:generate- Regenerate the auth db schema if you've made changes to your Better Auth config. Notice that the IDs have been changed to uuid manually, and if you want to keep them that way you would have to re-do the process.db- Run drizzle-kit commands. (e.g.bun db generate,bun db studio)ui- The shadcn/ui CLI. (e.g.bun ui add button)format,lint,check-types- Run biome, and check TypeScript types respectively.check- Run all three above. (e.g.bun check)
Using Local Tunnel
In order to expose the development server over https to the world using localtunnel update devconfig/localtunnel-settings.sh using the example from localtunnel-settings.sh.example :
LOCALTUNNEL_SUBDOMAINis the subdomain argument that is passed to local tunnel. Notice that if it is taken localtunnel might provide an alternative subdomain.SERVER_HOSTis the URL where it has the subdomain prepended, essentially${LOCALTUNNEL_SUBDOMAIN}.loca.lt.
Use one of the following scripts:
lt- serve through localtunnel in a separate process.dev-lt- run development concurrently with serving through localtunnel, might have issues.start-lt- run development concurrently with serving through localtunnel, should perform well.
License
Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.
Also check out
- TanStack Start - Official website.
- @tanstack/create-start - The official CLI tool from the TanStack team to create Start projects.
- awesome-tanstack-start - A curated list of awesome resources for TanStack Start.
- React TanStarter by dotnize - minimalist starter project, the starting point for this collection of boilerplates and starter kits.
- Modern Full-Stack Boilerplate by CarlosZiegler - full stack starter project, starting point for the auth and email functionality in this collection of boilerplates and starter kits.
- How to use the Playwright codegen test recorder in Vscode (no code testing with Copilot) - video/YouTube.