Skip to content

dotnize/react-tanstarter

Repository files navigation

Warning

OAuth providers are currently broken in development with the Nitro v3 plugin. (TanStack/router#5220)

A temporary workaround is available at #30 (comment).

A minimal starter template for ๐Ÿ๏ธ TanStack Start. โ†’ Preview here

Getting Started

  1. Use this template or clone this repository with gitpick:

    npx gitpick dotnize/react-tanstarter myapp
    cd myapp
  2. Install dependencies:

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

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

    pnpm db push

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

  5. Run the development server:

    pnpm dev

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

Deploying to production

The vite config is currently configured to use Nitro v3 (nightly) for deploying to Vercel.

Please refer to the TanStack Start hosting docs for deploying to other platforms.

Issue watchlist

Goodies

Scripts

We use pnpm 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.
  • db - Run drizzle-kit commands. (e.g. pnpm db generate, pnpm db studio)
  • ui - The shadcn/ui CLI. (e.g. pnpm ui add button)
  • format, lint, check-types - Run Prettier, ESLint, and check TypeScript types respectively.
    • check - Run all three above. (e.g. pnpm check)
  • deps - Selectively upgrade dependencies via taze.

Utilities

License

Code in this template is public domain via Unlicense. Feel free to remove or replace for your own project.

Also check out