Skip to content

Simple Next.js 13 App Router starter kit that uses NextAuth.js for auth, Prisma as the ORM, and Vercel Postgres as a database.

Notifications You must be signed in to change notification settings

jharrell/auth-postgres-prisma-nextjs

 
 

Repository files navigation

auth-postgres-prisma-nextjs

🚀 Simple Next.js 13 App Router starter kit that uses NextAuth.js for auth, Prisma as the ORM, and Vercel Postgres as a database. 🚀

https://github.com/coding-to-music/auth-postgres-prisma-nextjs

https://auth-postgres-prisma-nextjs.vercel.app

From / By https://vercel.com/templates/next.js/prisma-postgres-auth-starter

https://github.com/vercel/nextjs-postgres-auth-starter

https://nextjs-postgres-auth.vercel.app/

Node Environment:

nvm use 18

Environment variables:

see .env-example

# Used by Prisma:
#   url = env("POSTGRES_PRISMA_URL") // uses connection pooling
#   directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
#   shadowDatabaseUrl = env("POSTGRES_URL_NON_POOLING") // used for migrations

# Create a Postgres database on Vercel: https://vercel.com/postgres
POSTGRES_PRISMA_URL=
POSTGRES_URL_NON_POOLING=

# Generate one here: https://generate-secret.vercel.app/32 (only required for localhost)
NEXTAUTH_SECRET=

GitHub

git init
git add .
git remote remove origin
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:coding-to-music/auth-postgres-prisma-nextjs.git
git push -u origin main

Next.js Prisma PostgreSQL Auth Starter

This is a Next.js starter kit that uses Next-Auth for simple email + password login
Prisma as the ORM, and a Vercel Postgres database to persist the data.


Deploy Your Own

You can clone & deploy it to Vercel with one click:

Deploy with Vercel

Developing Locally

You can clone & create this repo with the following command

npx create-next-app nextjs-typescript-starter --example "https://github.com/vercel/nextjs-postgres-auth-starter"

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

About

Simple Next.js 13 App Router starter kit that uses NextAuth.js for auth, Prisma as the ORM, and Vercel Postgres as a database.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 93.0%
  • CSS 4.1%
  • JavaScript 2.9%