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

test-master-ui

v0.0.6

Published

This repository contains a comprehensive UI library built with Next.js, React, and TypeScript for managing master data and master settings. It provides a set of reusable components designed to build powerful and flexible administration interfaces. The lib

Readme

Master Management UI Library

This repository contains a comprehensive UI library built with Next.js, React, and TypeScript for managing master data and master settings. It provides a set of reusable components designed to build powerful and flexible administration interfaces. The library is structured as a package within a Next.js application, which also serves as a live demonstration environment.


Core Components

The library is centered around four main components that provide the full CRUD (Create, Read, Update, Delete) functionality for master settings and their corresponding data.

1. MasterSetting

This component renders a list of all available master setting definitions. It features searching and pagination capabilities to easily navigate through numerous settings. From here, users can select a setting to view its associated data or create a new setting definition.

2. EditMasterSettings

This is the powerhouse for defining the structure of your master data. It provides a form to create or edit a "master setting." Key features include:

  • Defining basic information like a unique code and name.
  • A dynamic Fields Table where you can add, remove, reorder, and edit the fields that will make up the master data records.

3. MasterData

Once a master setting is selected, this component displays all the data records that conform to that setting's schema. It includes:

  • A powerful data table with server-side pagination and sorting.
  • Advanced search and filtering capabilities based on the fields defined in the master setting.
  • Options to create new data records or navigate to edit existing ones.

4. EditMasterData

This component renders a form that is dynamically generated based on the fields defined in the associated master setting. It allows users to create a new master data record or edit an existing one.


Key Features

  • Dynamic Form Generation: Forms in EditMasterData are created on-the-fly based on field definitions from a MasterSetting, ensuring data integrity and consistency.
  • Rich Field Types: Supports a wide variety of data types for master data fields, including:
    • string, number, boolean, date
    • array (for a list of strings)
    • json (with a built-in JSON editor)
    • text-area, text-html (rich text editor), and text-markdown
    • auto_number for automatically generating sequential codes.
  • Advanced Data Table: The data tables for both settings and data come with robust features like server-side pagination, sorting, and filtering to handle large datasets efficiently.
  • Role-Based UI: The root layout and URL structure are designed to support different user segments, such as system_admin and tenant, allowing for tailored user experiences.
  • Bulk & Raw Data Handling: A JSONEditorComponent is available for creating or editing both settings and data via raw JSON, which is ideal for bulk imports or complex data structures.
  • Asynchronous Task Monitoring: Uses AWS AppSync Subscriptions to provide real-time feedback for long-running operations like data deletion or copying data across tenants.
  • Data Portability: Includes functionality for system administrators to copy master settings and their associated data to other tenants.

Running the Demo Application

The included Next.js application serves as a demonstration of the UI library's capabilities.

Prerequisites:

  • Node.js
  • npm, yarn, or pnpm

Steps:

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Install dependencies:

    npm install
  3. Configure Environment Variables: Create a .env file in the root of the project and add the necessary API endpoints.

    # Example
    NEXT_PUBLIC_MASTER_API_BASE=http://your-api-server.com
    NEXT_PUBLIC_MASTER_APPSYNC_URL=wss://your.appsync-api.us-east-1.amazonaws.com/graphql
    NEXT_PUBLIC_MASTER_APPSYNC_APIKEY=your-appsync-api-key
    NEXT_PUBLIC_MASTER_APPSYNC_REGION=us-east-1
  4. Run the development server:

    npm run dev

    The application will be available at http://localhost:8888.

  5. Access the Application: Upon visiting the application, you will be prompted to enter a Bearer Token and select a user Segment (system_admin or tenant). This is required to initialize the API clients and user context for the demo.


Building the Library

To use this library in other projects, you can build it into a distributable package.

  1. Run the build command:
    npm run build
  2. Output: The compiled and bundled library files will be located in the dist/ directory. This directory is ready to be published to a package registry like npm or consumed locally in another project.

The build process uses tsup and a custom postbuild.js script to ensure that all client-side components are correctly marked with the "use client" directive for compatibility with the Next.js App Router.


Technology Stack