How callme-ocean/spring-project-generator works
Project Type and Purpose
• This is a full-stack Spring Boot web application whose sole purpose is to generate a complete, best-practice Spring microservice scaffold on demand and serve it as a downloadable ZIP.
• The README confirms it exposes a web UI (Thymeleaf) and a REST API endpoint (/api/spring-project-generator/v1/generator), accepts user parameters (project name, group, packages, API types, Java version), invokes a set of shell scripts, and returns a ZIP.
File Structure
• Top-level artifacts:
• Dockerfile (containerization)
• pom.xml (Maven build with Spring Boot parent)
• src/main/java/in/oceanbytes/spring_project_generator (Java packages)
• src/main/resources/scripts/*.sh (shell scripts for scaffolding)
• src/main/resources/static (CSS/JS assets)
• src/main/resources/templates/index.html (Thymeleaf UI)
• application.yml (runtime configuration)
• Java sub-packages follow an MVC & layered-architecture pattern:
• controllers: HTTP endpoints & UI controller
• services: business logic orchestration of script invocation
• aspects: AOP logging
• exceptions: domain exceptions & global handler
• models: data transfer objects (ProjectRequest)
• utils: script/file helper classes
Key Insights from the README
• Workflow overview: User ↔ UI/REST → Controller → Service → ScriptUtils/FileUtils → Shell scripts → Filesystem → ZIP → HTTP response
• Modular shell scripts each handle one domain (directories, classes, configs)
• Thymeleaf + static assets for the web UI
• No external DB; ephemeral filesystem operations and ZIP streaming