This is a template repository for building a Next.js application with MongoDB, Prisma, and Next Auth V5.
- ๐ Next Auth V5 with user registration, login, and logout functionality
- ๐ Protected Routes
- ๐ Next.js framework for server-side rendering and client-side rendering
- ๐ MongoDB for database storage
- ๐ Prisma for database ORM
- Clone the repository
- Install dependencies:
npm install
- Set up your environment variables by creating a
.env
or
.env.local
file based on the.env.example
file. - Generate and DB Push Prisma Client
npx prisma generate
npx prisma db push
- Start the development server:
npm run dev
auth.config.ts
&&
app/lib/actions.ts
handles auth logic/lib/form-schemas.ts
zod for form validationmiddleware.ts
handles protected routes
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.