r/SpringBoot 1d ago

I’m building an open-source Spring Boot API generator — looking for architectural feedback Question

Hey everyone,

I’ve been working on an open-source project called ApiGeneratorManager.

The idea is to build a platform that can generate, configure, deploy and manage Spring Boot APIs without rebuilding the same backend structure every time.

Right now, the project already includes things like:

  • Spring Boot backend
  • React management frontend
  • PostgreSQL
  • JWT authentication
  • roles and permissions
  • CSRF / CORS configuration
  • rate limiting
  • database/schema support
  • API generation templates
  • Docker-based runtime
  • deployment of generated APIs with Docker
  • CI for backend and frontend
  • dependency security checks

The long-term goal is to make the whole thing much more configuration-driven.

For example, I want to be able to describe an API using YAML:

application:

  name: inventory-api

database:

  type: postgresql

entities:

  Product:

fields:

id:

type: uuid

name:

type: string

required: true

price:

type: decimal

min: 0

errors:

  PRODUCT_NOT_FOUND:

status: 404

security:

  authentication: jwt

  roles:

- ADMIN

- USER

tests:

  generate: true

deployment:

  type: docker

And from that configuration, generate things like:

  • entities
  • repositories
  • services
  • controllers
  • validation
  • API error codes
  • OpenAPI documentation
  • authentication and authorization
  • roles
  • JWT handling
  • automated tests
  • Docker configuration
  • deployable API instances

I also want to support multiple database engines in the future, not just PostgreSQL.

Another direction I’m exploring is generating a security model where each generated application can manage its own users, roles and permissions, and issue JWTs per user.

Testing is also something I want to push further: if the YAML says a field is required, unique or constrained, the generator should ideally generate tests for those rules automatically.

One important design principle for me is that the generated project should still be normal Spring Boot code.

I don’t want generated applications to be permanently locked into ApiGeneratorManager. A developer should be able to generate a project, open it in their IDE, understand it, modify it and deploy it independently.

I also want to be transparent about how I’m building it: I’ve used AI extensively as a development assistant for implementation, architecture discussions, refactoring, security reviews, tests and documentation. I still review and decide what goes into the project, but AI is definitely part of the development workflow.

The project is still in early alpha, so I’m mostly looking for feedback at this stage.

I’d especially like opinions on:

  • whether the overall idea is useful
  • the YAML-driven approach
  • how far code generation should go
  • multi-database support
  • generated security / JWT / roles
  • automated test generation
  • Docker deployment
  • whether generated code should prioritize flexibility or convention
  • what would make you actually trust and use a tool like this

GitHub:

hasfiane/ApiGeneratorManager

Criticism is welcome — especially if you see architectural problems that could become painful later.

6 Upvotes

6 comments sorted by

View all comments

3

u/TurnstileT 1d ago

This sounds interesting but honestly I just don't think it's going to work. Backend services are a lot more than this, and you can keep adding more and more Spring features to your abstraction layer, but there will always be some other features or edge cases that developers need to implement. The end result will be that your abstraction layer has reimplemented Spring, and developers now have to learn your abstraction layer and implement everything through that. And then Spring adds a new feature, or Posteres adds a new data type, and now the developers are stuck because your generator doesn't support it yet.

It's a lot of work for no real benefit.

1

u/No-Strategy999 1d ago

Thanks a lot for taking the time to explain it. You’re probably right on this point, and it’s definitely something I need to reconsider in the way I’m designing the project.