Skip to content
/ tanstarter Public template

minimal TanStack Start template with Better Auth, Drizzle ORM, Tailwind CSS

Notifications You must be signed in to change notification settings

dotnize/tanstarter

Repository files navigation

A minimal starter template for 🏝️ TanStack Start.

If you're looking for an implementation based on the Lucia Auth guide, check out the lucia-auth branch.

Getting Started

  1. Use this template or clone this repository.

  2. Install dependencies:

    pnpm install # npm install
  3. Create a .env file based on .env.example.

  4. 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).

  5. Push the schema to your database with drizzle-kit:

    pnpm db push # npm run db push

    https://orm.drizzle.team/docs/migrations

  6. Run the development server:

    pnpm dev # npm run dev

    The development server should be now running at http://localhost:3000.

Building for production

  1. Configure app.config.ts for your preferred deployment target. Read the hosting docs for more information.

  2. Build the application:

    pnpm build # npm run build
  3. If building for Node, you start the application via:

    pnpm start # npm start

Acknowledgements