Coder Social home page Coder Social logo

bpovea / stipendium Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 436 KB

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

Home Page: https://stipendium.bycarga.com/

HTML 9.41% CSS 5.45% JavaScript 85.14%
ecuador salary payroll

stipendium's Introduction

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

stipendium's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.