Skip to content

Template repository for building a Next.js application with MongoDB, Prisma, and Next Auth authentication. ๐Ÿš€

License

Notifications You must be signed in to change notification settings

mmvergara/nextjs-mongodb-prisma-auth-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Next.js MongoDB Prisma Auth Template

๐ŸŒ App Demo

This is a template repository for building a Next.js application with MongoDB, Prisma, and Next Auth V5.

Features

  • ๐Ÿš€ 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

Getting Started

  1. Clone the repository
  2. Install dependencies: npm install
  3. Set up your environment variables by creating a .env or .env.local file based on the .env.example file.
  4. Generate and DB Push Prisma Client
npx prisma generate
npx prisma db push
  1. Start the development server: npm run dev

What you need to know

  • auth.config.ts && app/lib/actions.ts handles auth logic
  • /lib/form-schemas.ts zod for form validation
  • middleware.ts handles protected routes

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

Template repository for building a Next.js application with MongoDB, Prisma, and Next Auth authentication. ๐Ÿš€

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published