Logo

dev-resources.site

for different kinds of informations.

Drizzle ORM, NextAuth and Supabase

Published at
10/3/2023
Categories
drizzle
nextjs
nextauth
supabase
Author
miljancode
Categories
4 categories in total
drizzle
open
nextjs
open
nextauth
open
supabase
open
Author
10 person written this
miljancode
open
Drizzle ORM, NextAuth and Supabase

In my last Drizzle article, I wrote about some performance problems related to Prisma and explained why Drizzle ORM might be a better solution for you. In that article, I also provided a step-by-step guide on how to set up Drizzle ORM with NextAuth and the PlanetScale database.

At that time, we didn't have an official Drizzle adapter for NextAuth, so things were a little bit tricky. However, since we now have an official Drizzle adapter for NextAuth, there's no need to create it manually.

In this article I will show you how to set up Drizzle ORM, NextAuth, and Supabase (also tRPC if you want it) with the next-kickstart CLI in just a couple of seconds!

Next Kickstart

Next-Kickstart is an opinionated Next.js 13 (App Router) CLI toolkit that contains everything you need for developing full-stack applications.

next-kickstart cli

With just one CLI command, you can add libraries like NextAuth, Drizzle, or tRPC to your Next.js project in seconds, with zero configuration. And yes, it's also ready for the edge!

It includes:

  • Next.js
  • TypeScript
  • tRPC
  • Drizzle ORM
  • NextAuth.js
  • Supabase
  • T3 Env
  • Tailwind CSS
  • ShadCN/ui
  • Zod
  • ESLint
  • Prettier

Init new app

To initialize a new next-kickstart application, run any of the following commands and respond to the command prompts:

npm



npx next-kickstart <folder name>


Enter fullscreen mode Exit fullscreen mode

pnpm



pnpm dlx next-kickstart <folder name>


Enter fullscreen mode Exit fullscreen mode

Add library

There is also an 'add' command. Let's say you have initialized a new next-kickstart project and initially selected to install Drizzle and NextAuth libraries. However, later on, you realize that you also need tRPC. There's no need for manual installation; all you have to do is run the following command:

npm



# npx next-kickstart add <library name>
# libraries available in add command are 
# shadcn, trpc, drizzle, nextauth

npx next-kickstart add trpc


Enter fullscreen mode Exit fullscreen mode

pnpm



# pnpm dlx next-kickstart add <library name>
# libraries available in add command are
# shadcn, trpc, drizzle, nextauth

pnpm dlx next-kickstart add trpc


Enter fullscreen mode Exit fullscreen mode

The documentation will be available soon. This project is being developed in public and is still in beta, so there may be some bugs. Feel free to test it if you like, and perhaps give it a star on GitHub. Contributions and pull requests are also welcome.

Happy hacking!

drizzle Article's
30 articles in total
Favicon
Setting Up Drizzle & Postgres with tRPC and Next.js App
Favicon
Placegoose: Building data APIs with HONC
Favicon
Quick REST API with Hono JS and Drizzle ORM
Favicon
Remix Drizzle Auth Template
Favicon
Resolving the `DO $$` Issue in Drizzle ORM with Nile Postgres
Favicon
How to use ORMs (Prisma / Drizzle / Knex.js) in a TypeScript backend built with Encore.ts
Favicon
NextJS + Drizzle -- 8 Things I Learned Spinning up a New Project
Favicon
How to integrate Drizzle ORM with Nest Js
Favicon
Build Nextjs 15 & React 19 Dashboard App Step By Step
Favicon
Verifying Lemon Squeezy Subscription Webhooks in Cloudflare Workers
Favicon
Drizzle Vs Prisma
Favicon
Nuxt3 x MySQL (& Drizzle ORM)
Favicon
Building a Scalable REST API with TypeScript, Express, Drizzle ORM, and Turso Database: A Step-by-Step Guide
Favicon
Prisma vs. Drizzle: A Comprehensive Guide for Your NextJS Project
Favicon
Next.js authentication using Clerk, Drizzle ORM, and Neon
Favicon
I created basic analytics with Vercel Postgres, Drizzle & Astro
Favicon
How to Write a SQL Subquery with Drizzle ORM
Favicon
Drizzle ORM in a Supabase edge function
Favicon
Drizzle or Prisma? I Built an App Twice to Find Out Which Is Better
Favicon
Drizzle ORM, NextAuth and Supabase
Favicon
Drizzle ORM SQLite and Nuxt - Integrating Nuxt Auth, Part 2
Favicon
Drizzle ORM SQLite and Nuxt - Integrating Nuxt Auth, Part 1
Favicon
Drizzle ORM, SQLite and Nuxt JS - Getting Started
Favicon
How I implemented Drizzle ORM with Nextauth
Favicon
How to Build a Contextual Chatbot with LangChain and PostgreSQL + Drizzle ORM
Favicon
Building a full stack app with Remix & Drizzle ORM: Drizzle Relations & Deployment
Favicon
Building a full stack app with Remix & Drizzle ORM: Upload images to Cloudflare
Favicon
Building a full stack app with Remix & Drizzle ORM: Project setup
Favicon
Building a full stack app with Remix & Drizzle ORM: Folder structure
Favicon
Building a full stack app with Remix & Drizzle ORM: Register & Login users

Featured ones: