This is a Human Resources Management System built with Spring Boot (backend) and React JS (frontend). The application is designed to help businesses manage employee data, inventories, and assignments efficiently while maintaining secure role-based access control for admins and employees.
Role-based Access Control: Admins can manage employee data, inventories, and assignments. Employees have restricted access to view and update their profiles and assigned inventories.
CRUD Operations: Admins can create, read, update, and delete employee records, inventories, and assignments.
Authentication & Authorization: Users can securely log in using JWT tokens.
Admin Dashboard: Manage employees, inventories, assignments, and personal profile.
Employee Dashboard: View and update personal profile, view assigned inventories.
Secure Password Hashing: User passwords are securely hashed and stored in the database. Data Encryption: Sensitive data is encrypted for added security.
Java 17: Main programming language.
Spring Boot: Backend framework.
Spring Security: For role-based access control and authentication.
JWT (JSON Web Tokens): For token-based authentication.
MySQL: Relational database for storing application data.
JPA (Java Persistence API): For ORM and database interactions.
React: Frontend library for building user interfaces.
Axios: HTTP client for making API requests.
CSS: For styling components.
HTML5: For structuring web pages.
Make sure you have the following installed:
Java 17
Node.js (v16 or higher)
MySQL
Maven
Clone the repository:
git clone https://github.com/aerayalkan/HR-APP.git
Navigate to the backend directory:
cd HR-APP/backend
Configure the application.properties file located in src/main/resources:
-> properties
spring.datasource.url=jdbc:mysql://localhost:3306/hr_db
spring.datasource.username=root
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update
jwt.secret=your_jwt_secret_key
mvn spring-boot:run
This will start the backend on http://localhost:8080
Navigate to the frontend directory:
cd ../frontend
Install dependencies:
npm install
Start the React application:
npm start
This will run the frontend on http://localhost:3000
Create a MySQL database:
CREATE DATABASE hrapp;
Ensure that your database credentials in the application.properties file match your local setup.
When you start the backend, the necessary tables (Employees, Roles, Inventories, Assignments) will be created automatically.
The application uses Spring Security and JWT for authentication and authorization. Key security features include:
Password Hashing: Passwords are securely hashed using BCrypt before storage.
JWT Authentication: JSON Web Tokens are issued upon successful login, allowing stateless authentication.
Role-based Access Control: Users are assigned roles (Admin, Employee) that determine which resources they can access.
Start the application.
Log in as Admin using the credentials provided during setup.
Access the Admin Dashboard to manage employees, inventories, and assignments.
Start the application.
Log in as an Employee to view and update your profile and assigned inventories.
Add Notifications: Implement a notification system for inventory updates or profile changes.
Reporting: Add a reporting module to generate employee and inventory reports.
Mobile Compatibility: Optimize the frontend for mobile devices.
Contributions are welcome! If you'd like to contribute, please follow these steps:
Fork the repository.
Create a feature branch (git checkout -b feature-branch).
Commit your changes (git commit -m 'Add some feature').
Push to the branch (git push origin feature-branch).
Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.