Skip to content

Simple project to calculate how much money your employer pays for your work monthly in Ecuador, based on your gross salary.

Notifications You must be signed in to change notification settings

bpovea/stipendium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STIPENDIUM APP

This project is a simple ReactJS Web application to compute the total value that an employer uses monthly for each employee, or compute the equivalent ecuadorian gross salary based on an invoice subtotal/total.

Why

Recently, remote work from other countries has become popular in Ecuador. Proposals usually look very good, but, there are many things that you should take care of. For example, a remote payment of $1500.00 is equivalent to $1100.00 in local gross salary, because many benefits are included on a local contract and should be considered, and usually, most people omit them or they don't know how to calculate it.

Live Preview

click HERE

preview

How calculations works

Computation uses as inputs:

  • Gross salary
  • Other optional incomes:
    • Bonus
    • Annual base profit
    • Other fixed monthly incomes

The result will be:

  • Job's laws discounts:
    • Personal contribution
    • Spouse contribution (if it's necesary)
  • Other incomes:
    • Monthly/Provisioned thirteenth salary
    • Monthly/Provisioned fourteenth salary
    • Paid vacations
  • Company contributions:
    • Company contribution
    • IECE SECAP contribution
  • Net salary
  • Cost per employee

Another option, if you are interested in how much represents an invoice value in ecuadorian gross salary, you can just set the invoice subtotal, and the conversion will be computed.

Github Actions

This project uses Github Actions to automate updating server on each pull, this is taking advantage of run-ssh-command action in Marketplace.

You can see the action code on: .github/workflows/update-action.yml.

Bash code on server is:

#!/usr/bin/env bash

cd /path/to/my/project
git pull --rebase

# Store files changed files 
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
# Search for coincidence by specific filename stored in $1
checkForChangedFiles() {
    echo "$changedFiles" | grep --quiet "$1" && eval "$2"
}
# If change is detected, install to refresh dependencies
packageJsonHasChanged() {
  echo "Changes to package.json detected, installing updates"
  npm install
}

checkForChangedFiles package.json packageJsonHasChanged

# Stop stipendium service if it's running
node_process_id=$(pidof node)
echo $node_process_id
if [[ ! -z $node_process_id  ]];
  then
    service stipendium stop
fi

# Run again service
service stipendium start

Initially, the app was executed using (npm start &) to run in the background, but it causes a nonstop Github Action, to fix that, I improved the running of the web app by creating a new service:

[Unit]
Description = My Web App

[Service]
ExecStart=/usr/bin/npm run start --prefix /path/to/my/project
Restart=always

[Install]
WantedBy=multi-user.target

SSL certificate

The SSL certificate was installed using Free lets-encrypt cerbot on a Ubuntu 20.04 server with NGINX like a reverse proxy.

Author

Byron Povea github, personal web page click here

About

Simple project to calculate how much money your employer pays for your work monthly in Ecuador, based on your gross salary.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published