Organizations have different ways of managing workforce/employees. If we talk about traditional way, for each action employee has to send out mails or fill up forms and submit it to HR. Over the time when organization size increases managing this in a traditional manner becomes a very hard problem. It is the time when organizations started looking for employee management tools. Well, there are multiple tools already available in the market which comes with many features included inbuilt. But as a organization you want only few features that too which fits in your use case.
Being a startup company, HashedIn also wanted to have employee management tool which is customized to our use cases. We came up with the workforce management tool for the services industry named as ‘HIWAY’, which is an ambitious employee management system that logs employee timesheet and every other activities and maintains employee record.
Now before starting how we came up with the solution, let’s discuss one use case. Every organization has its set of leave policies and the HR also keeps a track of their employees’ leave in one way or the other. This looks like a simple problem, but considering different policies such as different types of leave (Leave, WFH, Comp Off, Sabbatical, etc.), Leave Carry Forward, Holidays, Optional Holidays; it makes things even more complex. Now we understand how hard it will be doing it in a traditional way, so let’s discuss how we achieved solution to this problem using modern tech stack in HIWAY.
“When you build software, you want to start with the right foundation.“
It is always better to spend a good amount of time focusing on the design and architecture before starting off any solution. Out of many, one important aspect is “Choosing a technology stack”. This is crucial because, it will help in tackling hard and complex problems in development. One should also consider aspects such as performance, security, scalability and maintainability to handle sudden traffic increase when application starts growing. Let’s discuss each aspect in detail:
Client-side (Front end)
Firstly, it is important to provide employees a nice user interface and user experience when applying for leave. Both these things are achieved using AngularJS along with Angular Material UI in HIWAY. Employees can select date range, leave type and provide some description; using Angular Material UI Card Layout and raise a request to the respective manager. Managers can approve/deny the request and employees will be able to see the status of the request. HIWAY uses AngularJS features such as two way binding, scope variables and filtering etc. to display the leave history of employees for different years. MomentJS is a very helpful library used here to display Date for leaves in different time-date format and also according to different time zones.
Considering that the employees will only use HIWAY web app for applying leave, will be a wrong design choice. In future, there can be a requirement that it will be handy for the employees to apply for leave using mobile app. So in such cases it is always better to separate frontend and backend logic and connect them using RESTful APIs.
HIWAY uses Python Django, which is built upon Python. Python Django is very secure, scalable and carries all the advantages of coding in Python. It has a package called Django Rest Framework (DRF), which is used to create REST APIs for this problem. Once Leave Request goes to the backend using REST APIs, the backend python code validates the requests (e.g. Carry Forward + Leaves Accrued Till This Month > Leaves Opt for – Holidays ) and returns status code with some message in JSON format. This message is shown in the some form of notification in the frontend. On a valid request it saves the entry into database. Postgres database is used to save and retrieve all user’s Leave History. Celery package is used to run background jobs for updating Leave Carry Forward from last year to new year. Django also provides Django Admin in built, in which you can create Role (e.g. HR) and give permission to view all Leave Requested by employees or to create/update Holidays list. For roles and permission related more data you can follow the link here.
HIWAY Application is deployed on cloud using AWS Cloud Services. HIWAY uses service like AWS ELB which adds or removes web servers based on traffic and makes application auto scalable. HIWAY also uses S3 and Cloudfront to upload and serve static content quickly across the world.
Jenkins is used in HIWAY and it tests on a non-developer machine automatically every time someone pushes new codes into the source repository. In this case HIWAY uses GitHub. Once the test is complete it notifies on the build success or failure result to concerned teams. HIWAY uses Logentries for logging the exceptions or errors if something goes during code execution within the server. For monitoring and performance measurement HIWAY uses New Relic, which provides useful insights via Dashboard and Analytics and also sends out mail if server is down or majority of requests are failing.
As shown above using modern tech stack it makes employee management very easy and efficient. This is the just one example, with this stack, HIWAY solves problems like TimeSheet, reimbursement, PFF etc.