onurcakirtr/inventory.system — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a backend inventory management service for products and stock.

I want to create products with a unique SKU and name, update product details later, search products by name, SKU, price range, and whether they’re in stock, and optionally see their stock history. Stock shouldn’t just be a number someone edits. It should work through add and remove transactions, so every stock change is saved as history. When stock is added, calculate and maintain the weighted average unit cost for that product.

Protect the API with Keycloak JWT login, but leave Swagger and health checks open so I can test it easily. Use Java and Spring Boot with PostgreSQL, and make it runnable with Docker Compose including the app database, Keycloak, and a simple database admin UI.

Please include validation for duplicate products, invalid prices, and removing more stock than exists. Add clean error responses, created and updated audit fields, Swagger docs, and a Postman collection or clear examples so I can test login, product creation, stock add, stock remove, update, and filtering.

Want more depth? Deep Reverse