Role-based Authentication
A web application with role-based authentication using Next.js and Prisma
Description
This project is a modern, full-stack role-based authentication and authorization system built using Next.js for the frontend and backend logic, TypeScript for static type safety, Prisma as the ORM to interact with a PostgreSQL database, and Auth.js (formerly NextAuth.js) for secure, extensible authentication. The system allows users to register and log in with email/password (or other providers like Google/GitHub), and it supports multiple roles such as admin, moderator, and user, each with fine-grained access control to different parts of the application.
Technologies
ReactNext.jsTypeScriptTailwind CSSAuth.jsPrisma
Features
- ✅ User Authentication
- Secure registration and login
- Support for OAuth providers (Google, GitHub, etc.)
- JWT-based session management (with database sessions optional)
- Dark and light theme support
- User authentication and role-based access control
