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

criteria.jsonevals/scenario-1/

{
  "context": "Tests whether the agent proactively applies Spring Boot project structure best practices when building a complex appointment booking service with four domain concepts (Doctor, Patient, TimeSlot, Appointment). The task has rich business logic and multiple interacting domains but does not specify project organization — criteria check for package-by-feature, record DTOs, configuration, migrations, test structure, and exception handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Package-by-feature layout",
      "description": "Code is organized by feature/domain (doctor/, patient/, appointment/ or similar groupings) rather than by layer. Each domain has its own controller, service, repository, and DTOs together in one package.",
      "max_score": 15
    },
    {
      "name": "Record DTOs separate from entities",
      "description": "Request and response DTOs are Java records. Entities are not returned directly. Response DTOs for appointments include nested doctor and patient info as separate record types rather than exposing raw entity relationships.",
      "max_score": 12
    },
    {
      "name": "Configuration classes in config package",
      "description": "A dedicated config/ package holds all @Configuration classes, separate from feature packages.",
      "max_score": 8
    },
    {
      "name": "Multi-profile application.yml",
      "description": "application.yml with profile-specific files for dev/prod/test. Database and logging settings vary by profile.",
      "max_score": 10
    },
    {
      "name": "Flyway or Liquibase migrations",
      "description": "Database schema for all four tables (doctors, patients, time_slots, appointments) is managed with Flyway or Liquibase migration files, not schema.sql or ddl-auto.",
      "max_score": 12
    },
    {
      "name": "Global exception handler",
      "description": "A @RestControllerAdvice handles exceptions globally with consistent error responses. Handles not-found, validation, business rule violations (slot unavailable, overlapping slots, invalid cancellation), and unexpected errors.",
      "max_score": 10
    },
    {
      "name": "Test directory mirrors main",
      "description": "Tests are in packages mirroring main source tree structure with tests across multiple features.",
      "max_score": 8
    },
    {
      "name": "Slice tests used",
      "description": "Tests use @WebMvcTest or @DataJpaTest for focused testing instead of @SpringBootTest for all tests.",
      "max_score": 7
    },
    {
      "name": "Entity-DTO mapping",
      "description": "Mapper interfaces or methods handle entity-to-DTO conversion. Especially important for the Appointment response which must compose data from multiple entities.",
      "max_score": 5
    },
    {
      "name": "OSIV disabled and graceful shutdown",
      "description": "spring.jpa.open-in-view is false. server.shutdown is graceful.",
      "max_score": 5
    },
    {
      "name": "Actuator configured",
      "description": "Actuator dependency included and health endpoint configured.",
      "max_score": 3
    },
    {
      "name": "Endpoints functional",
      "description": "All nine endpoints are implemented with correct HTTP methods and status codes.",
      "max_score": 5
    }
  ]
}

evals

scenario-1

criteria.json

task.md

tile.json