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

obs-admin-dashboard

v1.0.1

Published

A ready-to-use admin dashboard base package for React apps. It provides the core infrastructure — API layer, layouts, sidebar navigation, shared components, and a `DashboardProvider` — that you can drop into any React application as a starting point.

Readme

obs-admin-dashboard

A ready-to-use admin dashboard base package for React apps. It provides the core infrastructure — API layer, layouts, sidebar navigation, shared components, and a DashboardProvider — that you can drop into any React application as a starting point.

Installation

npm install obs-admin-dashboard

react and react-dom are peer dependencies — make sure they're installed in your app.

Quick Start

The package ships with two usage styles:

1. Use the DashboardProvider (all-in-one)

Wrap your app with DashboardProvider to get a configured QueryClient, theme, tooltips, and toasts:

import { DashboardProvider, AppLayout } from "obs-admin-dashboard"
import "obs-admin-dashboard/styles.css"

function App() {
  return (
    <DashboardProvider
      config={{
        apiUrl: "https://your-api.example.com",
        theme: "system",
        toastPosition: "top-center",
      }}
    >
      <AppLayout navItems={myNavItems} brandName="My Company" logoUrl="/logo.png">
        {/* your routed content */}
      </AppLayout>
    </DashboardProvider>
  )
}

2. Use individual exports

Import only what you need for tree-shaking:

import { DataTable, DataPagination, SearchBar, ConfirmDialog } from "obs-admin-dashboard"
import { useGetItems } from "./my-feature/hooks" // your feature logic

Exports

Provider

| Export | Description | |--------|-------------| | DashboardProvider | Sets up QueryClient, ThemeProvider, TooltipProvider, and Toaster | | DashboardConfig | Config type (apiUrl, theme, toastPosition, navItems) |

API Layer

| Export | Description | |--------|-------------| | apiClient | Axios instance with Bearer token + refresh queue | | authClient | Axios instance for unauthenticated requests (login/register) | | CrudService<T> | Base class with typed getAll, getById, create, update, delete | | BASE_URL | The configured API base URL | | ApiResponse<T>, PaginatedApiResponse<T>, PaginatedMeta | API response types |

Layout

| Export | Description | |--------|-------------| | AppLayout | Authenticated shell with sidebar + outlet (navItems, brandName, logoUrl, sidebarFooter, redirectPath) | | AuthLayout | Centered card layout for login/OTP/password flows | | AppHeader | Page header with title/total/action button or dropdown | | AppSidebar | Collapsible sidebar with search, nav, and user footer |

Sidebar

| Export | Description | |--------|-------------| | SidebarNav | Navigation menu (items prop overrides defaults) | | SidebarUserFooter | User profile + logout footer | | NavItem, NavChild | Nav item types |

Shared Components

| Export | Description | |--------|-------------| | DataTable | TanStack Table v8 wrapper | | DataPagination | Server-side pagination with page-size selector | | SearchBar | Debounced search input synced to URL params | | ConfirmDialog | Delete/confirm alert dialog | | ErrorBoundary | React error boundary | | ThemeProvider, useTheme | Theme context |

UI Components (shadcn/ui)

Re-exported shadcn primitives: Button, Input, Label, Dialog, AlertDialog, Card, Select, Table, Form, DropdownMenu, Sidebar (+ useSidebar).

Utilities & Hooks

  • cn — clsx + tailwind-merge utility
  • useIsMobile — responsive breakpoint hook

Styles

Import the package styles in your app's CSS entry (requires Tailwind v4 with the @tailwindcss/vite plugin):

@import "obs-admin-dashboard/styles.css";

API Configuration

Set the API base URL via an environment variable:

VITE_API_URL=https://your-api.example.com

apiClient automatically attaches Bearer tokens from localStorage.accessToken and handles token refresh on 401.

Feature Modules

Business logic lives in src/feature/[name]/ — each feature is self-contained with types.ts, services/, hooks/, components/, page/, and routes/routes.tsx. See src/feature/CLAUDE.md for the two supported patterns (dialog-based and page-based).

Commands

npm run dev          # Start dev server
npm run build        # Type-check + Vite app build
npm run build:lib    # Build ESM + UMD + type declarations for publishing
npm run typecheck    # tsc --noEmit
npm run lint         # ESLint
npm run format       # Prettier
npm pack             # Dry-run check of publishable files

Publishing

npm run build:lib
npm publish