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/db-ui

v2.6.2

Published

Database management micro-frontend for Stubrix

Downloads

22

Readme

@stubrix/db-ui

Database management micro frontend for the Stubrix platform — React 19 + TailwindCSS.

Overview

Standalone package containing all database UI: snapshot management, connection configs, and engine selection. Router-agnostic by design — consumed by @stubrix/ui as a single page component.

Structure

src/
├── index.ts                  Public API — all exports
├── lib/
│   └── db-api.ts             Typed API client for /api/db endpoints
├── hooks/
│   └── useDbManager.ts       Central state hook
├── components/               Database widgets, forms, snapshot list
└── pages/
    └── DatabasesPage.tsx     Main entry page (exported)

Public API

import { DatabasesPage, useDbManager, dbApi } from '@stubrix/db-ui';

DatabasesPage

Drop-in page component — no props required. Manages all internal state via useDbManager.

// In @stubrix/ui App.tsx
<Route path="databases" element={<DatabasesPage />} />

useDbManager

Central state hook for database operations.

const {
  // State
  projects,
  selectedProjectId,
  setSelectedProjectId,
  engines,
  activeEngines,
  selectedEngine,
  setSelectedEngine,
  databases,
  loadingDatabases,
  snapshots,
  databaseInfo,
  loading,
  error,

  // Actions
  refreshAll,
  getDatabaseInfo,
  createSnapshot,
  restoreSnapshot,
  deleteSnapshot,
  saveProjectDatabaseConfig,
  deleteProjectDatabaseConfig,
} = useDbManager();

dbApi

Typed API client for all /api/db endpoints.

// Engines
await dbApi.getEngines()

// Databases
await dbApi.getDatabases(engine, projectId?, connectionId?)
await dbApi.getDatabaseInfo(name, engine, projectId?, connectionId?)

// Snapshots
await dbApi.getSnapshots(projectId?)
await dbApi.createSnapshot(engine, payload)
await dbApi.restoreSnapshot(engine, name, database, options)
await dbApi.deleteSnapshot(name)

// Project database configs
await dbApi.getProjectDatabaseConfigs(projectId)
await dbApi.upsertProjectDatabaseConfig(projectId, payload)
await dbApi.deleteProjectDatabaseConfig(projectId, id)

API Endpoints Consumed

| Endpoint | Description | | ------------------------------------------------------ | ---------------------------- | | GET /api/db/engines | List available DB engines | | GET /api/db/databases | List databases for engine | | GET /api/db/databases/:name | Database info (tables, size) | | GET /api/db/snapshots | List snapshots | | POST /api/db/snapshots | Create snapshot (pg_dump) | | POST /api/db/snapshots/:name/restore | Restore snapshot (psql) | | DELETE /api/db/snapshots/:name | Delete snapshot | | GET /api/projects/:id/databases/configs | Project DB configs | | PUT /api/projects/:id/databases/configs | Upsert project DB config | | DELETE /api/projects/:id/databases/configs/:configId | Delete DB config | | GET /api/projects | List projects (for selector) |

Development

# From monorepo root
npm run build:db-ui     # TypeScript compile

Dependencies

  • @stubrix/shared — shared TypeScript types
  • react ^19, react-dom ^19 (peer)
  • lucide-react — icons
  • tailwind-merge, clsx — class utilities