Skip to main content

Clean Architecture Spring Boot Template: OSS Flagship

Open source 4-layer template extracted and sanitized from a production Spring Boot 3.4 backend: JWT, Flyway, rate-limit, and an ArchUnit gate that genuinely runs. Paired with the 12 enterprise patterns of the real backend: multi-tenancy, webhook idempotency, Resilience4j.

This series collects 8 articles (approximately 108 minutes of total reading time), designed for a level Advanced. The main topics covered are clean architecture, Spring Boot, ArchUnit, JWT.

8Articles108 minTotal reading timeAdvancedLevel
clean architectureSpring BootArchUnitJWTFlywaytemplate open sourcearchitecture fitness

Series Articles

  1. 1

    Spring Boot Enterprise Patterns: 12 Production-Grade Patterns for Highly Reliable Systems

    An enterprise production-grade Spring Boot architecture requires 12 combined patterns: multi-tenancy, audit logging, idempotency keys, distributed cache...

  2. 2

    01 - Clean Architecture: Why Four Folders Are Not Enough

    The four folders are not the architecture: the dependency rule is. I measure it on a real backend with ArchUnit actually run: six violations counted.

  3. 3

    02 - A Domain With No Dependencies: Value Objects as Java Records

    A value object is a record that rejects impossible values. Real code, executed: what you gain, where it breaks, and why five of nine are not used.

  4. 4

    03 - Ports and Adapters in Spring Boot: Keeping the Database Out

    A port in the domain and its adapter, with real code: the use case runs without a database and the shortcut with Page costs two archives on the classpath.

  5. 5

    04 - Use Cases With or Without an Interface: DTOs and Transactions

    When a use case deserves an interface, where the transaction boundary falls and what readOnly really does, with the code run and two defects found.

  6. 6

    05 - ArchUnit: An Architecture Gate That Really Runs

    ArchUnit 1.3.0 run on a real backend: the rule line by line, the real outcome, the timed cost and three ways the same gate looks green while checking nothing.

  7. 7

    06 - ArchUnit on a Project With Debt: FreezingArchRule

    How to introduce an ArchUnit gate on a project with debt: FreezingArchRule measured in five experiments, and the line of text that silently zeroes the baseline.

  8. 8

    A "frozen" ArchUnit rule is not a rule that protects you: 38 new violations and 7 rules that do not run

    A frozen ArchUnit test stays green until violations grow. What to check when it does not run, when the release skips it and when only a text changes.