π Project MultiRole
A Fullstack Web Application with multi-role authentication (Admin & User). Built with React + Redux Toolkit + TailwindCSS for the frontend, and Express + Sequelize (MySQL) for the backend.
π Project Structure
Project_MultiRole/
β
βββ Backend/ # Backend API (Express + Sequelize)
β βββ controllers/ # Business logic for routes
β βββ database/ # Database configuration
β βββ middleware/ # Auth/session middleware
β βββ models/ # Sequelize models
β βββ routes/ # API endpoints
β βββ index.js # Backend entry point
β βββ package.json
β
βββ Frontend/ # Frontend (React + Vite + TailwindCSS)
β βββ public/ # Static assets
β βββ src/
β β βββ app/ # Redux store setup
β β βββ auth/ # Authentication slice (Redux Toolkit)
β β βββ component/ # Reusable components
β β βββ pages/ # Main pages (Login, Dashboard, CRUD, etc.)
β β βββ App.jsx # Root app
β β βββ main.jsx # React entry point
β βββ package.json
β
βββ README.md
π Backend Setup π§ Dependencies "dependencies": { "argon2": "^0.44.0", "connect-session-sequelize": "^8.0.2", "cors": "^2.8.5", "dotenv": "^17.2.2", "express": "^5.1.0", "express-session": "^1.18.2", "mysql2": "^3.14.5", "sequelize": "^6.37.7" }
βοΈ Installation cd Backend npm install
The backend runs at http://localhost:5000
π¨ Frontend Setup π§ Dependencies "dependencies": { "@reduxjs/toolkit": "^2.9.0", "@tailwindcss/vite": "^4.1.13", "axios": "^1.12.1", "react": "^19.1.1", "react-dom": "^19.1.1", "react-icons": "^5.5.0", "react-redux": "^9.2.0", "react-router-dom": "^7.9.1", "tailwindcss": "^4.1.13" }
βοΈ Installation cd Frontend npm install
The frontend runs at http://localhost:5173
π Features
β Authentication with hashed passwords (argon2)
β Role-based access control (Admin / User)
β Session management (express-session + sequelize)
β CRUD for Users & Products
β Protected routes with React Router + Redux
β Responsive UI with TailwindCSS
π οΈ Tech Stack
--- Frontend ---
-
React
-
Redux Toolkit
-
React Router DOM
-
TailwindCSS
-
Axios
--- Backend ---
-
Express
-
Sequelize ORM
-
MySQL
-
Argon2 (password hashing)
-
Express-session + connect-session-sequelize
π License
MIT License