This is a web-based Employee Management System designed to handle the administrative tasks of managing employees, their details, and other organizational data efficiently. The system includes features like employee data management, authentication, salary management, and more.
- Frontend : npm run dev
- Server : npm start
- Employee Management: Add, update, delete, and view employee details.
- Admin Management: Manage admin users with distinct access rights.
- Salary Management: View and track employee salary information.
- Authentication: Secure login system using JWT for authentication.
- User Roles: Admins can manage employee data, while employees can view their profiles and log out securely.
- Responsive Design: User-friendly interface, responsive across devices with modern UI components.
- Profile Management: Employees can view their own details such as name, email, and salary.
-
Frontend:
- React.js: Handles dynamic UI rendering and frontend logic.
- Bootstrap: Ensures responsive design and consistent layout across devices.
- Ethers.js: Used for decentralized application communication (if any future upgrade planned).
-
Backend:
- Express.js: Powers the backend server and REST API routing.
- JWT: Handles authentication with JSON Web Tokens for user verification.
- Cookie Parser: Middleware to handle cookies, primarily used for storing tokens.
-
Database:
- MySQL: Stores all employee, admin, and salary data with proper relational models.
-
Deployment:
- The project runs on Node.js and MySQL, tested locally.
-
Clone the repository:
git clone https://github.com/VoldsenJoy-git/Employee-Management-System.git
-
Navigate to the project directory:
cd Employee-Management-System
-
Install the required dependencies:
npm install
-
Set up your MySQL database. Create database and all the tables in Xampp control panel
-
Run migrations (if any) and seeders to set up tables and default data (use an ORM like Sequelize if it's set up, or SQL scripts).
-
Start the server:
npm start
The backend will run on
http://localhost:3000
and the frontend onhttp://localhost:5173
.
-
Navigate to the main page, log in with the credentials, and start managing employees.
-
Admins can:
- Add, update, delete employees.
- View admin statistics, including total salary and employee counts.
- Manage personal profiles and logout securely.
-
Employees can:
- View their own profile details (name, salary, email).
- Securely log out.
-
Authentication Routes:
/auth/login
- Login for admins and employees./auth/logout
- Logout the user and clear session.
-
Employee Routes:
/employee/add_employee
- Add a new employee./employee/detail/:id
- Get details of a specific employee./employee/update_employee
- Update employee details.
-
Admin Routes:
/auth/admin_records
- Fetch list of admins./auth/admin_count
- Get total count of admins.