This repository serves as a comprehensive boilerplate for building scalable, modern web applications using a powerful stack that includes Next.js 13, React, Tailwind CSS, Prisma, MongoDB, and NextAuth. This setup is designed to kickstart your project with robust authentication, elegant styling, and a well-structured database model.
- Next.js 14: The latest version of the React framework for production-grade React applications.
- React: A JavaScript library for building user interfaces with a focus on declarative and component-based development.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
- Prisma: Next-generation ORM for Node.js and TypeScript, providing a clean and type-safe API for interacting with your database.
- MongoDB: A NoSQL database known for its scalability and flexibility.
- NextAuth: Integrated authentication system for Next.js applications, supporting various authentication providers.
To get started with this boilerplate, follow these steps:
- Node.js 14.x or later
- npm/yarn
- MongoDB instance (local or cloud-based)
-
Clone the repository:
git clone https://github.com/yourusername/nextjs-react-tailwind-prisma-mongodb-nextauth-boilerplate.git
-
Navigate to the project directory:
cd nextjs-react-tailwind-prisma-mongodb-nextauth-boilerplate
-
Install dependencies:
npm install # or yarn
-
Configure your environment variables:
- Copy
.env.example
to.env
and fill in your database URL and authentication provider details.
- Copy
-
Migrate scheme to DB
npx prisma db push
for MingoDB ornpx prisma migrate dev
for MySQL. -
Run the development server:
npm run dev # or yarn dev
Open http://localhost:3000 with your browser to see the result.
For detailed instructions on how to use each component of this stack, please refer to the following documentation:
- Next.js Documentation
- React Documentation
- Tailwind CSS Documentation
- Prisma Documentation
- MongoDB Documentation
- NextAuth Documentation
This project is licensed under the MIT License - see the LICENSE.md file for details.