Skip to content

jaymehta002/AuthCraft

Repository files navigation

Next.js Boilerplate

This is a boilerplate project built with Next.js, Shadcn, Prisma, and NextAuth for authentication, including sign-in with Google.

Features

  • Ready-to-use authentication system with NextAuth
  • Google sign-in integration
  • Database integration with Prisma
  • Modern UI components using Shadcn
  • Fully responsive design

Getting Started

To get started with this project, follow the steps below:

Prerequisites

Make sure you have the following installed:

  • Node.js (version 14 or later)
  • npm, yarn, or pnpm (package managers)

Clone the Repository

Clone the repository to your local machine:

git clone <repository-url>
cd <repository-directory>

Install Dependencies

Install the required dependencies using your preferred package manager:

npm install
# or
yarn install
# or
pnpm install

Set Up Environment Variables

Create a .env file in the root of the project and fill in the required environment variables. You can use the provided .env.example as a template:

DATABASE_URL=
NEXTAUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
NEXTAUTH_URL=
JWT_SECRET=
OPENAI_API_KEY=
OPENAI_ORGANIZATION_ID=
RESEND_API_KEY=
NEXT_PUBLIC_APP_URL=

Migrate the Database

After setting up your database URL in the .env file, run the following command to migrate the database:

npx prisma migrate dev

Run the Development Server

Start the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser to see the application in action.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

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!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.