Git Product home page Git Product logo

invoice-service's Introduction

Vertx-invoice-service

Sample reactive, event-driven web app in vertx and java. App uses actor concurrency model (http://tutorials.jenkov.com/java-concurrency/concurrency-models.html#actors-vs-channels, https://www.baeldung.com/akka-actors-java). In vertx actor is called verticle. The goal of this project is learning about Vertx framework. Theres no persistence layer.

Features:

  • CRUD of the invoice
  • PDF generation of the given invoice

Tech stack:

Building and running

  • Build: configure gradle.properties and gradle build
  • Run: run from the project root catalog: java -jar build/vertx-invoice-service.jar -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
  • Debug on 5005: run from the project root catalog: java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector build/vertx-invoice-service.jar

Create invoice

  • POST http://localhost:8080/invoice Content-Type: application/json; charset=UTF-8 { "name": "Tomasz", "surname": "Murglin", "amount": "3000.0", "currencyCode": "EUR" }

Delete invoice

Find invoice

Replace invoice

  • POST http://localhost:8080/invoice Content-Type: application/json; charset=UTF-8 { "name": "Tomasz", "surname": "Murglin", "amount": "3000.0", "currencyCode": "EUR" }

TODO:

  • Exception handling in rest controllers
  • Use vertx service proxy in services and repository layers
  • Pdf things with pdf creator run in worker verticle
  • Find all invoices and pdfs endpoint
  • Add CDI by Guice or Dagger
  • Add transactionality
  • Add event sourcing
  • Tests using spock and junit + contract tests for messages
  • Replace InMemoryStorage with h2 + reactive client
  • Hot deploy in dev mode
  • Ci/cd integration
  • Dockerization
  • Api doc
  • CORS setup
  • Extended domain model
  • Implement more features

invoice-service's People

Stargazers

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