Inventory tracking system

Overview

Inventory Tracking Documentation

  • This is an inventory tracking web application (backend) for a logistics company with CRUD operations. Built with Java, Maven, Spring Boot, Spring Data, Spring Web, Hibernate and MySQL.
  • There are totally 7 classes in the domain directory(/src/main/java/inventory/tracking/domain/), forming a single inheritance tree(see below graph). The backend server provides RESTful APIs to the frontend. Domain classes can be added in future maintenance.

showcase1

Feature

Filtering based on fields/inventory count/tags/other metadata. Please see API section "get" methods for more information. Note both id & name are unique for each row of the database table.

Attention

This instruction is written based on Windows OS. Not sure whether other OSs can proceed smoothly.

Preparation before running

  • Get an IDE: Any IDE that can code Java, obtain Maven and Spring Framework plugins is accpetable. I use IntelliJ Ultimate: https://www.jetbrains.com/idea/download/
  • Get and Configure MySQL database: application.properties & pom.xml are configured with MySQL. Download server and workbench from: https://dev.mysql.com/downloads/. Attention: open the application.properties file under "/src/main/resources/" and make sure lines 3-5 conform with your local MySQL's configuration (localhost port, username, password). You can change the lines or change your local MySQL settings (do NOT change the "/tracking" part in line 3 if you want to follow below step).
  • Import sample MySQL database file: for testing purpose, a sample .sql file "/docs/exampleData.sql" can be imported with MySQL workbench(see below import picture). Note the schema name is "tracking", which is configured in line 3 of application.properties.

showcase2

Quick Start

  • Ensure the whole repo is cloned or downloaded and unzipped. Open as a project in your IDE and reload Maven file pom.xml. Then run TrackingApplication.java under "/src/main/java/inventory/tracking/" directory.
  • Open MySQL server and MySQL workbench. Ensure MySQL database is running and sample data is imported (see above "preparation" section). If you want to create data from scratch, see applicatoin.properties file configuration. Assigned schema name is "tracking".
  • Assigned API port is localhost:8090, which can be changed in application.properties. Now open postman, and you can test all APIs shown in below section.
  • Below is my demonstration:

showcase

APIs

You can copy & paste the bold links below to Postman url section. Remember to switch to correct method section in the dropdown menu. Also make sure to replace all url portions wrapped with "{}" with values in proper types. The italic parts in some urls are optional(put methods only).

  1. Get method (read):

    1. localhost:8090/api/product/get -> return all products' JSON data from the database.
    2. localhost:8090/api/product/get/id/{Long id} -> return the specified id product's JSON data from the database.
    3. localhost:8090/api/product/get/name/{String name} -> return the specified name product's JSON data from the database(name cannot duplicate).
    4. localhost:8090/api/product/get/electronics -> return eletronics type products' JSON data from the database.
    5. localhost:8090/api/product/get/computers -> return computers tagged products' JSON data from the database.
    6. localhost:8090/api/product/get/cellphones -> return cellphones tagged products' JSON data from the database.
    7. localhost:8090/api/product/get/clothing -> return clothing type products' JSON data from the database.
    8. localhost:8090/api/product/get/menclothes -> return menclothes tagged products' JSON data from the database.
    9. localhost:8090/api/product/get/womenclothes -> return womenclothes tagged products' JSON data from the database.
    10. localhost:8090/api/product/get/price?lowPrice={double lowPrice}&highPrice={double highPrice} -> return all products' JSON data falling within the price range from the database.
    11. localhost:8090/api/product/get/inventory?lower={int lower}&higher={int higher} -> return all products' JSON data falling within the inventory range from the database.
  2. Post method (create):

    1. localhost:8090/api/product/post -> add a new record to the database and return it. Please provide a JSON body in Postman such as:
      {"name": "Pixel6", "price": 500.0, "inventory": 999, "type": "electronics", "tag": "cellphone", "id": null}
  3. Put method (update):

    1. localhost:8090/api/product/put/id/{Long id}?name={String name}&price={Double price}&inventory={Integer inventory}&type={String type}&tag={String tag} -> update the specified id product's fields in the database. The to-be-updated attributes are selective and optional(shown as italic).
    2. localhost:8090/api/product/put/name/{String name}?price={Double price}&inventory={Integer inventory}&type={String type}&tag={String tag} -> update the specified name product's fields in the database. The to-be-updated attributes are selective and optional(shown as italic).
  4. Delete method (delete):

    1. localhost:8090/api/product/delete/id/{Long id} -> delete based on id and return a message if successfully deleted
    2. localhost:8090/api/product/delete/name/{String name} -> delete based on unique name(name of products cannot duplicate) and return a message if successfully deleted

About BootStrapData.java

File BootStrapData.java under "/src/main/java/inventory/tracking/bootstrap" is used for constructing sample database data. You can uncomment the whole file and rerun the project if more data are needed.

