Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/henrikvtcodes/appdir-nextauth-tailwind-template

Template for using Next.js `app` dir with tRPC, Next Auth, and Tailwind CSS
https://github.com/henrikvtcodes/appdir-nextauth-tailwind-template

app-directory nextjs nextjs-app-router nextjs-template react tailwindcss trpc typescript

Last synced: 4 days ago
JSON representation

Template for using Next.js `app` dir with tRPC, Next Auth, and Tailwind CSS

Awesome Lists containing this project

README

        

# App Dir Template with Auth & tRPC

This is a template project that has auth set up using NextAuth (Auth.js) & tRPC set up for data fetching. A lot of the little useful hacks and tools set up here are also swiped from the create-t3-app template: trpc bits, env validation (with explainer comments), `getBaseUrl()`, and the eslint & prettier configs.

#### Why & How

Currently, tRPC does not have an official method for use with the App Directory. This implementation uses it via the fetch adapter, as `app` dir Routes use the `Request` & `Response` API.

**No Prisma/Kysely/Drizzle/*Other*DB?**
There is no database adapter/layer configured here because that is not something this template is meant to have an opinion on.