Coder Social home page Coder Social logo

customer-statement-processor's Introduction

Customer Statement Processor API

In our bank we receive monthly deliveries of customer statement records. This information is delivered in JSON Format. These records need to be validated.

Assignment Description

Implement a REST service which receives the customer statement JSON as a POST data, Perform the below validations

  1. All transaction references should be unique
  2. The end balance needs to be validated ( Start Balance +/- Mutation = End Balance )

Installation & Execution Steps

Prerequisties

  • Java 11
  • Maven 3.6.3
  • Docker 20.10.3 (Only need when you build docker image)

Dependencies

  • Spring boot 2.4.2 - Spring Framework
  • Swagger 3.0.0 - REST API Documentation (Swagger)
  • lombok 1.18.16 - Java Library
  • Jacoco Plugin 0.8.2 - Unit Test Coverage Plugin
  • pitest 1.6.2 - Mutation Testing

Execution

  1. Checkout the source code

      git clone https://github.com/techragesh/customer-statement-processor.git
      cd customer-statement-processor
    
  2. Build the application

    mvn clean install
    
  3. Run the application

    mvn spring-boot:run
    
  4. Build the docker image

    mvn spring-boot:build-image
    
  5. Build Test Reports

    mvn test site:site
    

Run application through Docker Image

docker run -p 8090:8090 --name "customer-statement-processor" customer-statement-processor:0.0.1-SNAPSHOT

REST API Documentation

After running the application and browse the swagger api url

Swagger API Docs:

http://localhost:8090/v2/api-docs

Swagger API URL:

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

Screenshots

customer-api-swagger.png

customer-test-report-home.png

customer-test-report-jacoco.png

customer-test-report-pitest.png

Author

Ragesh Sharma

Happy Coding

customer-statement-processor's People

Watchers

James Cloos avatar Ragesh Sharma 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.