DEV Community

Marko
Marko

Posted on

Spring CRUD Generator now has a full Demo Project (generated from a real spec)

When you build a code generator, the hardest part isn’t shipping features — it’s earning trust.
People want to answer questions like:

  • “Does it actually work end-to-end?”
  • “Is the output consistent and buildable?”
  • “What does the generated code really look like?”
  • “Is this stable enough to try on a real project?”

That’s why I’ve added a dedicated Spring CRUD Generator Demo repository: a complete, buildable project that exists primarily to demonstrate that the generator works reliably and produces production-style output.

What is the demo project?

Spring CRUD Generator Demo is a repository that showcases the generated output of Spring CRUD Generator in a realistic setup. It’s meant to be a reference output you can inspect anytime:

  • browse the package structure and layering
  • review generated DTOs, validation, mapping, services, controllers
  • see how migrations/resources/tests/docker artifacts look in a real repo
  • confirm the project builds like a normal Spring Boot application

In short: it’s a “proof by example” repository.

The spec used to generate the demo

The demo project is generated from the full example CRUD spec from the main generator repository.

That means the demo isn’t a cherry-picked minimal case — it’s generated from a spec that enables a broad set of features and produces a meaningful codebase.

What’s enabled in the demo (all features ON)

The demo is built to be feature-rich. The idea is to show a “full stack” backend baseline generated from configuration, including:

  • Database: PostgreSQL
  • Java: 21
  • Spring Boot: 4.x
  • Optimistic locking: enabled (with retry/backoff config)
  • Docker: Dockerfile + docker-compose (app + db)
  • Caching: Redis with expiration
  • OpenAPI: API spec + generated resources
  • GraphQL: enabled (with scalar config)
  • Error responses: simple format
  • Migrations: enabled
  • Tests: unit tests + test data generation (Instancio)
  • Additional properties: REST base path /api/v1, OSIV disabled, etc.

Here’s the exact feature snapshot (as used in the config/spec context):

database: postgresql
javaVersion: 21
springBootVersion: 4
optimisticLocking: true
docker:
  dockerfile: true
  dockerCompose: true
  app:
    image: eclipse-temurin
    port: 8080
  db:
    image: postgres
    port: 5432
    tag: latest
cache: 
  enabled: true
  type: REDIS
  expiration: 5
openApi:
  apiSpec: true
  generateResources: true
graphql:
  enabled: true
  scalarConfig: true
errorResponse: simple
migrationScripts: true
tests:
  unit: true
  dataGenerator: instancio
additionalProperties:
  rest.basePath: /api/v1
  optimisticLocking.retry.config: true
  optimisticLocking.retry.maxAttempts: 5
  optimisticLocking.backoff.delayMs: 100
  optimisticLocking.backoff.multiplier: 2.0
  optimisticLocking.backoff.maxDelayMs: 1000
  spring.jpa.open-in-view: false
Enter fullscreen mode Exit fullscreen mode

Why a demo repo matters (especially for generators)

Docs and screenshots help, but they don’t replace a real codebase you can:

  • clone
  • build
  • run
  • inspect
  • compare across versions

A demo repository gives you a stable baseline to evaluate the generator’s output quality and consistency. It also makes regression spotting easier: as the generator evolves, you can re-generate and quickly see what changed.

If you’re considering trying Spring CRUD Generator, this demo repo is the fastest way to answer:
“Is this what I want my project skeleton to look like?”

Links (copy/paste)

Spring CRUD Generator (main repo):
https://github.com/mzivkovicdev/spring-crud-generator

Spring CRUD Generator Demo:
https://github.com/mzivkovicdev/spring-crud-generator-demo

Spec used to generate the demo (full example):
https://github.com/mzivkovicdev/spring-crud-generator/blob/master/docs/examples/crud-spec-full.yaml

Feedback welcome

If you spot something you’d like to see improved in the generated output (structure, conventions, defaults, feature toggles), open an issue or start a discussion in the main repo. The whole point of publishing a demo project is transparency — and making it easier to iterate based on real feedback.

Top comments (0)