A full-stack React application template with TanStack Router, tRPC, Drizzle ORM, and more.
- ⚛️ React 19
- 🌐 TanStack Router for type-safe routing
- 🔄 TanStack Start for SSR and streaming
- 🔍 TanStack Query for data fetching
- 🧰 tRPC for end-to-end type safety
- 💾 Drizzle ORM with PostgreSQL
- 🎨 Tailwind CSS v4
- 🔐 DIY Authentication with PostgreSQL
- 📋 Form handling with React Hook Form and Zod validation
- 🎭 Shadcn UI components
- 🔄 Environment variable management
- 🧹 Biome for linting and formatting
- Clone this repository
- Install dependencies with
bun install
- Copy
.env.example
to.env
and configure your environment - Start PostgreSQL with Docker:
docker-compose up -d
- Run database migrations:
bun run db:push
- Start the development server:
bun run dev
bun run dev
- Start the development serverbun run build
- Build for productionbun run start
- Start the production serverbun run lint
- Lint code with Biomebun run format
- Format code with Biomebun run db:generate
- Generate migration based on schema changesbun run db:push
- Push schema changes to the databasebun run db:studio
- Open Drizzle Studio to manage your database
This template includes a Dockerfile for containerized deployment. Build and deploy with:
docker build -t your-app-name .
docker run -p 3000:3000 your-app-name
You can also deploy to Vercel by connecting your repository and using the default settings.
src/
├── app/ # TanStack Start app configuration and routes
├── components/ # UI components
│ ├── ui/ # Shadcn UI components
│ └── auth/ # Authentication components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
│ ├── trpc/ # tRPC client and server setup
│ └── utils/ # Helper functions
├── server/ # Server-side code
│ ├── api/ # API routes and handlers
│ ├── auth/ # Authentication logic
│ └── db/ # Database schema and setup
└── styles/ # Global styles
MIT