
NextJS + ChakraUI + Prisma + JWT-based Authentication + Two-Factor Authentication + Sentry
This project is a NextJS JWT authentication boilerplate developed as an example of JWT token-based authentication in a web environment for a research project at the University of Applied Sciences of Southern Switzerland. It includes features such as Sentry error tracking, login with email and password, role-based access control, automatic JWT access token refresh, two-factor authentication via email, and protected routes and pages.
.env.example file to .env and fill in the required environment variables.This NextJS JWT authentication boilerplate provides a fully functional two-factor authentication system based on JWT tokens. It includes features such as error tracking using Sentry, login with email and password, role-based access control, automatic token refresh, two-factor authentication via email, and protected routes and pages. The installation process requires Node.js, Yarn, and PostgreSQL, and involves installing packages, configuring environment variables, and setting up the database.

Next.js is a React-based web framework that enables server-side rendering, static site generation, and other powerful features for building modern web applications.
React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components
Chakra UI is a popular open-source React component library that provides a set of accessible and customizable UI components to help developers create modern web applications.
Prisma is a server-side library that helps developers read and write data to the database in an intuitive, efficient and safe way.
A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.
ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.
Alpine.js is a lightweight JavaScript framework that simplifies the process of creating dynamic, reactive user interfaces on the web. It uses a declarative syntax that offers a higher level of abstraction compared to vanilla JavaScript, while being more performant and easier to use than jQuery.
TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.
React Hook Form is a performant, flexible, and extensible form library for React with easy validation. It reduces re-renders and improves performance by using uncontrolled components and native HTML validation, making form handling simple and efficient.