
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-springboot-cli
Advanced tools
The fastest way to create a production-ready React + Spring Boot full-stack application
Website • Quick Start • Features • Documentation • Examples • Troubleshooting
react-springboot-cli is a powerful CLI tool that instantly bootstraps a complete full-stack project with a React frontend and Spring Boot backend. Stop wasting hours on project setup and configuration - get a production-ready monorepo structure in seconds.
✅ Save Time: Go from zero to coding in under a minute
✅ Best Practices: Pre-configured with industry-standard tools and structure
✅ Flexibility: Choose your preferred languages and build tools
✅ Full Control: No hidden abstractions - you own all the code
✅ Production Ready: Includes build wrappers, proper packaging, and deployment config
client/ and server/ directoriesHELP.md with stack-specific instructionsRun directly with npx (no global install needed):
npx react-springboot-cli [project-name]
Or install globally via npm:
npm install -g react-springboot-cli
react-springboot-cli [project-name]
The CLI will guide you through configuration:
🚀 react-springboot-cli
? Project name: my-awesome-app
? Select Frontend Framework: Vite (Recommended)
? Select Backend Language: Java
? Select Build Tool: Maven
? Select Packaging: Jar
? Group ID: com.mycompany
? Select Spring Boot Version: 4.0.1 (Latest Stable)
? Java Version: 25
? Add Spring Security?: Yes
📁 Creating project my-awesome-app...
- Frontend: vite → copied to client/
- Backend: java (maven) → configuring for com.mycompany.myawesomeapp...
- Security: enabled -> adding Spring Security...
✔ Project created successfully!
Your generated project will look like this:
my-awesome-app/
├── client/ # React Frontend
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── package.json
│ ├── vite.config.js # or package.json for CRA
│ └── ...
├── server/ # Spring Boot Backend
│ ├── src/
│ │ └── main/
│ │ └── java/ # or kotlin/groovy
│ │ └── com/
│ │ └── mycompany/
│ │ └── myawesomeapp/
│ │ ├── DemoApplication.java
│ │ └── HelloController.java
│ ├── pom.xml # or build.gradle
│ ├── mvnw # Maven wrapper
│ └── ...
├── HELP.md # Stack-specific quickstart guide
└── README.md
Frontend:
cd my-awesome-app/client
npm install
npm run dev # Vite: http://localhost:5173
# or npm start # CRA: http://localhost:3000
Backend:
cd my-awesome-app/server
# Maven
./mvnw spring-boot:run # Unix/Mac
mvnw.cmd spring-boot:run # Windows
# Gradle
./gradlew bootRun # Unix/Mac
gradlew.bat bootRun # Windows
# Server runs on http://localhost:8080
Before using react-springboot-cli, ensure you have:
node --version # Should be >= 18.0.0
java --version # Should be >= 17 (25 for latest features)
| Argument | Description | Example |
|---|---|---|
[project-name] | Specify project name directly | npx react-springboot-cli my-app |
| (none) | Interactive mode (prompts for all options) | npx react-springboot-cli |
Vite (Recommended)
Create React App
spring-boot-starter-securityapplication.properties or SecurityConfigThe Group ID follows Java package naming conventions:
✅ Valid: com.mycompany, org.example, io.github.username
❌ Invalid: MyCompany, com.My-Company, 123company
npx react-springboot-cli my-store
# Choices:
# - Frontend: Vite
# - Backend: Java
# - Build Tool: Maven
# - Packaging: Jar
# - Group ID: com.mystore
# - Java Version: 17
Result: E-commerce starter with Vite HMR and Spring Boot REST API
npx react-springboot-cli blog-platform
# Choices:
# - Frontend: Vite
# - Backend: Kotlin
# - Build Tool: Gradle
# - Packaging: Jar
# - Group ID: io.myblog
# - Java Version: 21
Result: Modern blog platform with Kotlin's concise syntax
npx react-springboot-cli enterprise-app
# Choices:
# - Frontend: Create React App
# - Backend: Groovy
# - Build Tool: Maven
# - Packaging: War
# - Group ID: com.enterprise
# - Java Version: 17
Result: Enterprise application deployable to existing Tomcat servers
react-springboot-cli automatically configures:
✅ Package Structure: Creates proper Java package hierarchy from your Group ID
✅ Build Wrappers: Includes mvnw/gradlew so projects work without global installations
✅ CORS Configuration: Pre-configured for local development (client ↔ server)
✅ ServletInitializer: Auto-added for WAR packaging
✅ Sample Controller: Working REST endpoint at /api/hello
Example React Component:
// client/src/App.jsx
import { useState, useEffect } from 'react';
function App() {
const [message, setMessage] = useState('');
useEffect(() => {
fetch('http://localhost:8080/api/hello')
.then(res => res.text())
.then(data => setMessage(data));
}, []);
return <h1>{message}</h1>;
}
export default App;
Example Spring Controller:
// server/src/main/java/com/example/demo/HelloController.java
@RestController
@RequestMapping("/api")
@CrossOrigin(origins = "http://localhost:5173") // Vite dev server
public class HelloController {
@GetMapping("/hello")
public String hello() {
return "Hello from Spring Boot!";
}
}
Problem: Target directory already contains a project with the same name.
Solution:
# Choose a different name
npx react-springboot-cli my-app-v2
# Or remove the existing directory
rm -rf my-app # Unix/Mac
rmdir /s my-app # Windows
Problem: Dependencies not installed.
Solution:
cd client
npm install
npm run dev # or npm start for CRA
Problem: Java environment variable not configured.
Solution:
Windows:
# Find Java installation
where java
# Set JAVA_HOME (example path)
setx JAVA_HOME "C:\Program Files\Java\jdk-17"
cd client
npm install
npm run dev # or npm start for CRA
Problem: Java environment variable not configured.
Solution:
Windows:
# Find Java installation
where java
# Set JAVA_HOME (example path)
setx JAVA_HOME "C:\Program Files\Java\jdk-17"
Mac/Linux:
# Add to ~/.bashrc or ~/.zshrc
export JAVA_HOME=$(/usr/libexec/java_home) # Mac
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk # Linux
Restart your terminal after setting JAVA_HOME.
Problem: Maven wrapper not executable.
Solution:
cd server
chmod +x mvnw
./mvnw spring-boot:run
Problem: Template placeholders not replaced (rare bug).
Solution: This shouldn't happen with the latest version. If it does:
server/ directorynpx react-springboot-cli@latestProblem: Another application is using the default Spring Boot port.
Solution: Change the port in server/src/main/resources/application.properties:
server.port=8081
Then update frontend API calls to use http://localhost:8081.
Problem: Frontend can't access backend due to CORS policy.
Solution: Add CORS configuration to your Spring controller:
@CrossOrigin(origins = "http://localhost:5173") // Vite
// or
@CrossOrigin(origins = "http://localhost:3000") // CRA
For production, configure proper CORS in WebConfig:
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**")
.allowedOrigins("https://your-production-domain.com")
.allowedMethods("GET", "POST", "PUT", "DELETE");
}
}
Problem: Gradle version mismatch.
Solution: Use the included wrapper (recommended):
./gradlew --version # Check version
./gradlew clean build # Use wrapper, not global gradle
Still stuck? Here's how to get help:
When reporting issues, include:
node --versionjava --versionCreate .github/workflows/ci.yml in your project:
name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: client/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: frontend-build
path: client/dist # or client/build for CRA
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
steps:
- uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '25'
cache: 'maven' # or 'gradle'
- name: Build with Maven
run: ./mvnw clean package -DskipTests
# For Gradle, use:
# - name: Build with Gradle
# run: ./gradlew build -x test
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: backend-jar
path: server/target/*.jar # or server/build/libs/*.jar for Gradle
Create .gitlab-ci.yml in your project:
stages:
- build
- test
- deploy
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
frontend-build:
stage: build
image: node:18
before_script:
- cd client
- npm ci
script:
- npm run build
artifacts:
paths:
- client/dist/ # or client/build/ for CRA
expire_in: 1 hour
backend-build:
stage: build
image: openjdk:17-jdk
before_script:
- cd server
script:
- ./mvnw clean package -DskipTests
artifacts:
paths:
- server/target/*.jar
expire_in: 1 hour
cache:
paths:
- .m2/repository
Docker Compose (docker-compose.yml):
version: '3.8'
services:
frontend:
build: ./client
ports:
- "80:80"
depends_on:
- backend
environment:
- REACT_APP_API_URL=http://localhost:8080
backend:
build: ./server
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=production
Frontend Dockerfile (client/Dockerfile):
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Backend Dockerfile (server/Dockerfile):
FROM openjdk:25-jdk-alpine AS build
WORKDIR /app
COPY . .
RUN ./mvnw clean package -DskipTests
FROM openjdk:25-jre-alpine
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
Release Date: 2025-12-23
Want a feature? Request it here!
Contributions are welcome! Here's how you can help:
Found a bug? Open an issue with:
Have an idea? Open a discussion or feature request!
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)# Clone the repository
git clone https://github.com/KOWSIK-M/react-springboot-cli.git
cd react-springboot-cli
# Install dependencies
npm install
# Test locally
node bin/index.js test-project
# Link for local testing
npm link
react-springboot-cli my-test-app
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ using:
Inspired by:
FAQs
CLI tool to generate a React + Spring Boot full-stack project.
We found that react-springboot-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.