Tier: Preview. Java Spring Boot is a preview stack — Archiet generates real, idiomatic Spring Boot 3 / Java 21 code, boot-tested in CI, with cross-stack parity work ongoing relative to the four stable stacks. The output is production-shaped; review it before shipping rather than treating it as runtime-certified.
What generating a Spring Boot app from requirements produces
src/main/java/com/{package}/
config/ SecurityConfig.java, CorsConfig.java, DatabaseConfig.java
controller/ AuthController.java, {Entity}Controller.java (@RestController)
service/ AuthService.java, EmailService.java, {Entity}Service.java
repository/ {Entity}Repository.java (extends JpaRepository<{Entity}, UUID>)
model/ User.java, Workspace.java, {Entity}.java (@Entity)
dto/ {Entity}Request.java (@Valid), {Entity}Response.java
security/ JwtTokenProvider.java, JwtAuthenticationFilter.java
exception/ GlobalExceptionHandler.java (@ControllerAdvice)
src/main/resources/
application.properties # ${env:DATABASE_URL}, no hardcoded secrets
db/migration/ # V1__create_users.sql ... one Flyway file per entity
src/test/java/com/{package}/ # @SpringBootTest + MockMvc + Mockito
pom.xml
Dockerfile # eclipse-temurin:21 build → JRE runtime
docker-compose.yml
openapi.yaml
Spring-specific patterns Archiet gets right
Method-level security with @PreAuthorize on a tenant-scoped query. Authorization is explicit on the controller, and the service filters by workspace:
@GetMapping("/api/v1/orders")
@PreAuthorize("hasAnyRole('ADMIN','MEMBER')")
public Page<OrderResponse> list(@AuthenticationPrincipal AppUser user, Pageable pageable) {
return orderService.listForWorkspace(user.getWorkspaceId(), pageable)
.map(OrderResponse::from);
}
JPA entities with explicit indexing and optimistic locking:
@Entity
@Table(name = "orders", indexes = @Index(columnList = "workspace_id"))
public class Order {
@Id @GeneratedValue(strategy = GenerationType.UUID)
private UUID id;
@Column(name = "workspace_id", nullable = false)
private UUID workspaceId;
@Version
private long version;
}
JWT in httpOnly cookies. JwtAuthenticationFilter reads the token from a HttpOnly; Secure; SameSite=Lax cookie on every request and populates the SecurityContext. BCryptPasswordEncoder hashes passwords; auth endpoints are rate-limited with Bucket4j.
DTOs on every boundary. Controllers never return @Entity objects — a {Entity}Response projection prevents lazy-loading leaks and over-exposure. @Valid request DTOs return 422 on validation failure via GlobalExceptionHandler.
PostgreSQL + Flyway. No H2 in production config, no ddl-auto=update. Schema changes are versioned Flyway migrations.
What is included beyond the Spring Boot backend
- Next.js frontend — every screen from your manifest, wired to the API
- Docker — multi-stage build (~180MB JRE image) +
docker-compose.ymlwith PostgreSQL and Redis - GitHub Actions —
checkstyle→mvn verify→docker build→ deploy - Architecture docs — ADRs under
docs/decisions/for each material decision - OpenAPI 3.1 — via SpringDoc, plus a standalone
openapi.yaml
Related
- Step-by-step walkthrough: Generate a production Java Spring Boot app from your PRD
- Template-oriented page: Spring Boot boilerplate generator
- All use cases: archiet.com/use-cases
FAQ
Does the generated Spring Boot app use JPA or raw SQL?
Spring Data JPA with Hibernate for queries; Flyway SQL files for migrations. No raw SQL in the query path, no ddl-auto schema generation in production.
How is authentication handled?
JWT issued as httpOnly, Secure, SameSite=Lax cookies; validated by JwtAuthenticationFilter on every request. @PreAuthorize provides method-level authorization, and passwords are hashed with BCrypt.
Does it generate tests?
Yes — JUnit 5 with MockMvc for controller integration tests, Mockito for service tests, and Testcontainers PostgreSQL for repository tests covering auth, validation, and authorization paths.
Is the Spring Boot stack production-ready?
It is a preview stack: real, idiomatic Spring Boot 3 / Java 21, boot-tested in CI with parity work ongoing. Treat the output as a strong starting point and review before production.
CTA
Generate a complete Spring Boot + Next.js application from your requirements — free plan, no credit card.
Describe your product, pick Java Spring Boot, and download a production-shaped codebase in about 90 seconds.
Start free at archiet.com.