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-4/

Build an Order Processing Microservice

Problem/Feature Description

A food delivery company needs a Spring Boot microservice to handle order processing. Build it using Spring Boot 3 and Java 17+.

Domain concepts:

  • Order: id, customerEmail, deliveryAddress, status (PENDING/CONFIRMED/PREPARING/DELIVERED/CANCELLED), totalCents, createdAt
  • OrderItem: id, orderId, menuItemId, quantity, unitPriceCents
  • MenuItem: id, name, description, priceCents, category, available

Endpoints:

  • GET /api/menu -- list all available menu items
  • GET /api/menu/:id -- get a single menu item
  • POST /api/orders -- place a new order (customerEmail required, at least one item, all items must reference existing available menu items, calculate total automatically)
  • GET /api/orders/:id -- get order details including items
  • PATCH /api/orders/:id/status -- update order status (only valid transitions: PENDING->CONFIRMED->PREPARING->DELIVERED, or any->CANCELLED)

Business rules:

  • Orders can only contain available menu items
  • Order total is calculated from item quantities and menu item prices
  • Status transitions must follow the allowed flow
  • Customer email must be a valid format

Use PostgreSQL as the database (provide the schema, the app does not need to actually connect).

Output Specification

Produce a complete Spring Boot project with:

  • Main application class
  • All necessary Java source files for the domain logic
  • Configuration files
  • Database schema
  • Test classes for at least the order creation endpoint and status transition logic
  • pom.xml with dependencies listed

You may create additional files as needed for a well-structured codebase.

evals

tile.json