Get Early Access

Production-Ready Spring Boot Microservice Architecture Template

Three production-grade Java microservices. Single-module Onion Architecture, Transactional Outbox Pattern, ArchUnit, CI pipeline — ready from git clone.

The Problem No One Talks About

Your team doesn't struggle with writing Spring Boot microservices. They struggle with the hundred architectural decisions that come before the first line of domain logic.

Where does the Outbox table live? How do you enforce layer boundaries across twelve developers? What happens when the Dual Write creeps into your event publishing — and no one catches it until data is silently inconsistent in production?

Most teams solve this by stitching together blog posts, conference talks, and Stack Overflow threads. They rebuild the same foundation every time. For startup CTOs, those weeks are runway burned. Every sprint spent debating project structure is a sprint not spent on the product.

The Mars Enterprise Kit PRO is the production-ready microservice architecture template those conversations should have started from.


21 Architecture Decisions. Zero Left to Debate.

Senior engineers don't buy reference implementations for the code. They buy them for the decisions already made and defended.

The Mars Enterprise Kit PRO ships with 21 Architecture Decision Records covering every significant choice — including:

  • Why Onion Architecture over Hexagonal or Layered
  • Why SKIP LOCKED for outbox polling instead of CDC
  • Event schema format and versioning strategy
  • Testing boundaries — what gets a unit test, what gets an integration test

These are not afterthoughts attached to a README. They are the product.

Your team stops debating and starts building. Day one.


What Ships When You Clone

Three Production-Grade Reference Services

A fully implemented Order Service, Inventory Service, and Payment Service. Each is a single Maven module with package-based Onion Architecture — domain/, infrastructure/, api/ — enforced by ArchUnit. Real domain models, use cases as @Service classes, repository ports and adapters, and integration tests. Not scaffolding.

Stack: Java 25 + Spring Boot 4.0 + PostgreSQL 16 + Maven + Jib

Your team writes domain logic on day one. No multi-module ceremony, no wrapper layers around use cases. One pom.xml per service, clear package boundaries, and the build fails if someone breaks the architecture.

Transactional Outbox Pattern — No More Dual Write

The Dual Write problem is the silent killer of event-driven architectures. Your data says one thing, your events say another, and nobody notices until a customer does.

The Kit solves this by design. Events are written to an outbox table inside the same database transaction as your domain state. A dedicated publisher with SKIP LOCKED polling reads the outbox and publishes downstream. If the transaction rolls back, the event never gets published.

Consistency by design — not by luck.

TDD Enforced by Architecture Tests

ArchUnit validates package boundaries, dependency direction (domain → no JPA/Kafka/Web), and structural rules (repositories as interfaces, use cases as @Service) at build time. When someone drifts from the architecture, the test suite catches it — not a code review two weeks later.

New engineers onboard safely. The architecture enforces itself.

CI/CD and Local Development

GitHub Actions for automated builds and code review. Docker Compose for each service. TestContainers for integration tests that run identically on a laptop and in CI. First deployment in hours.

Claude Code Commands and Agents

AI-accelerated development built into the project structure. Claude Code agents that understand the architecture — not just the syntax.

  • Scaffold a bounded context — generate domain, infrastructure, and API packages with correct dependency direction in minutes
  • Architecture-aware smoke tests — validate that new code respects layer boundaries before you push

This is not generic AI autocomplete. These agents know the Onion Architecture rules, the Outbox contract, and the testing boundaries defined in the ADRs.


From Months to Days

Most teams spend the first month of a greenfield Java microservice on decisions that have already been made thousands of times. The Mars Enterprise Kit PRO collapses that timeline — Transactional Outbox, ArchUnit enforcement, CI pipeline, AI tooling — ready to run from the first git clone.

Your team ships feature work from day one instead of week four.


Early Access

Mars Enterprise Kit PRO is in active development. Early access gives you everything built now, plus every phase as it ships — at the early access price.

What's coming:

  • Phase 1 — SAGA orchestration across all services + Kafka/Redpanda integration (in progress)
  • Phase 2 — OpenTelemetry distributed tracing + shared library extraction
  • Phase 3 — Golden Chassis template (single-module, package-based) + mars-cli scaffold generator
  • Phase 4 — Helm charts + KEDA autoscaling for Kubernetes

Who This Is For

Senior Java engineers and tech leads building event-driven microservice architectures on the JVM. You've shipped services before. You've had the architecture debates — and you want a reference architecture that's already made the hard calls and documented why.

CTOs and tech leads at startups who need a solid architectural foundation without the cost of building it from scratch. You know you'll need an event-driven microservice architecture with Spring Boot — but you don't have three months to lay the groundwork.

This is not a tutorial. It's the codebase you wish you'd had.


Explore More

Mars Enterprise Kit Lite (Open Source)

The Lite version is free and open source. It covers the fundamentals of Event-Driven Architecture with Spring Boot, Kafka, and PostgreSQL using Onion Architecture.

Run the lab | View on GitHub

Get Early Access

We'll notify you when early access is available.