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

@sudobility/entity_pages

v0.0.161

Published

Page containers for entity/organization management

Readme

@sudobility/entity_pages

Page containers for entity/organization management in React web applications.

Installation

bun add @sudobility/entity_pages

Usage

import {
  EntityListPage,
  MembersManagementPage,
  InvitationsPage,
  ApiKeysPage,
} from '@sudobility/entity_pages';
import { EntityClient } from '@sudobility/entity_client';

const client = new EntityClient({ baseUrl, networkClient });

// In your router
<Route path="/workspaces" element={
  <EntityListPage client={client} onSelectEntity={handleSelect} />
} />
<Route path="/workspaces/:slug/members" element={
  <MembersManagementPage client={client} entity={entity} currentUserId={userId} />
} />
<Route path="/invitations" element={
  <InvitationsPage client={client} />
} />
<Route path="/workspaces/:slug/api-keys" element={
  <ApiKeysPage client={client} entity={entity} />
} />

API

Pages

| Component | Description | |-----------|-------------| | EntityListPage | List and select the user's entities | | MembersManagementPage | View members, change roles, remove members | | InvitationsPage | Accept or decline invitations addressed to the user | | ApiKeysPage | Create, rename, deactivate, and revoke entity API keys |

Each page is exported alongside its props type (EntityListPageProps, MembersManagementPageProps, InvitationsPageProps, ApiKeysPageProps).

Props

Every page takes an EntityClient and fetches its own data through @sudobility/entity_client hooks. There is no shared PageProps base.

interface EntityListPageProps {
  /** Entity API client */
  client: EntityClient;
  /** Handler for selecting an entity */
  onSelectEntity?: (entity: EntityWithRole) => void;
  /** Handler for navigating to entity settings */
  onNavigateToSettings?: (entitySlug: string) => void;
}

interface MembersManagementPageProps {
  client: EntityClient;
  /** Entity to manage */
  entity: EntityWithRole;
  /** Current user's ID */
  currentUserId: string;
}

interface InvitationsPageProps {
  client: EntityClient;
  /** Callback when an invitation is accepted */
  onInvitationAccepted?: () => void;
}

interface ApiKeysPageProps {
  client: EntityClient;
  /** Entity whose keys are managed */
  entity: EntityWithRole;
}

API Keys

ApiKeysPage manages entity-scoped keys -- credentials that authenticate a caller as the entity itself, for CI jobs, scripts, and integrations that should outlive any individual member. The server stores only a hash, so a new key's secret appears once in a one-time reveal panel and cannot be retrieved again.

The page derives its own gating from the member's role via getPermissionsForRole(entity.userRole).canManageApiKeys: Owners and Managers get create, rename, activate/deactivate, and revoke; Members see the list read-only.

Scope

These pages cover entities, members, invitations, and entity API keys. Application-specific credentials stay in the consuming app: LLM provider keys, per-project keys, and cloud storage configuration differ in shape and API surface from one product to the next.

entity_service derives an EntityPermissions set from the member's role (Owner > Manager > Member) and enforces it server-side. ApiKeysPage mirrors that check client-side to hide controls the API would reject; pages that take no entity prop leave gating to the caller.

Peer Dependencies

  • react >= 18.0.0
  • @tanstack/react-query >= 5.0.0
  • @sudobility/types -- shared type definitions
  • @sudobility/entity_client -- data hooks
  • @sudobility/entity-components -- UI components

Development

bun run build        # Build to dist/
bun run dev          # Rebuild on change
bun run type-check   # TypeScript check (note: hyphenated)
bun run lint         # ESLint
bun run format       # Prettier
bun run test         # Vitest

License

BUSL-1.1