You might also like...

Backend For Human Resource Management System

Backend For Human Resource Management System

📝 Presentation This is a hrms project. At the backend of this project I used Java(Spring Boot) and I used PostgreSQL as database management. At the f

Aug 5, 2022

A repository that contains the backend part of the Human Resources Management System.

Human Resources Management System Backend A human resources management system is a form of human resources (HR) software that combines several systems

Dec 26, 2022

Hotels Management System - JavaFX GUI Application

Hotels Management System - JavaFX GUI Application

Hotels Management System Hotels Management System - JavaFX Application Does this repo deserve a star? I hope that. Let's talk about what can my progra

Aug 29, 2022

Hcode Online Judge(HOJ):An open source online judge system base on SpringBoot, Springcloud Alibaba and Vue.js !

Hcode Online Judge(HOJ):An open source online judge system base on SpringBoot, Springcloud Alibaba and Vue.js !

Hcode Online Judge(HOJ) 前言 基于前后端分离,分布式架构的在线测评平台(hoj),前端使用vue,后端主要使用springboot,redis,mysql,nacos等技术。 在线Demo:https://hdoi.cn 在线文档:https://www.hcode.top/

Dec 31, 2022

Rewrite of the dataconverter system for performance.

DataConverter This mod completely rewrites the dataconverter system for Minecraft. Please note that this fabric mod is not to be used. It is published

Nov 23, 2022

Human Resource Management System

Human Resource Management System

hrms Human Resource Management System 📌 Proje Hakkında N-Katmanlı Solid mimari yapısı ile hazırlanan, SpringBoot kullanılarak CRUD işlemlerinin yapıl

Jun 6, 2022

N-Layer Architecture human resource management system project with Java.

N-Layer Architecture human resource management system project with Java.

HRMS Project Backend N-Layer Architecture human resource management system project with Java. Report Bug · Request Feature About The Project Built Wit

Dec 26, 2022

Human Resources Management System Using React with Java

Human Resources Management System Using React with Java

File Directory Main Adapters Abstract Concretes Business Abstract Concretes Core / Utilities Regex Results Upload Data Access Abstract Entities Concre

Jul 28, 2021

Java - Backend for Human Resource Management System

HRMS (Human Resource Management System) Main Directory PostgreSQL (Heroku)Live API Java(1.8) - Spring Boot based. Dependencies: Spring Boot DevTools S

Dec 26, 2022
Owner
Rui Min
YorkU CS student with interesting projects
Rui Min
A minecraft plugin to automatically use a totem of undying from your inventory

AutoTotem Spigot Download https://www.spigotmc.org/resources/autototem.99443/ Automatically use totems of undying from your inventory without needing

null 2 May 5, 2022
Tracks information (skills, inventory, bank, etc.) about a group ironman player and sends it to a website for other group members to view

Group Ironmen Tracker Plugin Website: groupiron.men Source for frontend and server: https://github.com/christoabrown/group-ironmen This plugin tracks

Christopher Brown 7 Nov 11, 2022
NFT sales tracking on the secondary market, on the Songbird network and notification via a Discord bot

SgbNftMarketDiscordBot Fork this project for any other chain using Ethereum Virtual Machine (EVM) like ETH, FLR, BSC etc If you like the project or fi

null 4 Jan 9, 2023
Flash Sale System AKA. seckill system

FlashSaleSystem Project highlights Distributed system scheme From a single machine to a cluster, it is easy to scale horizontally simply by adding ser

wsbleek 12 Sep 13, 2022
Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

null 4 Oct 4, 2022
E-Commerce System Simulation with layered architecture

ECommermeSimulation E-Commerce System Simulation with layered architecture Users can become a member of the system by entering their information. User

Esranur Türkmen 5 Jul 16, 2021
Human Resource Management System (Java & React)

?? HumanResourceManagementSystem ?? Steps İş Arayanlar sisteme kayıt olabilmelidir. ✔️ İş verenler sisteme kayıt olabilmelidir. ✔️ ️ Sisteme genel iş

Furkan Paşaoğlu 5 Sep 12, 2022
Human Resources Management System

Human Resource Management System ( HRMS ) The following tools / languages will be used in this project; Java (Spring Boot based) - on the Backend side

Fatih Deniz 17 Dec 1, 2022
Human Resource Management System - Backend

Human Resource Management System - Backend File Structure ??️ Layered Architecture Entities - The package in which the assets are kept DataAcces - Pac

Tarık Kaan Koç 30 Jan 1, 2023
Human resource management system with java spring

Pair Programming This project developed with Emin Ümüt Erarslan a.k.a 8CA5F İnsan Kaynakları Yönetim Sistemi Bu proje Engin Demiroğ' un Java-React kam

Burak KALAYCI 45 Dec 26, 2022