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

@stubrix/ui

v2.6.2

Published

Stubrix Dashboard — React frontend

Downloads

134

Readme

@stubrix/ui

React 19 + Vite 7 host application — the main dashboard entry point for Stubrix.

Overview

This package is the host shell that composes the micro frontend architecture. It provides routing, layout, and real-time logs. All mock server and database UI logic lives in dedicated packages consumed here.

Package Role

| Responsibility | Package | | ------------------------------------------------------ | -------------------------------- | | Mock server pages (Projects, Mocks, Editor, Recording) | @stubrix/mock-ui | | Database pages (Snapshots, Connections) | @stubrix/db-ui | | Real-time logs page | @stubrix/ui (this package) | | Layout, routing, navigation shell | @stubrix/ui (this package) |

Structure

src/
├── App.tsx                  Route definitions + bridge wrappers
├── components/
│   ├── Layout.tsx           Sidebar + outlet shell
│   └── ui/
│       └── Badge.tsx        Shared badge component
├── lib/
│   ├── api.ts               Base API client (fetch wrapper)
│   ├── socket.ts            Socket.IO client for /ws/logs
│   └── utils.ts             cn() utility
└── pages/
    ├── MockServersBridge.tsx      → MockServersPage (@stubrix/mock-ui)
    ├── ProjectDashboardBridge.tsx → ProjectDashboardPage (@stubrix/mock-ui)
    ├── MocksListBridge.tsx        → MocksListPage (@stubrix/mock-ui)
    ├── MockEditorBridge.tsx       → MockEditorPage (@stubrix/mock-ui)
    ├── RecordingBridge.tsx        → RecordingPanelPage (@stubrix/mock-ui)
    └── LogsPage.tsx               Real-time logs (Socket.IO)

Bridge Pattern

Each mock page is a thin wrapper that connects react-router-dom hooks to the router-agnostic props of @stubrix/mock-ui:

// Example: MocksListBridge.tsx
import { useNavigate, useParams } from 'react-router-dom';
import { MocksListPage } from '@stubrix/mock-ui';

export function MocksListBridge() {
  const { projectId } = useParams<{ projectId: string }>();
  const navigate = useNavigate();

  if (!projectId) return null;

  return (
    <MocksListPage
      projectId={projectId}
      onBack={() => navigate(`/projects/${projectId}`)}
      onNavigateToNewMock={(id) => navigate(`/projects/${id}/mocks/new`)}
      onNavigateToEditMock={(id, mockId) =>
        navigate(`/projects/${id}/mocks/${mockId}/edit`)
      }
    />
  );
}

Routes

| Path | Component | | ----------------------------------------- | ------------------------------------------------- | | / | MockServersBridgeMockServersPage | | /projects/:projectId | ProjectDashboardBridgeProjectDashboardPage | | /projects/:projectId/mocks | MocksListBridgeMocksListPage | | /projects/:projectId/mocks/new | MockEditorBridgeMockEditorPage | | /projects/:projectId/mocks/:mockId/edit | MockEditorBridgeMockEditorPage | | /projects/:projectId/recording | RecordingBridgeRecordingPanelPage | | /databases | DatabasesPage (@stubrix/db-ui) | | /logs | LogsPage | | /scenarios | ScenariosBridge | | /stateful | StatefulMocksBridge | | /webhooks | WebhooksBridge | | /chaos | ChaosBridge | | /chaos-network | ChaosNetworkBridge | | /coverage | CoverageBridge | | /governance | GovernanceBridge | | /intelligence | IntelligenceBridge | | /templates | TemplatesBridge | | /metrics | MetricsBridge | | /tracing | TracingBridge | | /performance | PerformanceBridge | | /protocols | ProtocolsBridge (GraphQL SDL + gRPC stubs) | | /events | EventsBridge (Kafka + RabbitMQ) | | /auth | AuthBridge | | /iam | IamBridge | | /contracts | ContractsBridge | | /cloud | CloudBridge | | /storage | StorageBridge | | /settings | SettingsPage — service dashboard (24 services) | | /settings/services/:serviceId | ServiceConfigPage — per-service config editor | | /settings/backups | BackupsPage — config backup management |

Development

# From monorepo root
npm run dev:ui       # Vite dev server on :5173 (proxies /api/* to :9090)
npm run build:ui     # TypeScript check + Vite production build

Production build outputs to packages/api/public/ for single-container serving.

Dependencies

  • @stubrix/mock-ui — mock server micro frontend
  • @stubrix/db-ui — database micro frontend
  • @stubrix/shared — shared TypeScript types
  • react-router-dom ^7 — client-side routing
  • socket.io-client — WebSocket connection for logs