coding-to-music / auth-postgres-prisma-nextjs-playground

Works. Plays Rickroll video in protected route. Simple Next.js 13 App Router starter kit that uses NextAuth.js for auth, Prisma as the ORM, and Vercel Postgres as a database.

Home Page:https://auth-postgres-prisma-nextjs-playground.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auth-postgres-prisma-nextjs-playground

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

Status and Issues (see Issues Tab)

  • Works. Plays Rickroll video in protected route.
  • #2 (open) Logout button does not work on header, only in works in protected Rick Roll route.
  • #1 (closed) Writes to Neon Postgres user email and hashed pw

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

https://auth-postgres-prisma-nextjs-playground.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

Paste the .env values into VercelDashboard-->Settings-->EnvironmentValues

# 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-playground.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.


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!

This project was created via

https://nextjs.org/docs/pages/api-reference/create-next-app

npx create-next-app auth-postgres-prisma-nextjs-playground --use-yarn -e https://github.com/coding-to-music/auth-postgres-prisma-nextjs

Upgrade npm Packages

ncu
Using yarn

[====================] 19/19 100%

 @types/node         ^18.11.9  β†’   ^20.5.4
 @types/react        ^18.0.25  β†’  ^18.2.21
 autoprefixer         ^10.4.4  β†’  ^10.4.15
 bcrypt                ^5.1.0  β†’    ^5.1.1
 eslint                8.11.0  β†’    8.47.0
 eslint-config-next   ^13.0.5  β†’  ^13.4.19
 next                 ^13.4.2  β†’  ^13.4.19
 next-auth            ^4.22.1  β†’   ^4.23.1
 postcss              ^8.4.12  β†’   ^8.4.28
 tailwindcss          ^3.0.23  β†’    ^3.3.3
 typescript            ^4.6.2  β†’    ^5.1.6

Run ncu -u to upgrade package.json

About

Works. Plays Rickroll video in protected route. 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://auth-postgres-prisma-nextjs-playground.vercel.app/


Languages

Language:TypeScript 92.0%Language:JavaScript 4.3%Language:CSS 3.7%