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

@bsuite/schema-builder

v0.7.3

Published

Shared Schema Builder canvas, hooks, and Zod schemas for BSuite consumer apps (crm7, BSU, conduit, R80.3). Canonical implementation consolidating the 4 previously-duplicated React Flow schema builders, plus dagre auto-layout, crow's-foot cardinality edges

Readme

@bsuite/schema-builder

Canonical Schema Builder canvas, hooks, and Zod schemas for BSuite consumer apps (crm7, business-suite-unified, conduit, R80.3).

Consolidates the four previously-duplicated React Flow schema builders per ADR-0004 and docs/plans/20260501-universal-wysiwyg-schema-ux-v1.00W.md Phase 1a. Net removal of ~1500 lines of duplicated code across the suite.

Installation

pnpm add @bsuite/schema-builder @xyflow/react @tanstack/react-query @supabase/supabase-js zod lucide-react cmdk

Caller apps must also run pnpm dlx shadcn@latest add command from an isolated directory (per the parent monorepo's pnpm-workspace lockfile rules) if cmdk is not already present.

Usage (thin wrapper — ~30 lines per consumer app)

import { SchemaBuilder } from '@bsuite/schema-builder';
import { supabase } from '@/lib/supabase';
import { useNavigate } from 'react-router-dom';
import { useTenantId } from '@/hooks/useTenantId';

export default function SchemaBuilderPage() {
  const { tenantId } = useTenantId();
  const navigate = useNavigate();

  return (
    <SchemaBuilder
      supabase={supabase}
      tenantId={tenantId}
      appScope="crm7"
      navigationTargets={[
        { path: '/dashboard', label: 'Dashboard' },
        { path: '/contacts', label: 'Contacts' },
        { path: '/settings/schema-builder', label: 'Schema Builder' },
      ]}
      onNavigate={(path) => navigate(path)}
    />
  );
}

Current package line: 0.7.0

  • SchemaBuilder — top-level canvas component (used by consumer thin wrappers)
  • useSchemaController — canonical hook owning load/save/persist via TanStack Query with native optimistic mutations + Supabase Realtime cross-tab sync. Follows queryOptions factory pattern.
  • Zod schemas: CardinalitySchema, EntityFieldSchema, EntityNodeDataSchema, SchemaRelationSchema (full field-level relationship model used by column-level handles and relation authoring).
  • Command palette and toolbar foundations for entity search, navigation, schema editing, auto-layout, and export workflows.
  • Supabase migration 20260503000000_add_field_level_relations.sql (+ rollback twin) in supabase/migrations/, with canonical application via BSU-owned migrations per the migration README.
  • Column-level handles, crow's-foot relation markers, dagre auto-layout, SmartEdge routing, minimap/zoom-to-fit controls, inline rename, and PNG export.
  • FieldCreateDialog and FieldEditDialog for metadata-backed field CRUD.
  • Phase 3 field reorder (Alt+ArrowUp / Alt+ArrowDown) via reorder_entity_fields, sort_order, optimistic rollback, and aria-live announcements.
  • Phase 3 physical column rename via opt-in dry-run → confirm → wet-run flow, rename_physical_column, and schema_mutations_audit.

Related signoff docs

API surface stability

0.7.0 is public but pre-1.0 — minor bumps may adjust shape. Consumer apps pin to ^0.7.0 and re-verify on minor bumps (per the BSuite Dependency Version Policy in AGENTS.md).