- Notifications
You must be signed in to change notification settings - Fork18
dotnize/tanstarter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A minimal starter template for 🏝️ TanStack Start.
- React 19 +React Compiler
- TanStackStart +Router +Query
- Tailwind CSS v4 +shadcn/ui
- Drizzle ORM + PostgreSQL
- Better Auth
Use this template or clone this repository.
Install dependencies:
pnpm install# npm install
Create a
.env
file based on.env.example
.Push the schema to your database with drizzle-kit:
pnpm db push# npm run db push
Run the development server:
pnpm dev# npm run dev
The development server should be now running athttp://localhost:3000.
- React Compiler docs,Working Group - React Compiler is still in beta. You can disable it inapp.config.ts if you prefer.
- TanStack/router#2863 - TanStack Start is currently in beta and may still undergo major changes.
- shadcn-ui/ui#6714 - We're using the
canary
version of shadcn/ui for Tailwind v4 support.
Better Auth is currently configured for OAuth with GitHub, Google, and Discord, but can be easily modified to use other providers.
If you want to use email/password authentication or change providers, update theauth config andsignin page with your own UI. You can useshadcn/ui login blocks or@daveyplate/better-auth-ui as a starting point.
These scripts inpackage.json usepnpm by default, but you can modify them to use your preferred package manager.
auth:generate
- Regenerate theauth db schema if you've made changes to your Better Authconfig.db
- Run drizzle-kit commands. (e.g.pnpm db generate
to generate a migration)ui
- The shadcn/ui CLI. (e.g.pnpm ui add button
to add the button component)format
andlint
- Run Prettier and ESLint.
auth-guard.ts
- Sample middleware for forcing authentication on server functions. (see #5)ThemeToggle.tsx
- A simple component to toggle between light and dark mode. (#7)
Read thehosting docs for information on how to deploy your TanStack Start app.
- nekochan0122/tanstack-boilerplate - A batteries-included TanStack Start boilerplate that inspired some patterns in this template. If you're looking for a more feature-rich starter, check it out!
- AlexGaudon/tanstarter-better-auth for his own better-auth implementation.
About
minimal TanStack Start template with Better Auth, Drizzle ORM, shadcn/ui