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

@educorvi/json-schema-viewer

v1.0.1

Published

Generate interactive static documentation for a JSON Schema.

Readme

JSON Schema Explorer

Interactive documentation UI for JSON Schema. This project is a Vue 3 + Vite single-page app that renders a schema as browsable documentation, with route-based navigation into nested nodes and optional loading of external schemas at runtime.

What It Does

  • Renders schema metadata such as title, description, type, enums, constants, patterns, and validation constraints.
  • Lets you drill into properties, items, definitions, $defs, anyOf, oneOf, and allOf.
  • Shows required properties and whether additionalProperties are allowed.
  • Resolves internal references and supports loading a schema from a remote URL via query string.
  • Includes a collapsible raw JSON view with syntax highlighting.
  • Supports light, dark, and system theme modes.

Requirements

  • Node.js ^22.18.0 || >=24.12.0
  • Yarn 4.17.0

Use with npx

Generate a self-contained static viewer for a schema:

npx json-schema-viewer ./path/to/schema.json --out-dir ./dist

The output directory contains the generated index.html and bundled assets and can be served by any static web server. The output defaults to ./dist when --out-dir is omitted.

For a locally checked-out copy of this package, the equivalent command is:

yarn json-schema-viewer ./path/to/schema.json --out-dir ./dist

Install

yarn

Run Locally

yarn dev

The Vite dev server will start the app locally. By default, the app renders the schema embedded at build time.

Provide a Schema

The app reads the default schema at build/dev time through the Vite environment handling in vite.config.ts.

Option 1: Load from a file

VITE_JSON_SCHEMA_PATH=./path/to/schema.json yarn dev

Option 2: Inline the schema JSON

VITE_JSON_SCHEMA='{"title":"Example","type":"object"}' yarn dev

VITE_JSON_SCHEMA_PATH takes precedence when both variables are set.

Runtime Usage

Browse the bundled schema

Open the app root:

/

Navigation is route-based, so deeper paths map directly to schema segments, for example:

/properties/user
/definitions/Address
/$defs/Profile
/items

Load an external schema

Pass a schema URL through the url query parameter:

/?url=https://example.com/schema.json

The viewer will fetch that schema in the browser and keep route navigation working against the loaded document.

The remote endpoint must allow browser access from your app origin, otherwise the request will fail due to CORS.

Scripts

  • yarn dev starts the Vite development server.
  • yarn build runs type-checking and creates a production build.
  • yarn preview serves the production build locally.
  • yarn lint runs Oxlint and ESLint with autofix enabled.
  • yarn format formats files under src/ with Prettier.

Build

yarn build