This application is built using Vite and React, along with libraries like Jotai, Clsx, and Tailwind CSS for styling. It uses bun
as the package manager, but you can switch as usual.
-
Clone into the repository and
cd
into it -
Run
bun install
- If you don't have
bun
installed:
curl -fsSL https://bun.sh/install | bash
- Or you can choose a different package manager:
pnpm install
|yarn install
|npm install
. Deletebun.lockb
in that case.
- If you don't have
bun dev
starts the development server
grades.json are the paygrades
"Junior": {
"monthlyBaseSalary": 2700,
"minDailyRate": 350,
...
"defaultYearlyGrossSalary": 35168.66
},
"Junior+": {
...
The defaultYearlyGrossSalary is taken in the result column on parsing. It is not used by the calculator but is checked against the calculated result when running the tests.
ssData.json is social security data
"trancheACeiling": 3377,
...
There are two ways to update the data:
-
bun parse
This will look forsrc/data/spreadsheet.xlsm
and regeneratesrc/data/grades.json
andsrc/data/ssData.json
according to the spreadsheet data.- It is using exceljs.
- The spreadsheet must be named
spreadsheet.xlsm
and must be placed insrc/data/
. - The spreadsheet is ignored by git, and will not be pushed to the repo.
-
Updating
src/data/grades.json
andsrc/data/ssData.json
manually.
experience.json is the years to title mapping and is only updated manually
"title": "Junior",
"minExperience": 0,
"maxExperience": 2
},
{
"title": "Junior+",
...
bun test
runs the tests using
bun build
builds the application for production
bun preview
serves a production build locally
bun lint
runs the linter