Skip to content

Developed a simple inventory management system using Spring Boot, allowing product addition, display, search by name, and low-stock alerts. Utilized Java, MySQL Database, and Swagger-UI for the interface.

Notifications You must be signed in to change notification settings

Avinash4231/Simple-Inventory-Tracker-using-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Inventory Tracker

Project Description

The Simple Inventory Tracker is a basic application built using Spring Boot that allows users to manage a small set of products. The system includes features such as adding and displaying products, searching for products by name, and displaying products that need restocking (quantity below a specified threshold).

Demo

Inventory.Application.mp4

Features

  • Add Products: Add new products to the inventory.
  • Display Products: View the list of all products.
  • Search Products: Search for products by name.
  • Low Stock Alert: Display products that need restocking.

Requirements

  • Programming Language: Java
  • Framework: Spring Boot
  • Database: MySQL Database
  • User Interface: Swagger-UI for API documentation and interaction

Getting Started

Prerequisites

  • Java 11 or higher
  • Maven

Installing

  1. Clone the repository:

    git clone https://github.com/yourusername/simple-inventory-tracker.git
    cd simple-inventory-tracker
  2. Build the project:

    mvn clean install
  3. Run the application:

    mvn spring-boot:run
  4. Access the application:

    • Swagger UI: http://localhost:8080/swagger-ui.html

API Endpoints

Add a Product

  • URL: /api/products
  • Method: POST
  • Request Body:
    {
        "name": "Product Name",
        "quantity": 10
    }
  • Response: The added product

Get All Products

  • URL: /api/products
  • Method: GET
  • Response: List of all products

Search Product by Name

  • URL: /api/products/search
  • Method: GET
  • Parameters: name (string)
  • Response: The product with the given name

Get Low Stock Products

  • URL: /api/products/low-stock
  • Method: GET
  • Parameters: threshold (integer)
  • Response: List of products with quantity below the threshold

Database Configuration

The application uses an MySQL in-memory database. The configuration is specified in src/main/resources/application.properties:

spring.datasource.url=jdbc:mysql://localhost:3306/avidb
spring.datasource.username=root
spring.datasource.password=Anynomous
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.hibernate.ddl-auto=update 

About

Developed a simple inventory management system using Spring Boot, allowing product addition, display, search by name, and low-stock alerts. Utilized Java, MySQL Database, and Swagger-UI for the interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages