A Python CLI tool to quickly scaffold Java Spring Boot microservices with optional Docker, PostgreSQL, and SaaS-ready billing endpoints. Perfect for small teams or open-source projects that want a working microservice boilerplate in seconds.
SpringRocket is the name of this CLI because it lets you launch Spring Boot microservices at rocket speed.
I wanted a name that captures the thrill of taking an idea and having a fully working microservice ready to run in seconds. With SpringRocket, you don’t wait — you scaffold, run, and see your service in action almost instantly. Think of it as your personal launchpad for microservices and SaaS-ready applications.
- Generate a Spring Boot microservice with REST endpoints
- Fully Maven-compliant project structure
- Optional Dockerfile for containerization
- Optional PostgreSQL DB config (
application.properties
) - Optional BillingController with Stripe/PayPal placeholders
- Automatic README.md inside generated service
- Produces ready-to-run JAR (
target/<ServiceName>.jar
) for Docker or local execution - Quick scaffold for SaaS-style microservices
- Automatic unit tests generation
git clone https://github.com/codewithpandey/SpringRocket.git
cd universal-microservice-cli
python -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # Windows
pip install -r requirements.txt
python cli.py create-service <ServiceName> [OPTIONS]
Options:
--docker
→ Add Dockerfile--db
→ Add PostgreSQL configuration--billing
→ Add BillingController (Stripe & PayPal placeholders)
Example:
python cli.py create-service UserService --docker --db --billing
Generates UserService
microservice in services/UserService/
with:
Application.java
Controller.java
BillingController.java ✅
pom.xml
src/main/resources/application.properties ✅
Dockerfile ✅
README.md ✅
├── services
└── UserService
├── Dockerfile
├── pom.xml
├── README.md
└── src
├── main
│ ├── java
│ │ └── com
│ │ └── example
│ │ ├── Application.java
│ │ ├── BillingController.java
│ │ └── Controller.java
│ └── resources
│ └── application.properties
└── test
├── java
│ └── com
│ └── example
│ ├── ApplicationTest.java
│ ├── BillingControllerTest.java
│ └── ControllerTest.java
└── resources
└── application-test.properties
cd services/UserService
mvn package
java -jar target/UserService.jar
docker build -t userservice .
docker run -p 8080:8080 userservice:latest
Test endpoints:
curl http://localhost:8080/api/userservice
curl -X POST http://localhost:8080/api/userservice/billing/subscribe/stripe
curl -X POST http://localhost:8080/api/userservice/billing/subscribe/paypal
Every service generated by SpringRocket comes with a ready-to-run test suite:
-
src/test/java/com/example/
ApplicationTest.java
→ ensures the Spring context starts successfullyControllerTest.java
→ tests your main REST endpointsBillingControllerTest.java
→ included if--billing
flag is used
-
src/test/resources/application-test.properties
- Configures H2 in-memory database for fast isolated tests
- Enables logging for easier debugging
- Sets Spring profile to
test
to separate test configuration from production
Run tests:
cd services/UserService
mvn test
All tests will pass out-of-the-box for a freshly generated service. This makes it easy to verify scaffolding, quickly add new features, or integrate CI/CD pipelines.
- No empty test folders — every service comes fully configured.
- Fast, isolated tests using in-memory database.
- Ready for CI/CD pipelines or GitHub Actions.
SpringRocket uses Jinja2 templates stored in templates/
. When you run create-service
, it:
- Copies templates into a Maven-compliant folder structure
- Replaces placeholders like
{{ServiceName}}
- Generates ready-to-run microservice boilerplate with optional Docker, DB, and billing
- Extend BillingController with real Stripe or PayPal integration
- Add authentication, notifications, or other SaaS features
- Use SpringRocket as a base for small microservice teams or open-source projects
MIT License — feel free to use, modify, and contribute.
SpringRocket is under active development! Here’s what’s done, what’s planned, and what’s on the horizon.
- ✅ Scaffold fully working Spring Boot microservice
- ✅ Generate REST endpoints
- ✅ Optional Stripe/PayPal billing placeholders
- ✅ Docker-ready service
- ✅ Auto-generated unit & integration tests with H2 DB
- ⬜ Interactive CLI prompts for service name, package, DB, and features
- ⬜ Basic CRUD scaffolding (Entity + Repository + Service + Controller)
- ⬜ Swagger/OpenAPI integration for interactive API docs
- ⬜ Multi-stage Dockerfile & optional Docker Compose
- ⬜ Subscription plan scaffolding
- ⬜ Multi-tenant support
- ⬜ Admin dashboard starter template
- ⬜ CI/CD pipeline starter files (GitHub Actions / GitLab CI)
- ⬜ Integration & load test templates
- ⬜ Hot-reload templates with Spring DevTools
- ⬜ Prometheus/Grafana metrics endpoints
- ⬜ Logging & tracing (ELK, OpenTelemetry / Zipkin)
- ⬜ Auto-generate README and Changelog for services
- ⬜ Optional frontend boilerplate (React/Next.js)
Notes:
- This roadmap is a living document — features may be added, updated, or reprioritized over time.
- Contributions are always welcome! Feel free to fork, submit PRs, or suggest new features.
- The goal is to make SpringRocket a fast, production-ready microservice launcher for small teams and solo developers.