HRnet

WealthHealth is a large financial company that uses an internal employee management application: HRnet. I built a efficient and modern version in React instead of JQuery. I've also published a npm package to display data into tables `ja-react-table`.

TYPEEducation, Web
DATE
STACKTypeScript, React, React Context, React-router, React Hook Form, Zod, Tailwind CSS, Vitest
HRnet project

This project is the n°14 of the OpenClassrooms Front-End learning path.

The problem

The solution

Responsive Web App with Tailwind

Responsive screens HRnet App

State Management with React Context

The application needs to provide a way to add employees to the data shared by all pages. As it is a small project, the React Context API should be enough.

To handle the form validation, I’ve used the combination of Zod and React Hook Form. With Zod we can sharply custom rules validations and it provides a very convenient way to share types for its schema.

Publish A Package On NPM

React Table Component

The ja-react-table is a component which display data into a table and provide features as sort, search and pagination.

The component is published on npm registry using vite

pnpm install ja-react-table

I’ve worked to make it handle generic types, like this

<Table<UserType> headers={headers} items={users} sortBy="dateOfBirth" />

Tests

Integrations tests are made using Vitest. The component is well tested before any publication: React Table Component Coverage

Performance Report

The Lighthouse dev tool is used to show differences between the old and newest version. I’ve deployed the project on Github Page, but also on an Apache server to handle correct routing with Lightouse and enable cache and compression in order to get more realistic results.

Performance score

What I Learned

Few methods used to get great results:

I’ve written also three articles on LinkedIn and Github/gists about what I learned: