Welcome to the tanstack-trpc-drizzle repository! This is a starter template designed to help you kickstart your project using the TanStack ecosystem. This template integrates several powerful tools and libraries, including Bun, Biome, Lefthook, Tailwind, React Query, tRPC, Drizzle, and Better Auth.
The tanstack-trpc-drizzle template aims to provide a solid foundation for building modern web applications. It combines the latest technologies to streamline your development process. Whether you're creating a simple application or a complex system, this template can serve as a strong starting point.
This project utilizes the following technologies:
To get started with the tanstack-trpc-drizzle template, follow these steps:
Clone the Repository:
git clone https://github.com/naelxsyt021rj/tanstack-trpc-drizzle.git
Navigate to the Project Directory:
cd tanstack-trpc-drizzle
Install Dependencies:
bun install
Run the Development Server:
bun run dev
Open Your Browser: Visit http://localhost:3000
to see your application in action.
You can also download and execute the latest release from here.
Hereβs a brief overview of the project structure:
tanstack-trpc-drizzle/
βββ public/ # Static assets
βββ src/ # Source files
β βββ components/ # React components
β βββ hooks/ # Custom hooks
β βββ pages/ # Page components
β βββ styles/ # Tailwind CSS styles
β βββ utils/ # Utility functions
βββ .env # Environment variables
βββ bun.lockb # Bun lock file
βββ package.json # Project metadata and dependencies
Once your development server is running, you can start modifying the source files. The project is set up to automatically reload on changes, so you can see your updates in real-time.
To add a new component, create a new file in the src/components/
directory. For example:
// src/components/MyComponent.jsx
import React from 'react';
const MyComponent = () => {
return <div>Hello, World!</div>;
};
export default MyComponent;
Use React Query and tRPC to fetch data. Here's a simple example:
import { useQuery } from 'react-query';
import { trpc } from '../utils/trpc';
const DataFetchingComponent = () => {
const { data, isLoading } = useQuery('getData', () => trpc.getData());
if (isLoading) return <div>Loading...</div>;
return <div>Data: {JSON.stringify(data)}</div>;
};
Tailwind CSS makes it easy to style your components. You can apply utility classes directly in your JSX:
const StyledComponent = () => {
return <div className="bg-blue-500 text-white p-4">Styled Component</div>;
};
We welcome contributions to this project! If you have suggestions or improvements, please feel free to open an issue or submit a pull request.
git checkout -b feature/my-feature
git commit -m "Add my feature"
git push origin feature/my-feature
This project is licensed under the MIT License. See the LICENSE file for details.
For more information and to keep up with the latest updates, check the Releases section.
Feel free to explore the repository and contribute to the project. Your feedback and contributions are greatly appreciated!