GithubHelp home page GithubHelp logo

caspering / inventory_management Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 326 KB

This is a Spring Boot project for an inventory management system and e-checkout counter.

License: MIT License

Java 100.00%
spring spring-boot spring-data-jpa spring-rest-api mapstruct univocity-parsers swagger-documentation mysql docker-container hibernate-validator hateoas inventory-management receipt-numbers purchase-order transaction

inventory_management's Introduction

Spring Boot Inventory Management System And e-checkout Counter

Requirements

Online-Grocery store Admin:

  • Create a back-end software to maintain Inventory of items in a general store.
  • input for launching application: 3 csv files with list of fruits & Vegitables(f&v), processed food items & stationary.
  • All the items have name, 15-digit barcode number, price & in-stock quantity
  • processed food can be vegan or non-vegan. they have manufacturing & expiring dates
  • Stationary is limited to only one item per type per purchase order.

Add an e-checkout counter

  1. Stationary is limited to one quantity per item type per customer purchase order.
  2. Purchase order will take: • date of purchase, • list of items (should accept bar-code or name), • quantity of each, • payment type (cash or card), • membership number(optional).
  3. Each purchase order will be assigned a receipt number on successful transaction.
  4. Inventory should be updated after each transaction.
  5. Maintain list of memberships with membership number, name, contact email & phone number.

Expected output(s):

REST APIs for:

  • All data is to be persisted.
  • REST API to add more quantity to stock (name/barcode & quantity)
  • REST APIs for list of,
  • all items in-stock with available quantity with details
  • in-stock f&v with details
  • in-stock processed food with details
  • in-stock vegan processed food with details
  • in-stock vegan processed food with details
  • in-stock stationary with details
  • Transaction details by receipt number.
  • Receipt numbers by membership number.
  • Receipt numbers without membership number.
  • Total sale amount on a specific date or between two dates.
  • Total quantities of each item sold on a specific date or between two dates.
  • Log remaining quantities of items at every configurable number of minutes.
  • Add new member and generate membership number.
  • Search items by full/partial name/barcode.
  • Maintain list of discounts on items. These should be applied at check-out and should be in receipt details.
  • List of suggested items based on previous purchases.
  • Unit testing.

Valid csv-File sample content:

F&v file:
Name Barcode Price qty
Banana 123456789000001 0.99 15
Processed food file:
Name Barcode Price qty type mfg exp
Potato chips 789000011 2.99 5 v 3/20/2020 8/09/2020
stationary:
Name Barcode Price qty
Glue stick 123456789000011 1.99 15

inventory_management's People

Contributors

awells10-chwy avatar caspering avatar kasperingops avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inventory_management's Issues

Implement GET REST endpoint for produce (controller)

Acceptance Criteria

  • A produce controller class exists
  • GET /produce/{id} returns a JSON object representing the requested fruit or veggie
  • If the item doesn't exist, the endpoint returns 404 NOT FOUND
  • A test class contains two test cases (using MockMVC), verifying both the found not found cases

Implement Service layer for Produce

Acceptance Criteria

  • CRUD operations for a single produce item exist
  • Create
  • Read
  • Update
  • Delete
  • Tests exist to verify all four actions using a mock repository

Add stationary model entity

Acceptance Criteria

  • A stationary entity model class is added with a corresponding repository class
  • A service exists with CRUD operations
  • A test class is added that exercises the CRUD operations

Suggestions

  • This would be a good time to consolidate common properties into a class between BaseEntity and the concrete product classes
  • Refactoring at this point will give you an opportunity to test for regression with your unit tests

Refactor FruitAndVege service to use DTO object

Acceptance Criteria

  • A FruitAndVege DTO class exists with attributes identical to FruitAndVege
  • A mapper interface (mapstruct) is defined mapping an entity object to DTO and vice versa
  • The service class is refactored to accept DTOs on save operations and return DTOs on read operations
  • The service tests are updated to use DTOs as required

Add processed food entity model (plus Repository, Service, and Bootstrap class)

Acceptance Criteria

  • processed food entity model exists with a corresponding repo
  • model has additional type, mfg date, and expiration date fields
  • bootstrap class is added (or existing produce bootstrap class added to) that loads a few sample processed food items
  • Service class with CRUD operations is implemented
  • A test class exists with a test method for each CRUD operation

Buggy

In postman processed food's get request works when searched by ID but doesnt when searched by food type.
example: /api/v1/processedFoods/VEGAN returns an error log
/api/v1/processedFoods/by-name/VEGAN returns an error log

these should return all processed foodtype VEGAN.
buggy

Create persistence model for produce (fruits & veggies)

Acceptance Criteria

  • A base entity class exists
  • An entity class exists with the appropriate fields
  • A corresponding repository exists for the produce entity
  • When the application runs, a corresponding table exists in H2 with the appropriate columns

Add CSV dependency and implement CSV record to produce object mapper

Acceptance Criteria

  • Add Apache Commons CSV dependency: Maven: Apache Commons CSV
  • Implement converter class for extracting produce data from a CSVRecord object
  • Unit test is added to test conversion: test the happy path and come up with a few edge cases

Considerations

  • Here is the Apache Commons CSV documentation: Apache Commons CSV Docs
  • Check out the CSVRecord Javadoc for information on how to extract fields
  • We'll use this module in another issue when we implement processing an entire CSV input file

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.