Skip to main content

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

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, and UserDetailsServiceImpl.
  • Generates authentication endpoints (/auth/login, /auth/register) and DTOs.
  • Automatically creates a User entity and Role enum 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 OrderOrderItem
ManyToOne Many entities belong to one OrderItemOrder
ManyToMany Both sides have many ProductCategory

JPIO automatically handles:

  • The @JoinTable annotation for ManyToMany
  • The mappedBy attribute on the inverse side
  • Pluralization and correct field types (List<Target>)

Roadmap

  • MVP: interactive wizard + full CRUD scaffold generation
  • OneToMany / ManyToMany relation support
  • jpio add command for existing projects
  • jpio scan project inspector
  • Enums support & Request/Response DTO separation
  • Spring Security scaffolding (v0.5.0)
  • jpio add enum command 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

jpio_cli-0.5.2.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jpio_cli-0.5.2-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file jpio_cli-0.5.2.tar.gz.

File metadata

  • Download URL: jpio_cli-0.5.2.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jpio_cli-0.5.2.tar.gz
Algorithm Hash digest
SHA256 31295e6829a55a65c16e32cbbdf081a33158a73e8745bc43f10b317170139267
MD5 6648c3f3d2efa0faf7c153de25f9525f
BLAKE2b-256 eea2e14e17f3595eb10def117d5e58b63625c2cc5d23ea9127ee417f6bd951d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for jpio_cli-0.5.2.tar.gz:

Publisher: publish.yml on PIO-VIA/JPIO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jpio_cli-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: jpio_cli-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 46.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jpio_cli-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 622c3fba19bfe6e4c39cd5c51402fd1775600663f2091d929451cc76e4561793
MD5 3d67e53f2848dd14fee212e521a8f4ca
BLAKE2b-256 3b608e613efe9d246db2f3c8ee32b96b308a5c5a1e1f0991ad2698a96af7da9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for jpio_cli-0.5.2-py3-none-any.whl:

Publisher: publish.yml on PIO-VIA/JPIO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page