https://github.com/felipfr/tanstack-start-query-clerk-template
A modern, full-stack React application template built with TanStack Start, Clerk, and a rich ecosystem of cutting-edge tools.
https://github.com/felipfr/tanstack-start-query-clerk-template
clerk new-relic shadcn-ui tanstack-query tanstack-start
Last synced: about 1 month ago
JSON representation
A modern, full-stack React application template built with TanStack Start, Clerk, and a rich ecosystem of cutting-edge tools.
- Host: GitHub
- URL: https://github.com/felipfr/tanstack-start-query-clerk-template
- Owner: felipfr
- License: mit
- Created: 2025-04-07T23:53:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-15T04:31:55.000Z (8 months ago)
- Last Synced: 2025-10-30T04:54:40.426Z (7 months ago)
- Topics: clerk, new-relic, shadcn-ui, tanstack-query, tanstack-start
- Language: TypeScript
- Homepage:
- Size: 483 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TanStack Start + Clerk Template
A modern, full-stack React application template built with [TanStack Start](https://tanstack.com/start), [Clerk](https://clerk.com/), and a rich ecosystem of cutting-edge tools.
## Overview
This template leverages **TanStack Start**, a powerful React framework designed for maximum flexibility and scalability. It supports deployment anywhere JavaScript runsβtraditional servers, serverless platforms, or even CDNsβthanks to its universal rendering capabilities. Built on top of [TanStack Router](https://tanstack.com/router/latest) and deeply integrated with [TanStack Query](https://tanstack.com/query/latest), it enables advanced routing, data fetching, and caching with ease.
For authentication and authorization, it uses **Clerk**, providing seamless user management, social login, and **Role-Based Access Control (RBAC)**. RBAC allows you to define granular permissions and secure your app effectively. Learn more about Clerk RBAC [here](https://clerk.com/docs/references/nextjs/basic-rbac).
## Key Features
- β‘ **TanStack Start** β Modern React framework with universal rendering, flexible deployment, and built-in SSR.
- πΊοΈ **TanStack Router** β Type-safe, file-based routing with nested layouts and data loading.
- π **TanStack Query** β Powerful asynchronous state management, caching, and background updates.
- π **Clerk Auth with RBAC** β Authentication, social login, and fine-grained access control ([RBAC docs](https://clerk.com/docs/references/nextjs/basic-rbac)).
- π¨ **Tailwind CSS** β Utility-first styling with [shadcn/ui](https://ui.shadcn.com/) components.
- π§© **Radix UI** β Accessible, composable UI primitives.
- π **Jotai** β Atomic state management for local/global state.
- π‘οΈ **Prisma ORM** β Type-safe database access.
- π **New Relic** β Performance monitoring and observability.
- π§° **Zod** β Type-safe schema validation.
- π **Dark/Light Mode** β Theme switching with [next-themes](https://github.com/pacocoursey/next-themes).
- π **Sonner** β Elegant toast notifications.
- π **Lucide Icons** β Beautiful, consistent icon set.
- βοΈ **TypeScript** β Fully typed codebase.
- π§Ή **Prettier & ESLint** β Code formatting and linting with TanStack plugins.l
## Getting Started
### 1. Clone the repository
```bash
git clone https://github.com/your-username/tanstack-start-query-clerk-template.git
cd tanstack-start-query-clerk-template
```
### 2. Install dependencies
```bash
npm install
# or
yarn install
# or
pnpm install
```
### 3. Configure environment variables
Copy the example environment file and update it with your credentials:
```bash
cp .env.local.example .env.local
```
Edit `.env.local` to set up:
- **Clerk** API keys and social login credentials
- **Database** connection string (Prisma)
- **New Relic** monitoring keys
- App metadata (name, description, URL)
### 4. Run database migrations (if applicable)
```bash
npm run migrate:prisma
```
### 5. Start the development server
```bash
npm run start:dev
```
Visit [http://localhost:3000](http://localhost:3000) to see your app in action.
## Project Structure
```plaintext
tanstack-start-query-clerk-template/
βββ src/
β βββ components/ # Reusable UI components
β βββ lib/ # Config, hooks, helpers, types
β βββ routes/ # App routes (file-based, TanStack Router)
β βββ styles/ # Global styles (Tailwind CSS)
β βββ ... # SSR entry points, API utilities
βββ public/ # Static assets
βββ app.config.ts # TanStack Start + Vite config
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript config
βββ .env.local # Environment variables
βββ README.md # Project documentation
```
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
## Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve this template.
## Acknowledgements
- [TanStack](https://tanstack.com/) for their incredible open-source libraries.
- [Clerk](https://clerk.com/) for seamless authentication and RBAC.
- [shadcn/ui](https://ui.shadcn.com/) for beautiful UI components.