A client-server Human Resource Management system for a start-up, built with Java RMI. HR staff register employees and generate yearly reports; employees manage their own profile and family details and handle leave. All data is stored centrally and all client-server traffic is encrypted.
Built as a group project for the Distributed Computer Systems module (Year 3, Semester 1). The scenario company is "BHEL".
Work in progress. Updated as pull requests are merged.
| Area | Status |
|---|---|
Shared contract (HRMService, data classes, exceptions) |
Done |
| RMI over TLS connection | Done |
| Database schema and data-access layer (MySQL) | Done |
| Service logic (login, employee registration, leave, yearly report) | Done |
| Swing client (HR and employee screens) | Done: login, password change, connection handling, employee screens (leave, details, family) and HR screens (employees, leave requests, yearly report) |
| Test manual, use case diagram, demo walkthrough | Planned |
| Actor | Capabilities |
|---|---|
| HR staff | Register employees (first name, last name, IC/passport number), approve or reject leave, generate a yearly report per employee (profile, family details, leave history) |
| Employee | Log in, view/update own profile and family details, check leave balance, apply for leave, check leave application status |
| System | Central database, TLS-secured RMI, role-based access, thread-safe server, client retry on server failure |
Swing GUI client --(RMI over TLS)--> RMI server --(JDBC)--> Database
(HR / Employee) (service layer)
- Remote interface:
HRMServiceis the contract between client and server. - Data classes:
Employee,FamilyMember,LeaveApplication,YearlyReportimplementSerializable. - Layers: client GUI, remote interface, service logic, data access.
- JDK 25 (LTS) or newer (any OS). Older Java will not build this project.
- Apache Maven 3.9+ (NetBeans, IntelliJ and Eclipse can open the
pom.xmldirectly) - MySQL 8.4 (the team's chosen database, see DECISION.md)
- Git
git clone https://github.com/Maneet7805/hr-management-system-java-rmi.git
cd hr-management-system-java-rmiNeeds JDK 25, Maven, MySQL 8.4 with the hrm database and a MySQL user hrm_app, and its password saved as HRM_DB_PASSWORD in your Windows user settings.
- Once: double-click
setup.bat. It chooses a password for the development keys and saves it in your Windows user settings (never in a file of the project), makes the keys and the settings files, creates the database tables, and offers to create the first HR account. It never overwrites a settings file you already have. - Every time: double-click
run.bat. It starts MySQL if it is not running, builds the program, starts the server in the background, opens the window, and stops the server again when you close the window.
If MySQL is installed somewhere else, set HRM_MYSQLD (full path of mysqld.exe) and HRM_MYSQL_DATA (its data folder). If something goes wrong, the message says what to do; the server's own messages are in target/server.log.
The manual steps below do the same things one by one, for other systems or for running from an IDE.
- Install the tools listed under Requirements.
- Create the TLS keystore and truststore with
scripts/generate-keys.sh(macOS/Linux) orscripts/generate-keys.bat(Windows). - For each file in
config/, copy*.example.propertiesto the same name without.exampleand fill in your values. The real files are git-ignored. - Set
HRM_DB_PASSWORD,HRM_KEYSTORE_PASSWORDandHRM_TRUSTSTORE_PASSWORDas environment variables. - Create the database tables (see Creating the database tables).
To create the first HR account, start the server and open the client, follow Manual first run.
To create the tables in the development database hrm, run com.bhel.hrm.server.db.DatabaseSetupMain (it needs HRM_DB_PASSWORD).
The system is tested by hand. Follow the cases in docs/test-manual.md and record what you see in the same file, using your part's ID prefix (P1-, P2-, P3-, P4-).
Set these environment variables in the run configuration, never in a file: HRM_DB_PASSWORD, HRM_KEYSTORE_PASSWORD, and for the client HRM_TRUSTSTORE_PASSWORD.
scripts/generate-keys.batmakes the development keystore and truststore.- Copy
config/server.example.propertiestoconfig/server.propertiesandconfig/client.example.propertiestoconfig/client.properties. - Run
DatabaseSetupMainto create the tables. - Run
com.bhel.hrm.server.SeedHrMainto create the first HR account. It asks for the name, IC/passport number and password (typed without echo). With no console, pass the three details as arguments and setHRM_SEED_PASSWORD. - Run
com.bhel.hrm.server.HrmServerMainto start the server, thencom.bhel.hrm.client.SmokeTestMainto check the connection. - Run
com.bhel.hrm.client.HrmClientMainto open the window and log in. If the server is not running yet, the login screen says so and you can try again; the client also retries by itself for a few seconds.
Passwords are stored only as salted PBKDF2 hashes. An employee registered by HR gets a temporary password and must change it at first login.
pom.xml build file (Maven, Java 25)
config/ *.example.properties templates; real config and keystores are git-ignored
scripts/ generate-keys.sh / .bat (local TLS keys); setup.ps1, run.ps1, common.ps1 (used by setup.bat and run.bat)
setup.bat, run.bat one-time setup and everyday start (Windows)
src/main/java/com/bhel/hrm/
common/ HRMService remote interface + model/ data classes (shared contract)
net/ TLS and RMI helpers shared by client and server
server/ RMI server and HRMServiceImpl (business rules)
service/ rules per area: auth, employees, leave, reports
dao/ data-access interfaces
dao/jdbc/ JDBC implementations
db/ connection setup
security/ sessions, password hashing, deserialization filter
client/ client entry point and server connection
ui/ Swing screens
src/main/resources/ SQL schema and other resources
docs/ test manual and diagrams
Secrets are never stored in files: set HRM_DB_PASSWORD, HRM_KEYSTORE_PASSWORD and HRM_TRUSTSTORE_PASSWORD as environment variables.
Open work is tracked in GitHub issues: client timeouts, HR password reset and employee edit/deactivate, running on two computers, macOS/Linux support, fault tolerance and the Payroll System.
- CONTRIBUTING.md: how to work on a branch and open a pull request
- DECISION.md: running log of project decisions and why they were made
- docs/test-manual.md: manual test cases
- docs/diagrams/: use case and architecture diagrams
Read CONTRIBUTING.md before making changes. In short: never push to main, work on a branch, open a pull request, get one teammate to review it.
main is protected: changes need a pull request, and the test check in CI must pass before merging. Use the issue templates in .github/ISSUE_TEMPLATE for tasks and bugs.
Released under the MIT License.