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.
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
| Area | Status | Details |
|---|---|---|
| Persistence | H2 (dev) | MySQL and PostgreSQL support for generated projects, configured through environment variables |
| Messaging | Optional | Kafka and Zookeeper services can be included in generated compose files |
| Cloud | Not used | Runs locally |
| Docker | Used | Dockerfile 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
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/applications | Register an application |
| GET | /api/v1/applications | List 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/generate | Generate a project |
| GET | /api/v1/generator/ports | Show port assignments |
| POST | /api/v1/processes/{appId}/start | Start a generated application |
| POST | /api/v1/processes/{appId}/stop | Stop a generated application |
| GET | /api/v1/processes/{appId}/status | Process status |