Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmvergara/nextjs-mongodb-prisma-auth-template
Template repository for building a Next.js application with MongoDB, Prisma, and Next Auth authentication. 🚀
https://github.com/mmvergara/nextjs-mongodb-prisma-auth-template
authentication mongodb nextjs prisma template
Last synced: about 1 month ago
JSON representation
Template repository for building a Next.js application with MongoDB, Prisma, and Next Auth authentication. 🚀
- Host: GitHub
- URL: https://github.com/mmvergara/nextjs-mongodb-prisma-auth-template
- Owner: mmvergara
- License: mit
- Created: 2024-05-02T14:50:27.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-12-02T12:37:46.000Z (about 1 month ago)
- Last Synced: 2024-12-02T13:39:46.873Z (about 1 month ago)
- Topics: authentication, mongodb, nextjs, prisma, template
- Language: TypeScript
- Homepage: https://nextjs-mongodb-prisma-auth-template.vercel.app
- Size: 270 KB
- Stars: 18
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.MD
Awesome Lists containing this project
README
# Next.js MongoDB Prisma Auth Template
[**`🌐 App Demo`**](https://nextjs-mongodb-prisma-auth-template.vercel.app/)
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
```bash
npx prisma generate
npx prisma db push
```
5. 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](LICENSE).