Coder Social home page Coder Social logo

shop's Introduction

Cybershop Application for WSD

Starting the application

Use the following command to start the application:

gradlew bootRun 

Once the application is started the following can be accessed:

  1. Swagger UI can be accessed from here:

    http://localhost:8080/swagger-ui/index.html

  2. Grafana/Loki can be accessed from here:

    http://localhost:3000/

    To get the log level for the application, the following actuator endpoint can be used:

    curl http://localhost:8080/actuator/loggers/com.cyanice.shop

    To change the log level for the application, the following command can be used:

    curl -i -X POST -H 'Content-Type: application/json' -d '{"configuredLevel": "TRACE"}'
    http://localhost:8080/actuator/loggers/com.cyanice.shop

Postman

Postman collection export for this project can be found here:

extra/shop_postman_collection.json

Running the test cases

Use the following command to run all the test cases:

gradlew test 

The html test report is generated in the following folder:

build/reports/tests/test/index.html 

API endpoints

  1. Return the wish list of a customer:

    http://localhost:8080/api/customer/:id/wishlist?pageNo=0&pageSize=10

  2. Return the total sale amount of the current day:

    http://localhost:8080/api/order/sale-on-date

  3. Return the max sale day of a certain time range:

    http://localhost:8080/api/order/max-sale-date?from=2024-04-20&to=2024-04-21

  4. Return top 5 selling items of all time (based on total sale amount):

    http://localhost:8080/api/order/popular-products?duration=All&category=Amount

  5. Return top 5 selling items of the last month (based on number of sales):

    http://localhost:8080/api/order/popular-products?duration=LastMonth&category=Count

** All the date (yyyy-MM-dd) value for input are considered to be in UTC

shop's People

Contributors

muhammad-towfique-imam avatar

Watchers

 avatar

shop's Issues

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.