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

Build an Appointment Booking Service

Problem/Feature Description

A healthcare clinic needs a Spring Boot service for appointment booking. Build it with Spring Boot 3 and Java 17+.

Domain concepts:

  • Doctor: id, name, specialty, email
  • Patient: id, name, email, phone, dateOfBirth
  • TimeSlot: id, doctorId, startTime, endTime, available (boolean)
  • Appointment: id, patientId, timeSlotId, reason, status (SCHEDULED/COMPLETED/CANCELLED/NO_SHOW), notes, createdAt

Endpoints:

  • POST /api/doctors -- register a doctor (name, specialty required)
  • GET /api/doctors -- list doctors, optional filter by specialty
  • POST /api/doctors/:id/slots -- create available time slots for a doctor (array of start/end time pairs)
  • GET /api/doctors/:id/slots -- get available slots for a doctor on a given date (query param: date)
  • POST /api/patients -- register a patient
  • POST /api/appointments -- book an appointment (patientId, timeSlotId, reason). The time slot must be available and in the future.
  • GET /api/appointments/:id -- get appointment details including doctor and patient info
  • PATCH /api/appointments/:id/cancel -- cancel an appointment (only SCHEDULED appointments can be cancelled, release the time slot)
  • GET /api/patients/:id/appointments -- list a patient's appointments

Business rules:

  • Time slots cannot overlap for the same doctor
  • Only available future time slots can be booked
  • Booking marks the time slot as unavailable
  • Cancellation marks the time slot as available again
  • Only SCHEDULED appointments can be cancelled

Use PostgreSQL for the database.

Output Specification

Produce a complete Spring Boot project with:

  • Main application class
  • All Java source files
  • Configuration files
  • Database schema
  • Test classes for booking and cancellation flows
  • pom.xml with dependencies

You may create additional files as needed.

evals

scenario-1

criteria.json

task.md

tile.json