This repo is designed to help you get started quickly with a new project using the NextJS 13 app dir with prisma, and next-auth configured.
Ensure that you have Node.js (v16 or higher) and npm (v7 or higher) installed on your system. You can check your current versions by running the following commands:
node -v
npm -v
- Select "Use this template" to start a new project
- Clone and enter the repo
git clone <repo-url>
cd <repo-name>
- Install the required dependencies:
npm install
- Rename the
.env.example
file to.env
:
- If you would prefer using vercel postgres, delete the database related env variables and follow the setup here- https://www.google.com/search?q=vercel+postgres&sourceid=chrome&ie=UTF-8
mv .env.example .env
- Obtain the necessary credentials for authentication and database setup, and update the
.env
file accordingly. You'll need to provide the following:
- Client IDs and secrets
- Database URLs
- Run the Prisma migration to set up the database schema:
npx prisma migrate dev
- Generate prisma client
npx prisma generate
- Start the development server on port 3000:
npm run dev
- Open your browser and navigate to
http://localhost:3000
to view your NextJS 13 application.