https://github.com/clerk/clerk-nextjs-trpc-drizzle
Integrate Clerk into your Next.js App Router + tRPC + Drizzle app
https://github.com/clerk/clerk-nextjs-trpc-drizzle
clerk drizzle neon neon-postgres neondb nextjs tailwind tanstack-query trpc typescript zod
Last synced: about 1 year ago
JSON representation
Integrate Clerk into your Next.js App Router + tRPC + Drizzle app
- Host: GitHub
- URL: https://github.com/clerk/clerk-nextjs-trpc-drizzle
- Owner: clerk
- Created: 2025-03-11T21:04:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-23T14:43:41.000Z (over 1 year ago)
- Last Synced: 2025-06-09T18:54:53.615Z (about 1 year ago)
- Topics: clerk, drizzle, neon, neon-postgres, neondb, nextjs, tailwind, tanstack-query, trpc, typescript, zod
- Language: TypeScript
- Homepage: https://clerk-nextjs-trpc-drizzle.clerkstage.dev/
- Size: 373 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
Clerk is a developer-first authentication and user management solution. It provides pre-built React components and hooks for sign-in, sign-up, user profile, and organization management. Clerk is designed to be easy to use and customize, and can be dropped into any React or Next.js application.
This repository demonstrates how to use Clerk to create a tRPC context that uses Clerk's authentication context, so that you can use Clerk's authentication state in your tRPC procedures. For more information, see the [guide in the Clerk Docs](https://clerk.com/docs/references/nextjs/trpc).
## Deploy
Easily deploy the template to Vercel with the button below. You will need to set the required environment variables in the Vercel dashboard.
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fclerk%2Fclerk-nextjs-trpc-drizzle&env=NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,CLERK_SECRET_KEY&envDescription=Clerk%20API%20keys&envLink=https%3A%2F%2Fclerk.com%2Fdocs%2Freferences%2Fnextjs%2Ftrpc&redirect-url=https%3A%2F%2Fclerk.com%2Fdocs%2Freferences%2Fnextjs%2Ftrpc)
## Running the template
```bash
git clone https://github.com/clerk/clerk-nextjs-trpc-drizzle
```
To run the example locally, you need to:
1. `npm install` the required dependencies. You may need to use `--force` to handle dependency issues from the React release candidate.
1. `npm run dev` to launch the development server.
1. Select the "Sign in" button in the top-right corner of the app's homepage.
## Learn more
To learn more about Clerk and Next.js, check out the following resources:
- [Quickstart: Get started with Next.js and Clerk](https://clerk.com/docs/quickstarts/nextjs?utm_source=DevRel&utm_medium=docs&utm_campaign=templates&utm_content=clerk-nextjs-trpc-drizzle)
- [Clerk Documentation](https://clerk.com/docs?utm_source=DevRel&utm_medium=docs&utm_campaign=templates&utm_content=clerk-nextjs-trpc-drizzle)
- [Next.js Documentation](https://nextjs.org/docs)
## Found an issue or want to leave feedback
Feel free to create a support thread on our [Discord](https://clerk.com/discord). Our support team will be happy to assist you in the `#support` channel.
## Connect with us
You can discuss ideas, ask questions, and meet others from the community in our [Discord](https://discord.com/invite/b5rXHjAg7A).
If you prefer, you can also find support through our [Twitter](https://twitter.com/ClerkDev), or you can [email](mailto:support@clerk.dev) us!