The idea of this project to create an example application solving "Sales Tax Problem."
Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty is an additional sales tax applicable to all imported goods at a rate of 5%, with no exemptions.
When I purchase items, I receive a receipt which lists the name of all the items and their price (including tax), finishing with the total cost of the items, and the total amounts of sales taxes paid. The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax.
- 
Data consistency between modules is limited. There is no control between modules about usage. You can delete data easily.
 - 
Application configuration is mostly hardcoded but adding configuration management is in the TODO list.
 - 
Rest API is primitive so you can get errors that you shouldn't see. Error management is missing in API side
 
For building or developing this application you need to install and configure following go, dep and build-essential
A quick introduction of the minimal setup you need to get STP up & running.
for OSX :
> make & bash -c release/stp-darwin-amd64for Linux :
> make & bash -c release/stp-linux-amd64When you execute this commands, you'll create binaries under $(PROJECT_DIR)/release folder and execute binary.
git clone https://github.com/aweris/stp.git
cd stp/
make getmake runmake testmakeor
make build
the main difference between these 2 commands is make is running clean,get, test before starting the build
make build-darwinmake build-linuxCleaning development store and release folder.
make cleanTriggers a demo scenario in the server. After you run this endpoint, you can check demo data in the server.
NOTE Load demo imports specific data. You should run only once. You can see it's output in application logs. After loading data, you can use Rest API. You need to run make clean for reset development db.
curl -X POST http://localhost:8080/demoYou can find more info in docs about rest API