nuhptr / netflix-v2

[Production] CWA Build Netflix Clone Using Nextjs 13.5, Prisma, MongoDB, NextAuth

Home Page:https://watching-netflix.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating a Fullstack App with Next.js and Prisma Netflix Clone

Fullstack Netflix Clone

Getting Started

  • Next.js - npx create-next-app@latest --typescript --tailwind
  • Prisma
    • npm install prisma -D (ORM Database)
    • npx prisma init (Create prisma folder)
    • npx prisma db push (Create database)
  • Prisma Client
    • npm install @prisma/client (Prisma Client)
    • npx prisma generate (Generate Prisma Client)
  • Next Auth - npm install next-auth
  • Bcrypt - npm install bcrypt && npm install @types/bcrypt -D
  • @Next-Auth/Prisma-Adapter - npm install @next-auth/prisma-adapter
  • Axios - npm install axios
  • React Icons - npm install react-icons
  • SWR - npm install swr
  • Lodash - npm install lodash && npm install -D @types/lodash (utilities library)
  • Heroicons - npm install @heroicons/react@latest
  • Zustand - npm install zustand@latest (state management)

Integrated

  • For github open developer setting
  • for google open google cloud console -> api & services -> credentials
  • For google don't forget add http://localhost:3000/api/auth/callback/google in Authorized redirect URIs

env

DATABASE_URL=""
NEXTAUTH_JWT_SECRET=""
NEXTAUTH_SECRET=""

# buka github developer oauth lu
GITHUB_ID=
GITHUB_SECRET=

# buka console google lu
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

Package Install

  • use npm install --legacy-peer-deps if you get error
  • delete old package.lock.json and node_modules

About

[Production] CWA Build Netflix Clone Using Nextjs 13.5, Prisma, MongoDB, NextAuth

https://watching-netflix.vercel.app


Languages

Language:TypeScript 97.5%Language:JavaScript 2.0%Language:CSS 0.5%