This project is a full-stack application providing secure user management with role-based access control (RBAC). It allows for user registration, login, and the management of users and roles by authorized administrators.
- MONGO_URI=
- JWT_SECRET=
- SESSION_SECRET=
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_SERVICE=gmail
- SMTP_MAIL={put your gmail here}
- SMTP_PASSWORD={password you get from 'application password' from google account section}
- User registration with email verification (optional).
- Secure login with password hashing (bcrypt).
- Password reset functionality via email.
- JWT (JSON Web Tokens) for secure session management.
- CRUD (Create, Read, Update, Delete) operations for users.
- User profile management (update personal information).
- Role assignment to users.
- CRUD operations for roles.
- Define permissions associated with each role.
- Granular control over access to specific features based on assigned permissions.
- Dedicated admin interface for managing users and roles.
- Comprehensive logging of user actions (audit trail).
- Send Emails to new users
- React.js
- Vite (build tool)
- React Router DOM for navigation
- Ant Design for UI components
- Axios for API calls
- SweetAlert2 for user alerts
- Node.js with Express.js framework
- MongoDB (database)
- Mongoose (MongoDB ODM)
- bcrypt (password hashing)
- jsonwebtoken (JWT)
- multer (file uploads - if applicable)
- nodemailer (email sending - if applicable)
- body-parser (for parsing request bodies)
- cors (for handling Cross-Origin Resource Sharing)
- dotenv (for environment variables)
- express-validator (input validation)
- Node.js and npm (or yarn) installed.
- MongoDB instance running (or configured for connection).
-
Clone the repository:
git clone <repository_url> Use code with caution. Markdown Navigate to the client directory:
cd client
npm install
cd ../server
npm install
Backend: nodemon index.js (or npm run start if you have a start script)
Frontend: npm run dev