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

scaffy-temp

v1.0.6

Published

A CLI tool to scaffold project folder structures from predefined templates

Downloads

39

Readme

📂 Enterprise-Style Folder Structure & Conventions

This project is mainly focused on general folder structures and patterns followed at enterprise level. ⚠️ Note: Structures vary based on requirements — this is not a one-size-fits-all solution, but a good-to-go directory that works for most projects.

We aim to support major and popular libraries/frameworks including:

  • Frontend → React, Next.js, Tailwind CSS
  • Forms → Zod, Formik, React Hook Form
  • State Management → Redux Toolkit (RTK), Zustand
  • Backend → Node.js, FastAPI, NestJS
  • Others → Testing, CI/CD, Authentication (NextAuth, Supabase, Clerk, Auth0), etc.

This structure helps teams quickly bootstrap enterprise-grade apps with consistent patterns.


📁 Folder Structure

src/
  ├── app/                # Next.js App Router (routes) (optional for NEXT APPS)
  │   └── route-name/
  │       ├── page.jsx    # Page file (only allowed here)
  │       └── layout.jsx  # Layout file (only allowed here)
  │
  ├── hooks/              # Custom React hooks
  │
  ├── store/              # State management (Zustand, Redux, etc.)
  │
  ├── modules/            # Full pages (Login, Dashboard, Form, etc.)
  │   └── login/
  │       ├── index.jsx
  │       ├── LoginContainer.jsx
  │       └── Login.jsx
  │       └── components/ # Module-specific components
  │
  ├── components/         # Shared/common components
  │   ├── UI/             # Custom UI components
  │   │   └── multi-select/
  │   │       └── index.jsx
  │   │
  │   └── forms/          # Form-related components
  │
  ├── utils/              # Utility/helper functions
  │
  └── types/              # TypeScript types/interfaces

📝 Rules & Conventions

1. Pages (src/app)

  • Only page.jsx and layout.jsx files are allowed inside route folders.

  • Example:

    src/app/login/page.jsx
    src/app/login/layout.jsx

2. Modules (src/modules)

  • Each module = a full page (e.g., Login, Form, Dashboard).
  • Naming convention: kebab-case (e.g., login-form, user-profile).

Required Files Inside a Module

  1. index.jsx → Main export (import this everywhere).
  2. ModuleContainer.jsx → Business logic / state / data fetching.
  3. Module.jsx → Pure UI component (presentational).

Import Flow

  • Module.jsx → imported inside ModuleContainer.jsx
  • ModuleContainer.jsx → imported inside index.jsx
  • Always import only index.jsx when using the module in other parts of the app.

Module-Specific Components

  • Place in: src/modules/module-name/components/

  • Example:

    src/modules/login/components/LoginButton.jsx

3. Components (src/components)

  • Shared/common components used across modules.

  • Each component folder should contain only an index.jsx file for clean imports.

  • Example:

    src/components/UI/multi-select/index.jsx

4. Hooks (src/hooks)

  • Store all custom hooks.
  • Naming: useSomething.js

5. Store (src/store)

  • Centralized state management (Zustand/Redux).

6. Utils (src/utils)

  • General utility/helper functions.

7. Types (src/types)

  • Global TypeScript types & interfaces.

✅ Example: Login Page Flow

  1. Create a module folder:

    src/modules/login/
  2. Add three base files:

    • Login.jsx → UI
    • LoginContainer.jsx → logic + hooks + API calls
    • index.jsx → entry point (exports container)
  3. Usage:

    import Login from "@/modules/login";