Giter VIP home page Giter VIP logo

inventory-management's Introduction

[Ballerina] Inventory management system

The sample is based on a simple API written for a inventory-management system. Following is the high level component diagram.

drawing

Following is the interface of the Order service.

type OrderService service object {
    *http:Service;

    resource function get orders() returns Order[]|error;
    resource function get orders/[int id]() returns Order|OrderNotFound|error;
    resource function post orders(NewOrder newOrder) returns OrderCreated;
};

Prerequisites

Setup environment

With Docker Compose

  1. Checkout the code base and move to the root folder.
  2. Execute build-docker-images.sh script to generate the necessary docker images.
  3. Execute docker compose up.

Without Docker Compose

  1. Setup a MySQL database.
  2. Execute the script init.sql in db-setup.
  3. Build and run the inventory_svc project.
bal build inventory_svc;
bal run inventory_svc/target/bin/inventory_svc.jar
  1. Build and run the order_svc project.
bal build order_svc;
bal run order_svc/target/bin/order_svc.jar

Try out

  • To start the completed setup run docker compose up.
  • To send request open inventory-mng-request.http file using VS Code with REST Client extension.

inventory-management's People

Contributors

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