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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@powerhousedao/atlas-feedback-issues

v1.0.20

Published

This guide will walk you through the process of creating your own document model library using the Document Model Editor in the Connect app.

Downloads

32

Readme

Document Model Library Creation Guide

This guide will walk you through the process of creating your own document model library using the Document Model Editor in the Connect app.

Step 1: Create a Document Model

  1. Access the Document Model Editor in the Connect app using one of the following methods:

  2. In the Document Model Editor, create a new document model by defining its properties, state schema, initial state, and operations schema.

  3. Once you have configured your document model, press the Save button in the Sidebar.

  4. The document model will be exported as a ZIP file with the extension ".phdm.zip."

Step 2: Create or Clone a Document Model Library Project

Option 1: Create a New Document Model Library Project

Use Yarn to create a new document model library project. Replace "PROJECT_NAME" with your desired project name:

yarn create document-model-lib "PROJECT_NAME"
cd "PROJECT_NAME"

After running the command, you'll have a new project directory created.

Option 2: Clone an existing Document Model Library Project

git clone https://github.com/powerhouse-inc/document-model-libs.git
cd document-model-libs
yarn install

Step 3: Generate the Document Model

Generate the document model using the following command, replacing "DOCUMENT_MODEL" with the the path to the ZIP file saved previously:

yarn generate ./"DOCUMENT_MODEL".phdm.zip

This command will create a directory for the under the /document-models directory within your project which contains:

  • JSON file with the document model specification.
  • GraphQL file with the state and operation schemas.
  • gen folder with autogenerated code.
  • src folder with custom code to be completed.

Step 4: Implement the Reducers

Inside the directory document-models/"DOCUMENT_MODEL"/src/reducers there will be a file for each module of the document model with the reducer functions to be implemented for each operation.

Write your custom reducer logic to handle the document model operations and state changes as needed for your application.

You can also export custom utility functions on the document-models/"DOCUMENT_MODEL"/src/utils.ts file.

Step 5: Build and publish the library

yarn build
yarn publish

If the Connect App is set up to bundle this library then the newly created document model will be accessible in the UI.

Available NPM commands

  • generate: Updates the generated code according to the JSON spec and GraphQL schema.
  • lint: Checks for errors with ESLint and TypeScript checking.
  • format: Formats the code using Prettier.
  • build: Builds the library project using Vite.
  • storybook: Starts Storybook in development mode.
  • build-storybook: Builds Storybook.
  • test: Runs Jest for testing.