Giter Club home page Giter Club logo

stock-management's Introduction

Stock Management ๐Ÿ“Š

  The application consists of 3 parts. Category, Subcategory and Product. 
* Each category has a name and one or more subcategories.
* Each subcategory has a name, category, and one or more products.
* Each product has a name, price, stock quantity and a subcategory.
* If requests are received at the same time for the only product left in stock, only one request get successful response.

Tech Stack & Patterns ๐ŸŽฏ

  • Java 11
  • Spring Boot
  • Maven
  • Hibernate
  • Mapstruct
  • SLF4J
  • Junit
  • Redis
  • Docker
  • Swagger
  • H2
  • Factory Pattern
  • CQRS Pattern

Prerequisites โš ๏ธ

Tech Version
Java 11.0.11
Maven 3.8.1
Docker 20.10.6
Redis 3.2.100

Build & Run ๐Ÿš€

Docker

docker-compose up -d --build

Backend

mvn clean install -Dspring.profiles.active=local

mvn --projects io.github.oguzhancevik:stock-management spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=local"

Design ๐ŸŽจ

DesignPhoto

APIs ๐Ÿ“

API Method Description
/api/categories GET Returns categories
/api/categories/{categoryId} GET Returns a specific category
/api/categories POST Creates a new category
/api/categories/{categoryId} PUT Updates a specific category
/api/categories/{categoryId} DELETE Deletes a specific category
/api/subcategories GET Returns sub categories
/api/subcategories/{subCategoryId} GET Returns a specific sub category
/api/subcategories POST Creates a new sub category
/api/subcategories/{subCategoryId} PUT Updates a specific sub category
/api/subcategories/{subCategoryId} DELETE Deletes a specific sub category
/api/products GET Returns products
/api/products/{productId} GET Returns a specific product
/api/products/search/category/{categoryId} GET Returns products by category id
/api/products/search/subcategory/{subCategoryId} GET Returns products by sub category id
/api/products/search/name/{productName} GET Returns products by product name
/api/products/search/price/?min=200&max=500 GET Returns products by price interval
/api/shopping-cart POST Returns successful / unsuccessful purchase result

Postman Collection ๐Ÿ“Œ

Click Here

Swagger UI ๐ŸŽ

http://localhost:8080/swagger-ui/

License ๐Ÿ”‘

Distributed under the MIT License. See LICENSE for more information.

stock-management's People

Contributors

codacy-badger avatar elifnurcevik avatar oguzhancevik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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