Employee Manager is a full-stack web application built with Next.js (frontend) and Node.js (backend) to efficiently manage employee data with authentication and role-based access control.
- ✅ User Signup with email verification (Nodemailer)
- ✅ User Login (JWT-based, stores access & refresh tokens in cookies)
- ✅ Forgot Password & Reset Password (email-based reset link)
- ✅ Logout (clears authentication tokens)
- ✅ Protected Routes (ensures only authenticated users can access certain pages)
- ✅ Create Employee
- ✅ Update Employee
- ✅ Delete Employee
- ✅ Search Bar to find employees by typing their name prefix
- ✅ Pagination for handling large datasets efficiently
- ✅ Data Validation using Express Validator (backend validation for employee data)
- ✅ Custom Toast Notifications for better UX (using NextUI's alert component + Redux)
- ✅ Navbar with User Avatar (includes logout functionality)
- ✅ Custom 404 & Error Pages for better user experience
- ✅ Reusable Components (PasswordInput, Toast, etc.)
- ✅ Animations powered by Framer Motion
- Framework: Express.js (Node.js)
- Database: MySQL
- ORM: Sequelize (for interacting with MySQL)
- Validation: Express Validator
- Authentication: JWT (Access & Refresh Tokens), Nodemailer (email verification & password reset)
- Framework: Next.js (React.js)
- State Management: Redux Toolkit (for authentication & global state management)
- API Handling: React Query + Axios
- Styling: Tailwind CSS
- UI Library: NextUI
- Icons: Iconify/react
- Animations: Framer Motion
git clone https://github.com/jaiganesh0312/Employee-Manager
cd Employee-Manager
cd backend
npm install
cd frontend
npm install
Create a .env file in the backend directory and add:
JWT_SECRET=your-secret-key
EMAIL_USER=your-email@example.com
EMAIL_PASS=your-email-password
REFRESH_TOKEN_SECRET=your-refresh-key
PORT=5000
DB_NAME=your-db-name
DB_USERNAME=your-db-username
DB_PASSWORD=your-db-password
cd backend
npm start
cd frontend
npm run dev
Go to:
http://localhost:3000
- Ensure MySQL is installed and running before starting the backend.
- Update the
.env
file with your credentials before running. - You can test API routes using Postman.