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

{
  "context": "Tests whether the agent proactively applies Spring Boot project structure best practices when building a blog platform with three domain concepts (Author, Post, Comment). The task requires pagination, status management, and slug generation but does not specify project organization — criteria check for package-by-feature, record DTOs, configuration, migrations, proper testing, and exception handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Package-by-feature layout",
      "description": "Code is organized by feature/domain (author/, post/, comment/ or similar) rather than by layer. Each feature has its own controller, service, repository, and DTOs in the same package.",
      "max_score": 15
    },
    {
      "name": "Record DTOs separate from entities",
      "description": "Request and response DTOs are Java records. JPA entities are not returned directly from controllers. Response DTOs for posts include nested author info and comment lists as separate record types.",
      "max_score": 12
    },
    {
      "name": "Configuration classes in config package",
      "description": "A dedicated config/ package holds @Configuration classes. Not scattered across feature packages.",
      "max_score": 8
    },
    {
      "name": "Multi-profile application.yml",
      "description": "Configuration uses application.yml with profile-specific files (dev/prod/test). Database and logging configuration varies by profile.",
      "max_score": 10
    },
    {
      "name": "Flyway or Liquibase migrations",
      "description": "Database schema for authors, posts, and comments is managed with Flyway or Liquibase migration files, not schema.sql or ddl-auto.",
      "max_score": 12
    },
    {
      "name": "Global exception handler",
      "description": "A @RestControllerAdvice class handles exceptions globally — not-found (404), validation (400), duplicate slug/email (409), and unexpected errors (500 with no stack trace leak).",
      "max_score": 10
    },
    {
      "name": "Test directory mirrors main",
      "description": "Test classes are in packages mirroring the main source tree structure.",
      "max_score": 8
    },
    {
      "name": "Slice tests used",
      "description": "Controller tests use @WebMvcTest or repository tests use @DataJpaTest, rather than @SpringBootTest for everything.",
      "max_score": 7
    },
    {
      "name": "Entity-DTO mapping",
      "description": "Mapper interfaces or methods handle entity-to-DTO conversion rather than inline conversion in controllers.",
      "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 eight endpoints are implemented with correct HTTP methods and status codes (201 for creation, pagination for listings).",
      "max_score": 5
    }
  ]
}

evals

tile.json