Git Product home page Git Product logo

shop-rate's Introduction

Shop Rate

Web application to calculate product prices according to taxes charged for each product. The project front-end was implemented with Angular framework and project back-end with Spring Boot framework. The application use postgreSQL to data persistence.

combate3

System Architecture

Domain

combate3

  • Produto:

    • Attributes: id, name, price (without rate), totalRatePrice (rate or tax value) e productRateList (product rates or taxes)
    • Métodos: getTotalPrice (price with taxes included), getTotalRatePrice (product tax value)
  • ProductRate (contains rate information for each type of product):

    • Attributes: id, rate (percentage rate value), productType (unique by product rate)

System Flow (MVC Pattern)

combate3

  • Product Controller (end-point):

    • findAll: get all products
    • find: get product by id
    • save: save product
    • delete: delete product by id
    • getProductPrices: passing product ids, return product prices with taxes included
  • Product Service:

    • findAll: get all products
    • find: get product by query params
    • save: save product
    • delete: delete product by id
    • getProductPrices: calculate products total prices and taxes by the rates of each product
  • Product Repository (crud methods to handler product data)

Prerequisites

Getting Started

  • Front-End project: shop-rate-front-end folder
  • Back-End project: shop-rate-back-end folder

Build and Deploy Project

  • Install postgreSQL
    • Username: postgres
    • Password: admin
  • Create database with name: "shop_rate_db"
  • Create test database with name: "shop_rate_db_test"
  • Deploy Back-End:
    • In back-end folder run "bootRun" gradle the task
    • If possible import back-end to intellij ide and run gradle tasks
  • Deploy Front-End:
    • To download dependencies in front-end folder run: "npm install"
    • Run "npm start" in front-end folder

Run Tests

  • To execute tests run "test" gradle task
  • The test cases class are in shop-rate-back-end:
    • ../test/java/com/project/shoprate

License

  • GNU General Public License v3.0

shop-rate's People

Contributors

guilhermemelo18 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.