Code Monkey home page Code Monkey logo

stakater-nordmart-review's Introduction

stakater-nordmart-review

Spring Boot microservice for product review

Introduction

This project implements review functionality for the products; it provides CRUDS API for reviews.

User scenarios

Review Operations

  • Add: add a product review
  • Delete: delete a product review
  • Get: get all reviews for a given product

Dependencies

It requires following things to be installed:

  • Java: ^8.0.
  • Maven
  • Mongodb

Dummy Data

Some dummy data is loaded into the system which can be found here

Deployment strategy

Local machine

To run the application locally use the command given below:

mvn clean spring-boot:run

Kubernetes/OpenShift

Here is the step by step for local development with Tilt

APIs

  • /api/review/{productId}
    • Get a review for the given product id
  • /api/review/{productId}/{customerName}/{rating}/{text}
    • Add a review for the given product id
  • /api/review/{reviewId}
    • Delete a review for the given product id

Configuration

TODO

Test API

Get Review

curl localhost:8080/api/review/329199

Add a Review with Username: bumblebee, ProductId: 329199, Review Rating: 5 and Comment: great

curl -X POST 'localhost:8080/api/review/329199/bumblebee/5/great'

Delete a Review with reviewId: 6277b5c05c21830faf89a3bf

curl -X DELETE localhost:8080/api/review/6277b5c05c21830faf89a3bf

Alerts & Monitoring

A grafana dashboard is setup to display the number of reviews overtime. The trend can be viewed by adding more reviews using the add API Grafana Dashbaord

An Alertmanager rule is setup to send alerts if the total rating <= 2 goes beyond 5

DevSecOps scans

tooling:

  • trivy
  • rhacs
  • stackrox
  • checkov
  • sonar

stakater-nordmart-review's People

Contributors

rasheedamir avatar hanzala1234 avatar ahmedwaleedmalik avatar faizanahmad055 avatar osamakhan220 avatar sabkat avatar nilsffcg avatar stakater-user avatar julianrubino avatar lilshah avatar renovate-bot avatar bilalbokharee avatar aliartiza75 avatar kahootali avatar renovate[bot] avatar hussnain612 avatar eeroarvonen avatar tehreemnisa avatar mustafastakater avatar asfamumtaz avatar usamaahmadkhan avatar hazim1093 avatar michaelli202112 avatar juansasa avatar dependabot[bot] avatar

Stargazers

 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.