CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/springboot-project-structure

Spring Boot project structure — package-by-feature, record DTOs, Flyway migrations, multi-profile config, actuator, proper test structure

84

4.04x
Quality

76%

Does it follow best practices?

Impact

97%

4.04x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-3/

Build an Inventory Management Service

Problem/Feature Description

A warehouse company needs a Spring Boot service to track product inventory across multiple warehouse locations. Build it with Spring Boot 3 and Java 17+.

Domain concepts:

  • Product: id, sku (unique), name, description, category, weightGrams
  • Warehouse: id, name, location, capacity
  • InventoryRecord: id, productId, warehouseId, quantity, lastUpdated

Endpoints:

  • POST /api/products -- create a product (sku must be unique, name required)
  • GET /api/products -- list products, optional filter by category
  • GET /api/products/:id -- get product details
  • POST /api/warehouses -- register a warehouse
  • GET /api/warehouses -- list all warehouses
  • POST /api/inventory/receive -- receive stock (productId, warehouseId, quantity to add)
  • POST /api/inventory/transfer -- transfer stock between warehouses (productId, fromWarehouseId, toWarehouseId, quantity)
  • GET /api/inventory/product/:productId -- get stock levels across all warehouses for a product

Business rules:

  • SKU must be unique across all products
  • Cannot transfer more stock than available in the source warehouse
  • Receiving stock creates or updates the inventory record
  • Transfer is atomic — deduct from source and add to destination

Use PostgreSQL for the database.

Output Specification

Produce a complete Spring Boot project with:

  • Main application class
  • All Java source files for the domain logic
  • Configuration files
  • Database schema/migrations
  • Test classes covering at least inventory receive and transfer operations
  • pom.xml with dependencies

You may create additional files as needed.

evals

tile.json