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

create-middag-ui

v0.18.0

Published

Bootstrap a MIDDAG React UI layer in your Moodle or WordPress plugin

Downloads

4,876

Readme

create-middag-ui

Bootstrap a MIDDAG React UI layer in your Moodle or WordPress plugin.

Usage

# Community (no auth needed)
npx create-middag-ui

# PRO (source maps, mock SPA, full exports)
npx @middag-io/create-middag-ui

Or specify a custom directory:

npx create-middag-ui mydir

Non-interactive mode

Skip all prompts with --yes (uses defaults: ui/, public registry):

npx create-middag-ui --yes

# PRO path (GitHub Packages) without prompts:
npx create-middag-ui --yes --github

Host platform and Moodle component are still auto-detected. Only interactive prompts are skipped.

Run from your plugin project root. The wizard:

  1. Auto-detects your host — finds version.php (Moodle) or wp-config.php (WordPress)
  2. Asks for target directory — default ui/, or pass as CLI argument
  3. Configures registry — GitHub Packages (with source maps) or npm public (no auth needed)
  4. Scaffolds everything — config files, demo components, mock environment
  5. Installs dependencies — runs npm install automatically with progress feedback

Then start developing:

cd ui
npm run dev:mock

Your mock opens at http://localhost:5174 (Moodle), 5175 (WordPress), or 5176 (Custom).

What it creates

ui/
  package.json              # Dependencies and scripts
  tsconfig.json             # TypeScript config with path aliases
  vite.mock.config.ts       # Vite dev server config for mock build
  src/
    blocks/
      hello-block.tsx       # Custom block example (rename me!)
    components/
      greeting.tsx          # Standalone component example (rename me!)
    contracts.ts            # PageContract type re-export
  mock/
    index.html              # HTML entry point
    main.tsx                # React entry with registerDefaults() + ContractPage
    hello-contract.ts       # Example PageContract (metric card + data table)
    tailwind.css            # Tailwind CSS import

Community vs PRO

@middag-io/react is available in two editions:

Community (default, no auth)

Choose "No" when asked about GitHub access. Dependencies install from the public npm registry with zero configuration.

PRO (source maps, mock SPA, full exports)

Choose "Yes" when asked about GitHub access. The wizard will:

  1. Ask for your GitHub Personal Access Token
  2. Validate the token against GitHub Packages
  3. Save the registry + token to ~/.npmrc (global, not project-local)

Create a token at github.com/settings/tokens with the read:packages scope.

After setup

Once @middag-io/react is installed, more commands become available from inside your UI directory:

npx @middag-io/react doctor        # Validate project setup
npx @middag-io/react dev            # Start mock dev server
npx @middag-io/react add-block <t>  # Scaffold a new block type
npx @middag-io/react upgrade        # Check for updates

Documentation

License

MIT