stripe + next.js app router + nextauth + prisma
This sample shows how to handle Stripe payments using NextAuth and Prisma based on Next.js's app router.
Dummy cards: https://docs.stripe.com/testing
Installing Docker Compose
Please check Installation scenarios section.
Enabling git hook and corepack
$ npm run setup
Installing Deps
$ pnpm i
Creating .env.local
and modifying env
$ cp .env.sample .env.local
If you use Google OAuth, you need to set GOOGLE_CLIENT_ID
and GOOGLE_CLIENT_SECRET
, if not, you can remove a provider from _clients/NextAuth.ts
. And NextAuth requires NEXTAUTH_SECRET
token so please generate using OpenSSL.
# start docker-compose, migrations(generating the client), and next dev
$ pnpm dev
# create new migration
$ pnpm dev:db:migrate
# reset the DB
$ pnpm dev:db:reset
# view the contents
$ pnpm dev:db:studio