Java Seedworks
Java backend service templates with Spring Boot, PostgreSQL, tests, containers
and Helm. MVC/JPA is the default; WebFlux/R2DBC supports reactive workloads.
Previously dtkmn/spring-boot-playground. Update existing clones with:
git remote set-url origin https://github.com/dtkmn/java-seedworks.git
Your local directory can keep its existing name. For installed Codex plugins,
follow the source migration instructions below.
Release Scope
This repository provides a reusable Spring service starter. The v1.0 API scope covers service generation, local development, container packaging, and Kubernetes deployment.
Both variants have been validated as generated services with PostgreSQL, Docker Compose, and local Kubernetes. See adoption guidance and the version policy. The current baseline is Java 21 plus Spring Boot 4.1.3.
The default path is mvc-jpa with --purpose api. webflux-r2dbc remains the supported advanced API variant for teams with a real reactive requirement. An experimental MVC/JPA AI purpose adds an order-support workflow for host and local Docker Compose use. Optional integrations under examples/ remain outside the starter contract.
Starter Contract
Maintained API outputs provide:
- Java 21 and the maintained Spring Boot 4.1.x line
- PostgreSQL plus Flyway
- Actuator, Prometheus metrics, and OTLP-ready tracing hooks
- Docker Compose-backed local development plus standalone container smoke coverage
- digest-pinned, non-root distroless Java runtime
- test baselines suitable for CI
- Kubernetes deployment support through Helm
The experimental AI output retains the Java, database, observability, container and test baseline. It uses a local authentication fixture and does not include Helm or production deployment support.
The default starter contract does not include:
- Kafka and Kafka Streams
- websocket ingest pipelines
- domain-specific integrations
- a broad demo runtime at the repository root
Generation Choices
Choose --purpose api|ai; the default is api. The initial AI integration uses
Ollama, with the installed model and endpoint configured at runtime. MCP is not
included in generated services.
| Variant | Purpose | Support | Deployment |
|---|
mvc-jpa | api | Primary maintained API | Host, Compose, Helm |
webflux-r2dbc | api | Maintained advanced API | Host, Compose, Helm |
mvc-jpa | ai | Experimental order-support workflow | Host and local Compose |
webflux-r2dbc | ai | Unsupported; rejected before generation | — |
API output omits Spring AI, MCP and AI credential settings. AI output includes
an opt-in model profile; its default Order API runs without a model but requires
fresh local authentication tokens. This fixture is not production identity.
Repository Layout
variants/mvc-jpa: default API starter plus experimental AI assets
variants/webflux-r2dbc: supported advanced variant for reactive workloads
examples/kafka-basic: minimal HTTP-to-Kafka example
examples/kafka-streams: isolated stream-processing example
examples/binance-websocket: websocket-to-Kafka market-data example
examples/ai-mcp: REST and read-only MCP example with optional Ollama summaries
deploy/helm/spring-service-starter: shared Kubernetes deployment chart
docs/adr: architecture decision records
docs/adoption: pilot execution guidance
docs/releases: release readiness checklists
scripts/init-service.sh: starter bootstrap script
Start A New Service
Prerequisites: Git, a Java 21 JDK, a running Docker engine with Docker Compose v2,
and Bash with standard Unix tools (tar, find, and curl). Use macOS, Linux,
or WSL2.
The generated Gradle wrapper downloads Gradle; no separate Gradle installation is
needed. The first run also downloads dependencies and container images.
The traditional clone-and-script workflow below remains supported. The
Codex and Claude Code plugins provide
additional generation entry points using the same assets.
Start from the stabilized main branch in a new directory:
git clone --branch main --depth 1 https://github.com/dtkmn/java-seedworks.git
cd java-seedworks
./scripts/init-service.sh \
--variant mvc-jpa \
--service-name customer-profile \
--group-id tech.company.platform \
--artifact-id customer-profile \
--package-name tech.company.platform.customerprofile
cd generated/customer-profile
cp .env.example .env
./gradlew bootRun
Keep that terminal running. Spring Boot starts PostgreSQL through compose.yaml
and Flyway creates the schema and seed data. Once the application has started,
run this request in a second terminal:
curl -fsS http://localhost:8080/api/v1/customers
A fresh database returns:
[{"id":1,"firstName":"John","lastName":"Doe"}]