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

@volt.js/modules

v1.1.0

Published

CLI for creating React feature modules with support for Next.js, Vite, and TanStack Router frameworks

Readme

Volt Modules

A powerful CLI tool for generating Next.js App Router feature modules with TanStack Query, React Hook Form, and TypeScript.

Features

  • 🚀 Interactive CLI - Prompts for module name and custom hooks preference
  • 📁 Feature-based Architecture - Creates organized features/{module}/ structure
  • 🎨 Custom Hooks - Optional UI hooks, services, and constants
  • 📋 CRUD Operations - Complete Create, Read, Update, Delete functionality
  • 🔍 Built-in Filtering - Search and status filtering out of the box
  • 🎯 TypeScript First - Fully typed with Zod schemas
  • 📱 Responsive Tables - Mobile-friendly data tables
  • 🎨 Modal Forms - Professional form components with validation

Installation

# Install globally
npm install -g @volt.js/modules

# Or use with npx (no installation needed)
npx @volt.js/modules init

Usage

Create a New Module

volt-modules init

The CLI will prompt you for:

  1. Framework: Choose between Next.js (App Router), Vite + React Router, or TanStack Router
  2. Custom Hooks: Whether to include reusable UI hooks and services
  3. Module Name: The name of your feature module

Example

$ volt-modules init
? Which framework are you using?
  1) Next.js (App Router)
  2) Vite + React Router
  3) TanStack Router
? Enter your choice (1-3): 1
? Do you want to include custom hooks? (y/N): y
? Enter module name: user-management

ℹ Detected src/ architecture
✓ Created: src/hooks/use-form.tsx
✓ Created: src/services/user-preferences.ts
✓ Created: src/constants/storage-keys.ts
✓ Created: app/user-management/page.tsx
✓ Created: app/user-management/layout.tsx
✓ Created: src/features/user-management/_schemas/UserManagementSchema.ts
✓ Created: src/features/user-management/_api/queries/user-management.queries.ts
✓ Created: src/features/user-management/_api/mutations/user-management.mutations.ts
✓ Created: src/features/user-management/_components/UserManagementTable.tsx
✓ Created: src/features/user-management/_components/UserManagementForm.tsx

✓ Module "user-management" created successfully in src/features/user-management

Generated Structure

With Custom Hooks (recommended)

src/ (or app/)
├── hooks/
│   ├── use-form.tsx
│   ├── use-page.tsx
│   └── use-user-preferences.ts
├── services/
│   └── user-preferences.ts
├── constants/
│   └── storage-keys.ts
└── features/
    └── user-management/
        ├── _schemas/
        │   └── UserManagementSchema.ts
        ├── _api/
        │   ├── queries/
        │   │   └── user-management.queries.ts
        │   └── mutations/
        │       └── user-management.mutations.ts
        ├── _components/
        │   ├── UserManagementTable.tsx
        │   └── UserManagementForm.tsx
        ├── page.tsx
        └── layout.tsx

Without Custom Hooks

src/ (or app/)
└── features/
    └── user-management/
        ├── _schemas/
        │   └── UserManagementSchema.ts
        ├── _api/
        │   ├── queries/
        │   │   └── user-management.queries.ts
        │   └── mutations/
        │       └── user-management.mutations.ts
        ├── _components/
        │   ├── UserManagementTable.tsx
        │   └── UserManagementForm.tsx
        ├── page.tsx
        └── layout.tsx

What's Included

🔧 Core Files

  • Schema: TypeScript types with Zod validation
  • API Layer: TanStack Query hooks for data fetching
  • Components: Table and Form components
  • Page: Complete page component with CRUD operations
  • Layout: Basic layout wrapper

🎨 Custom Hooks (Optional)

  • useFormHook: Advanced form management with validation
  • usePage: Page layout with tabs and actions
  • useUserPreferences: Persistent user preferences
  • userPreferencesService: Local storage service
  • Storage keys: Centralized constants

✨ Features

  • Search and filtering
  • Modal forms with confirmation dialogs
  • Loading states and error handling
  • TypeScript types throughout
  • Responsive design
  • Accessibility support

Requirements

  • Node.js 18+
  • Next.js 13+ with App Router
  • TanStack Query
  • React Hook Form
  • Zod
  • TypeScript

Integration

After generating a module:

  1. Add to your route:
// In your route file
import "./features/user-management/user-management"
  1. Navigate to the page:
http://localhost:3000/user-management
  1. Customize the module:
    • Update the schema in _schemas/
    • Modify API calls in _api/
    • Customize components in _components/

CLI Options

| Option | Description | Default | |--------|-------------|---------| | -p, --path <path> | Output directory | '.' | | -d, --dry-run | Show files without creating | false |

Examples

# Create in specific directory
volt-modules init --path ./src

# Preview what would be created
volt-modules init --dry-run

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT © Your Name