npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sprygen

v1.1.2

Published

A production-ready Spring Boot project generator CLI. Scaffold secure, structured Java applications with built-in JWT or session authentication, role-based access control, user management, and an optional fullstack frontend — all from a single interactive

Readme

Sprygen is an interactive CLI written in TypeScript that scaffolds secure, structured Java Spring Boot applications. It handles the boilerplate of authentication, role-based access control, database configuration, and optional frontends so you can focus on building features.

Scaffold a full CRUD application with JWT auth, an admin panel, and Swagger docs in under 30 seconds.

✨ Features

  • Interactive Scaffolding: Prompt-based setup for Java 17/21, Maven/Gradle, and databases (H2, MySQL, PostgreSQL).
  • Modern Fullstack Monorepos: Scaffold a complete monorepo with a robust Spring Boot backend and a highly polished Next.js 15 frontend styled with Tailwind v4 and lucide-react. Includes pre-wired Axios API hooks and auth states.
  • Built-in Security: Stateless JWT authentication or stateful Session-based logins.
  • Enterprise Architecture: Compile-time safe mapping with MapStruct, auto-configured Page<T> pagination, and JPA Specification dynamic filtering out of the box.
  • Database Migrations: First-class Flyway support. Automatically scaffold migration directories and generate .sql migrations per entity.
  • Role-Based Access Control & Auditing: Pre-configured ROLE_ADMIN and ROLE_USER entities with JPA Auditing (@CreatedBy, @LastModifiedDate).
  • Entity Generator: Scaffold JPA Entities, Repositories, Services, Mappers, DTOs, and REST Controllers instantly.
  • Batch Schema Generation: Scaffold multiple interconnected entities at once using a declarative JSON schema.

🚀 Installation

Install Sprygen globally via npm to use the sprygen command from anywhere:

npm install -g sprygen

(For local development: clone this repository, run npm install, npm run build, and npm link)

🛠️ CLI Commands

1. Create a New Project

Launch the interactive prompt to configure and scaffold a new Spring Boot application.

sprygen new <project-name>

You will be asked to configure:

  • Package name (e.g., com.example.app)
  • Build Tool (Maven or Gradle)
  • Database (H2, MySQL, PostgreSQL)
  • Auth Strategy (JWT or Session)
  • Project Type (REST API or Fullstack with UI)
  • Optional Modules (Swagger/OpenAPI, Mail, Logging)

2. Generate a Single Entity

Run this command inside your generated Sprygen project directory. It prompts you to define fields and automatically generates the entire persistence and REST API stack.

sprygen add-entity <entity-name> # e.g. sprygen add-entity Product

Generated files include:

  • JPA Entity Class (with fields defined via prompt, extends AbstractAuditingEntity)
  • Spring Data JpaRepository + JpaSpecificationExecutor
  • EntitySpecification (for dynamic query filtering)
  • Service Class (handling Page<T> mapping)
  • MapStruct Mapper Interface
  • REST Controller (Paginated standard CRUD endpoints)
  • Filter and Response DTOs
  • Flyway SQL Migration (if project uses Flyway)

3. Batch Generate Entities (block-generate)

Perfect for initial project bootstrapping. Design your entire database in a schema.json file and generate all your entities and relations in one command.

[
  {
    "name": "Product",
    "fields": [
      { "name": "title", "type": "String", "nullable": false }
    ],
    "relations": [
      { "type": "ManyToOne", "target": "Category", "fieldName": "category", "eager": true }
    ]
  }
]
sprygen block-generate schema.json

4. Inject Authentication

Useful for modifying existing non-Sprygen projects. Scaffolds robust JWT authentication layers into an already existing Spring Boot codebase.

sprygen generate-auth

5. Convert to Flyway (migrate:init)

Instantly convert an existing ddl-auto: update Spring Boot project into a Flyway versioned project. It creates the migration directory, generates V1__baseline.sql, patches application.yml, and tracks state so future add-entity commands automatically generate SQL schema deltas.

sprygen migrate:init

6. Update Sprygen

Ensure you are always running the latest version with the newest features and bug fixes by using the built-in update command.

sprygen update

🏗️ Project Architecture

Applications generated by Sprygen follow standard best practices. If you choose a Fullstack project, Sprygen scaffolds a clean Monorepo:

my-project/
├── backend/            # Spring Boot REST API
│   ├── src/main/java/com/example/app/
│   │   ├── config/     # Security, CORS, Swagger configs
│   │   ├── controller/ # REST Controllers
│   │   ├── entity/     # JPA Models
│   │   ├── service/    # Business Logic
│   │   └── security/   # JWT/Session filters
│   └── pom.xml
└── frontend/           # Next.js 15 (App Router)
    ├── src/app/        # Modern Next.js App Router (dashboard, login, register)
    ├── src/components/ # Shared UI components (Sidebar, Dashboard layout)
    ├── src/hooks/      # Typed custom hooks (useAuth, useFetch)
    ├── src/lib/        # Axios API instances mapping to Spring Boot
    └── package.json    # Tailwind v4, lucide-react, next-themes

📄 License

Sprygen is licensed under the MIT License.