Java Project Input/Output — Spring Boot scaffolding CLI
Project description
JPIO — Java Project Input/Output
A CLI tool that scaffolds production-ready Spring Boot projects in seconds. Stop writing boilerplate. Start building features.
Table of Contents
- Overview
- Why JPIO?
- Installation
- Quick Start
- Commands
- Project Architecture
- Generated Structure
- Supported Relations
- Roadmap
- Contributing
Overview
JPIO (Java Project Input/Output) is an open-source Python CLI that automates the creation of Spring Boot project scaffolding. You describe your entities and their relationships interactively in the terminal — JPIO generates all the layers: Entity, DTO, Mapper, Repository, Service, ServiceImpl, Controller, and Exceptions.
Built for developers who are tired of copy-pasting the same boilerplate across every new project.
Why JPIO?
Every Spring Boot project starts the same way:
mkdir config controller entity dto mapper repository service exception
Then you write the same JpaRepository interfaces, the same CRUD controllers, the same GlobalExceptionHandler, the same SwaggerConfig... over and over again.
JPIO eliminates that entirely.
| Without JPIO | With JPIO |
|---|---|
| ~30–60 min of boilerplate setup | ~2 minutes |
| Manual folder creation | Auto-generated structure |
| Copy-paste error-prone | Template-driven, consistent |
| Forgotten files | Nothing is missed |
Installation
pip install jpio-cli
Requirements:
- Python 3.9+
- pip
Quick Start
# Go to your Spring Boot project root
cd my-spring-project
# Launch the JPIO wizard
jpio start
# Follow the interactive prompts:
# ? API route prefix : /api/v1
#
# --- Entity 1 ---
# ? Entity name : Product
# ? Fields : name (String), price (Double), stock (Integer)
# ? Has relations? : Yes → ManyToMany → Category
#
# --- Entity 2 ---
# ? Entity name : Category
# ? Fields : name (String)
#
# ? Add another entity? No
#
# ✅ Business layers generated!
Commands
| Command | Description |
|---|---|
jpio start |
Initialize and scaffold business layers for a project |
jpio add |
Add a new entity to an existing JPIO project |
jpio security |
Add a complete Spring Security JWT layer |
jpio scan |
Display the current state of a JPIO project |
jpio start
Launches the full interactive wizard. Detects your existing package structure, pom.xml dependencies, and configuration format (properties vs yaml). Generates the complete CRUD structure for your entities.
jpio add
Run inside an existing JPIO project. Prompts for a new entity and appends the generated files without touching existing code. Reads .jpio.json to stay aware of existing entities and relationships.
jpio security
Adds a complete Spring Security + JWT implementation to your project.
- Generates
SecurityConfig,JwtUtil,JwtAuthenticationFilter, andUserDetailsServiceImpl. - Generates authentication endpoints (
/auth/login,/auth/register) and DTOs. - Automatically creates a
Userentity andRoleenum if not already present. - Injects required dependencies into your
pom.xml.
jpio scan
Reads .jpio.json and displays a summary table of the project: entities, fields, and relations.
Project Architecture
jpio/
├── jpio/
│ ├── main.py # CLI entry point (Click)
│ ├── commands/
│ │ ├── new.py # `jpio start` — full project wizard
│ │ ├── add.py # `jpio add` — add entity
│ │ ├── security.py # `jpio security` — security flow
│ │ └── scan.py # `jpio scan` — display project state
│ ├── core/
│ │ ├── models.py # Dataclasses: Field, Relation, Entity, ProjectConfig
│ │ ├── analyzer.py # Interactive prompts → builds ProjectConfig
│ │ ├── security_analyzer.py # Security wizard
│ │ ├── generator.py # Jinja2 rendering engine
│ │ ├── security_generator.py # Security file generation
│ │ └── writer.py # Java code strings → files on disk
│ ├── utils/
│ │ ├── console.py # Rich: banners, tables, success/error output
│ │ └── file_helper.py # Path manipulation, pom.xml dependency injection
│ └── templates/
│ ├── entity/ # CRUD templates
│ ├── exception/ # Global exception handling templates
│ ├── config/ # Swagger/SpringDoc templates
│ ├── security/ # Spring Security JWT templates
│ └── project/ # application.properties/yaml templates
├── tests/
│ ├── test_analyzer.py
│ ├── test_generator.py
│ ├── test_security_generator.py
│ └── test_writer.py
├── pyproject.toml
└── README.md
Generated Structure
For a project with package com.pio.ecommerce and two entities Product and Category:
src/main/java/com/pio/ecommerce/
├── config/
│ ├── SecurityConfig.java # (If security added)
│ └── SwaggerConfig.java
├── controller/
│ ├── AuthController.java # (If security added)
│ ├── ProductController.java
│ └── CategoryController.java
├── dto/
│ ├── request/
│ │ ├── LoginRequestDTO.java
│ │ ├── ProductRequestDTO.java
│ │ └── CategoryRequestDTO.java
│ └── response/
│ ├── AuthResponseDTO.java
│ ├── ProductResponseDTO.java
│ └── CategoryResponseDTO.java
├── security/ # JWT Logic (If security added)
│ ├── JwtUtil.java
│ └── JwtAuthenticationFilter.java
├── models/
│ ├── entity/
│ │ ├── User.java # (If security added)
│ │ ├── Product.java
│ │ └── Category.java
│ └── enum/
│ └── Role.java
├── repository/
│ ├── UserRepository.java
│ ├── ProductRepository.java
│ └── CategoryRepository.java
└── service/
├── ProductService.java
└── ProductServiceImpl.java
Supported Relations
| Relation | Description | Example |
|---|---|---|
OneToMany |
One entity has many of another | Order → OrderItem |
ManyToOne |
Many entities belong to one | OrderItem → Order |
ManyToMany |
Both sides have many | Product ↔ Category |
JPIO automatically handles:
- The
@JoinTableannotation forManyToMany - The
mappedByattribute on the inverse side - Pluralization and correct field types (
List<Target>)
Roadmap
- MVP: interactive wizard + full CRUD scaffold generation
- OneToMany / ManyToMany relation support
-
jpio addcommand for existing projects -
jpio scanproject inspector - Enums support & Request/Response DTO separation
- Spring Security scaffolding (v0.5.0)
-
jpio add enumcommand for existing projects - IntelliJ IDEA plugin
- VS Code extension
- Lombok support toggle
- MapStruct vs manual mapper toggle
Contributing
Contributions are welcome. Please open an issue before submitting a pull request.
git clone https://github.com/PIO-VIA/JPIO.git
cd JPIO
pip install -e ".[dev]"
License
MIT © PIO
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jpio_cli-0.5.0.tar.gz.
File metadata
- Download URL: jpio_cli-0.5.0.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e68c1ad39f501e8950eb34c72f1171e637ff61af04bd005382192df7a4dd0aeb
|
|
| MD5 |
2ddd7e83756fd7bf2c80161273d45c98
|
|
| BLAKE2b-256 |
04bfe14c903f6c5037908791aea60a6325fefaa96667366451b055c5a1460f77
|
Provenance
The following attestation bundles were made for jpio_cli-0.5.0.tar.gz:
Publisher:
publish.yml on PIO-VIA/JPIO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jpio_cli-0.5.0.tar.gz -
Subject digest:
e68c1ad39f501e8950eb34c72f1171e637ff61af04bd005382192df7a4dd0aeb - Sigstore transparency entry: 1427490354
- Sigstore integration time:
-
Permalink:
PIO-VIA/JPIO@3924fe00b3ff4a2245120b61f651c9e4cb56aa9f -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/PIO-VIA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3924fe00b3ff4a2245120b61f651c9e4cb56aa9f -
Trigger Event:
release
-
Statement type:
File details
Details for the file jpio_cli-0.5.0-py3-none-any.whl.
File metadata
- Download URL: jpio_cli-0.5.0-py3-none-any.whl
- Upload date:
- Size: 44.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa824ad6b4787fca4df0db36eff277794c5d30b43ae487792a08422953f70802
|
|
| MD5 |
de5e6c849a5e3590aea2dbcfff13b8af
|
|
| BLAKE2b-256 |
57af3229f1c9ae599013cee1abe258ccde358ba0cfddbd5a43ee5c0e8fd69739
|
Provenance
The following attestation bundles were made for jpio_cli-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on PIO-VIA/JPIO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jpio_cli-0.5.0-py3-none-any.whl -
Subject digest:
fa824ad6b4787fca4df0db36eff277794c5d30b43ae487792a08422953f70802 - Sigstore transparency entry: 1427490415
- Sigstore integration time:
-
Permalink:
PIO-VIA/JPIO@3924fe00b3ff4a2245120b61f651c9e4cb56aa9f -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/PIO-VIA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3924fe00b3ff4a2245120b61f651c9e4cb56aa9f -
Trigger Event:
release
-
Statement type: