This project is a Human Resource Management System (HRMS) designed for Jupiter Apparels, a multinational apparel company. The system is designed to manage the company's human resources, including these key features:
- Login/ Logout
- Creating new employee profiles
- Viewing employee profiles
- Updating employee profiles
- Leave Requesting
- Leave Approval/ Rejection
- Report Generation
- Customizing Leave Allowances
- Changing Table Attributes
- and other non-functional requirements
The major components of the overall system can be represented as follows:
The database structure of the HRMS is designed to store information about employees, departments, job positions, leave requests, and much more. The database schema is designed to be flexible and scalable, allowing for easy customization and integration with other systems. The database schema is represented as follows:
The relationship between the system and stakeholders can be reflected through the following use case diagram:
Before you begin, ensure you have the following software installed on your machine:
- Node.js (version 14.x or higher)
- npm (version 6.x or higher)
- MySQL (version 5.7 or higher)
Clone the project repository from GitHub:
git clone https://github.com/Irash-Perera/Database-Project---HR-Management-System.git
To restore the database from the provided .sql file:
- Open MySQL Workbench or any other MySQL client.
- Copy the sript from
jupiterapparels_Grp 16.sqland run it in the MySQL client.
Now you can see a new database named jupiterapparels which has already been populated with sample data.
Navigate to the backend folder and install the necessary npm modules:
cd backend
npm install
Create a .env file in the backend folder and add the following environment variables:
DB_HOST=localhost
DB_USER=your_mysql_username
DB_PASSWORD=your_mysql_password
DB_NAME=hrms
PORT=5000
Replace your_mysql_username and your_mysql_password with your MySQL credentials.
Start the backend server:
npm start
Navigate to the client folder and install the necessary npm modules:
cd ../client
npm install
Start the frontend server:
npm start
Open your browser and navigate to
http://localhost:3000/
Replace 3000 with the port number you specified in the .env file.
Refer the Passwords.txt file for the login credentials.
Try login with different roles and explore the system👽🔥.
Screenshot from HR Manager's dashboard:

The system employs various stored procedures, functions, and triggers to ensure ACID properties and maintain data integrity. Foreign keys and primary keys are set appropriately to maintain consistency. Indexing has been applied to improve query performance where necessary.
Refer HRM_System_Group16.pdf and Project Description 2 for more information.
This repository now includes Docker support for the full stack:
client/Dockerfilebuilds the React UI and serves it with Nginx.backend/Dockerfilebuilds the API server.docker-compose.ymlstarts MySQL, backend, and client together.docker-compose.prod.ymloverrides restart behavior for production-style runs..env.examplecontains the compose and runtime values you can copy into.env.
- Copy
.env.exampleto.envin the repository root. - Make sure Docker Desktop is running.
- Start the stack:
docker compose up --build- Open the app in your browser:
http://localhost:3000Use the production override when you want the same stack with always-on restarts:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build- The MySQL schema is loaded from
jupiterapparels_Grp 16.sqlthe first time the database volume is created. - The backend container reaches MySQL through the service name
db, notlocalhost. - The React app reaches the backend through the host-published backend port during local development.
- For hosted frontend builds such as Cloudflare Pages, set
REACT_APP_API_URLto your deployed backend URL before building the client. - If you need to reload the SQL seed from scratch, remove the Docker volume before starting again.
A GitHub Actions workflow is included at .github/workflows/ci.yml to run backend tests, client tests, the client build, and Docker compose validation/build checks.
The production workflow at .github/workflows/production.yml can also publish Docker images to GHCR and deploy the Oracle-hosted database and backend automatically without cloning the repository on the VM.
The Oracle deployment workflow uses docker-compose.oracle.yml and copies only the deploy bundle to the VM:
docker-compose.oracle.ymlCaddyfileDatabase/jupiterapparels_Grp 16.sql- a generated
.envfile built from GitHub Actions secrets
To enable it, configure these repository secrets:
ORACLE_HOST- your Oracle VM public IP or DNS nameORACLE_USERNAME- the SSH user on the VMORACLE_SSH_PRIVATE_KEY- the private key used by GitHub Actions to SSH into the VMORACLE_DEPLOY_PATH- the target folder on the VM, for example/home/ubuntu/hrms-deployORACLE_MYSQL_ROOT_PASSWORDORACLE_MYSQL_DATABASEORACLE_MYSQL_PORTORACLE_BACKEND_PORTORACLE_DB_USERORACLE_DB_PASSWORDORACLE_DB_NAMEORACLE_API_DOMAIN- for exampleapi.yourdomain.comORACLE_ACME_EMAIL- email for automatic HTTPS certificate issuanceORACLE_CORS_ALLOWED_ORIGINS- comma-separated frontend origins allowed to call the APIGHCR_READ_USERNAME- a GitHub username that can read the packageGHCR_READ_TOKEN- a GitHub token withread:packages
Deployment runs automatically on pushes to Develop, on version tags matching v*, and on manual workflow dispatch.
For Cloudflare Pages and Oracle to work together over HTTPS:
- create a DNS
Arecord for your backend domain such asapi.yourdomain.compointing to158.178.143.114 - open inbound TCP ports
80and443on the Oracle VM and in Oracle Cloud security rules - set
REACT_APP_API_URL=https://api.yourdomain.comin Cloudflare Pages before rebuilding the client - set
ORACLE_CORS_ALLOWED_ORIGINSto the exact frontend origins you will serve, such as yourpages.devURL and your final custom frontend domain
The Oracle deployment uses Caddy to terminate HTTPS on api.yourdomain.com and reverse-proxy traffic to the internal backend container on port 8800.



