Skip to content

Spring Boot microservices with Feign-based communication for order and inventory management

Notifications You must be signed in to change notification settings

SpartanPike/order-inventory-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Order & Inventory Microservice System

This project demonstrates a Spring Boot-based microservice architecture with synchronous communication using Feign clients.


πŸ“¦ Microservices

1️⃣ Inventory Service (inventory-service)

  • Manages product stock levels
  • Exposes /inventory/check to validate availability

2️⃣ Order Service (demo)

  • Handles item creation and retrieval
  • Uses Feign to call Inventory Service before saving an item

πŸ”„ Communication Flow

Order Service (Feign Client) β”‚ └───▢ Inventory Service /inventory/check?product=fridge&qty=2

Architecture Diagram

+-------------------+ Feign Client +----------------------+ | | ───────────────────────▢ | | | Order Service | | Inventory Service | | (demo) | ◀─────────────────────── | (inventory-service) | | | Stock Response | | +-------------------+ +----------------------+

User β†’ /items (POST) β†’ Order MS β†’ checks stock β†’ Inventory MS ← 400 if out of stock, else saves item


πŸš€ How to Run

# Inventory Service
cd inventory-service
mvn spring-boot:run -DskipTests

# Order Service
cd demo
mvn spring-boot:run -DskipTests

🧠 Tech Stack
Spring Boot

Spring Cloud OpenFeign

REST APIs

Maven

About

Spring Boot microservices with Feign-based communication for order and inventory management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages