A complete authentication system built with the MERN stack featuring JWT authentication and role-based authorization.
š User Authentication:
š„ Role-Based Access:
user
and admin
šØ Frontend:
Technology | Purpose |
---|---|
Node.js | Runtime |
Express.js | Framework |
MongoDB | Database |
Mongoose | ODM |
JWT | Authentication |
Bcrypt.js | Password hashing |
Technology | Purpose |
---|---|
React | UI Library |
React Router | Routing |
Tailwind CSS | Styling |
Heroicons | Icons |
Axios | HTTP Client |
Context API | State Management |
mern-auth/
āāā backend/
ā āāā config/ # Config files
ā āāā controllers/ # Route controllers
ā āāā middleware/ # Auth middleware
ā āāā models/ # MongoDB models
ā āāā routes/ # API endpoints
ā āāā utils/ # Utilities
ā āāā app.js # Express app
ā āāā server.js # Server entry
ā
āāā frontend/
ā āāā public/ # Static files
ā āāā src/
ā ā āāā components/ # UI components
ā ā āāā context/ # Auth context
ā ā āāā pages/ # View pages
ā ā āāā ... # Other frontend files
ā āāā package.json
ā
āāā README.md
git clone https://github.com/adisavaliya15/JWT-Authentication.git
cd JWT-Authentication