A minimal starter template for 🏝️ TanStack Start.
- TanStack Start + Router + Query
- Tailwind CSS + shadcn/ui
- Drizzle ORM + PostgreSQL
- Better Auth with OAuth2 for GitHub, Google, and Discord.
If you're looking for an implementation based on the Lucia Auth guide, check out the
lucia-auth
branch.
-
Use this template or clone this repository.
-
Install dependencies:
pnpm install # npm install
-
Create a
.env
file based on.env.example
. -
In your OAuth2 apps, set the callback/redirect URIs to
http://localhost:3000/api/auth/callback/<provider>
(e.g. http://localhost:3000/api/auth/callback/github). -
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 at http://localhost:3000.
-
Configure
app.config.ts
for your preferred deployment target. Read the hosting docs for more information. -
Build the application:
pnpm build # npm run build
-
If building for Node, you start the application via:
pnpm start # npm start
- 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.