scaffold

A Spring Boot platform that generates a ready-to-run microservice (entity, DTOs, MapStruct mapper, service, controller, tests, Dockerfile and compose file) from a web form or an HTTP request.

Java 21Spring Boot 3.4.1Spring Data JPAFreeMarkerMapStructDocker
View source on GitHub Read the full README

How it works

You describe an application by name, its entity attributes and its options. GeneratorService renders the FreeMarker templates in src/main/resources/templates and writes a complete Spring Boot project. ProcessManagerService can start and stop the generated application, and PortRegistryService assigns its port.

Stack and infrastructure

AreaStatusDetails
PersistenceH2 (dev)MySQL and PostgreSQL support for generated projects, configured through environment variables
MessagingOptionalKafka and Zookeeper services can be included in generated compose files
CloudNot usedRuns locally
DockerUsedDockerfile and docker-compose templates; start_docker_containers.sh starts the shared containers

Run it locally

git clone https://github.com/josesaid/scaffold.git
cd scaffold
mvn spring-boot:run

The application starts on http://localhost:8080. Requires JDK 21 and Maven 3.8 or later.

Configuration and secrets

No credentials are stored in this repository. Database passwords are read from environment variables such as SPRING_DATASOURCE_PASSWORD, MYSQL_ROOT_PASSWORD, MYSQL_PASSWORD and POSTGRES_PASSWORD. The full list is in the README.

Endpoints

MethodPathPurpose
POST/api/v1/applicationsRegister an application
GET/api/v1/applicationsList applications
GET/api/v1/applications/{id}Get one application
PUT/api/v1/applications/{id}Update an application
DELETE/api/v1/applications/{id}Delete an application
POST/api/v1/generator/generateGenerate a project
GET/api/v1/generator/portsShow port assignments
POST/api/v1/processes/{appId}/startStart a generated application
POST/api/v1/processes/{appId}/stopStop a generated application
GET/api/v1/processes/{appId}/statusProcess status