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

@ng-org/refine-providers

v0.1.2-alpha.1

Published

Readme

Refine providers for NextGraph

Data, auth and live providers that can be used in any Refine application.

Usage

For a quick overview, have a look at our example app.

Refine relies on the concept of "resources" (which are data types) to manage your application in a structured way. On the other side, NextGraph identifies data types using ShEx shapes which are transformed into "shape types" using its own tool. So naturally our data provider needs to receive a list of shape types in order to identify resources.

1. Define your shapes

Create a /shapes directory and, within it, two subdirectories: /shex and /orm

Within the /shapes/shex directory, create a ShEx file with the shape of the data you want to handle.

Here's an example of a shape for an ActivityStreams Note, saved under the note.shex filename:

PREFIX as: <https://www.w3.org/ns/activitystreams#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

as:Note {
  a [as:Note] ;
  as:title xsd:string ;
  as:content xsd:string ? ;
}

2. Pass the shape types to the data provider

Go to the /shapes directory and run the following command:

npx rdf-orm build --input ./shex --output ./orm

If you created a note.shex file, this will generate three files in the /orm subdirectory:

  • note.schema.ts
  • note.shapeTypes.ts
  • note.typings.ts

Now within the shapes directory, create a shapeTypes.ts like this:

import { ShapeTypes } from "@ng-org/refine-providers";
import { NoteShapeType } from "./orm/note.shapeTypes";

const shapeTypes : ShapeTypes = {
  notes: NoteShapeType
}

export default shapeTypes;

3. Configure the providers

Add the providers to Refine. The live provider is optional, but it will allow you to sync data if several users are working on the same data. See the example app for how to handle this correctly in the edit and view pages.

import { authProvider, dataProvider, liveProvider } from "@ng-org/refine-providers";
import shapeTypes from "./shapes/shapeTypes";

const ngAuthProvider = authProvider();
const ngDataProvider = dataProvider({ shapeTypes, authProvider: ngAuthProvider })
const ngLiveProvider = liveProvider({ shapeTypes })

const App = () => (
  <Refine
    authProvider={ngAuthProvider}
    dataProvider={ngDataProvider}
    liveProvider={ngLiveProvider}
    options={{ liveMode: "auto", ... }}
    ...
  >
  ...

4. Create the React pages

You can now call the various hooks provided by Refine to create, read, update or delete resources.

For useForm, useTable, useShow, you can pass the Note generated by NextGraph CLI.

Here's an example of a simple list view:

import { List, useTable } from "@refinedev/antd";
import { Table } from "antd";
import { Note } from "./shapes/orm/notes.typings";

export const PostList = () => {
  const { tableProps } = useTable<Note>();
  return (
    <List>
      <Table {...tableProps} owKey="@graph">
        <Table.Column dataIndex="@graph" title="ID" />
        <Table.Column dataIndex="title" title="Title" />
        <Table.Column dataIndex="content" title="Content" />
      </Table>
    </List>
  );
};

Commands

pnpm build
pnpm watch
pnpm publish