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

@adminforth/dashboard

v1.2.0

Published

Dashboard plugin for AdminForth

Downloads

360

Readme

@adminforth/dashboard

Dashboard plugin for AdminForth.

It adds configurable dashboard pages backed by an AdminForth resource. Dashboard records define groups and widgets, the plugin renders them under /dashboard/:slug, contributes a Dashboards sidebar group, and exposes endpoints for editing groups and widgets from the AdminForth UI.

Full setup guide: https://adminforth.dev/docs/tutorial/Plugins/dashboard/

Dashboard Config Shape

type DashboardConfig = {
  version: number
  groups: {
    id: string
    label: string
    order: number
  }[]
  widgets: DashboardWidgetConfig[]
}

Each widget has common fields:

| Field | Description | | --- | --- | | id | Persisted widget id. | | group_id | Group where the widget is rendered. | | label | Optional widget title. | | target | Widget type: table, chart, kpi_card, pivot_table, or gauge_card. | | order | Widget order inside its group. | | size | Preset width: small, medium, large, wide, or full. | | width, height, min_width, max_width | Optional explicit layout constraints. | | data_source | Resource or aggregate data source definition. |

Widget Support Matrix

| Widget target | Config field | Main settings | Data usage | | --- | --- | --- | --- | | table | table | pagination, page_size | Uses data_source.type = 'resource' to display resource rows with backend pagination unless pagination is false. | | chart | chart | type, x_field, y_field, label_field, value_field, bucket_field, buckets, series, series_name, color, colors | Uses data_source.type = 'aggregate' with group_by. | | kpi_card | kpi_card | value_field, label_field, prefix, suffix | Reads aggregate values or the first returned row from data_source. | | gauge_card | gauge_card | value_field, min, max, min_field, max_field, suffix, color | Reads aggregate values or the first returned row from data_source and renders progress between static or field-driven bounds. | | pivot_table | pivot_table | row_field, column_field, value_field, aggregation | Uses grouped aggregate rows from data_source.type = 'aggregate'. aggregation supports count and sum. |

Chart widget types:

| Chart type | Notes | | --- | --- | | line | Uses x_field and y_field; optional series_name and color. | | pie | Uses label_field and optional value_field; without value_field, rows are counted by label. | | bar | Uses label_field and value_field, or bucket_field with buckets. | | stacked_bar | Uses x_field and series; if series is omitted, non-x columns become series. | | funnel | Uses label_field, value_field, and optional colors. | | histogram | Uses the same bucket settings as bar. |

Data Source Shape

type WidgetDataSource =
  | {
      type: 'resource'
      resource_id: string
      columns?: string[]
      filters?: unknown
      sort?: unknown
    }
  | {
      type: 'aggregate'
      resource_id: string
      aggregations: Record<string, {
        operation: 'sum' | 'count' | 'avg' | 'min' | 'max' | 'median'
        field?: string
      }>
      group_by?:
        | { type: 'field'; field: string }
        | {
            type: 'date_trunc'
            field: string
            truncation: 'day' | 'week' | 'month' | 'year'
            timezone?: string
          }
      filters?: unknown
    }

resource_id is an AdminForth resourceId. The data source is executed through AdminForth resources, so widgets use the same resource contracts as the rest of the application.

Runtime Structure

DashboardPage.vue
└── DashboardRuntime.vue
    └── DashboardGroup.vue
        └── WidgetShell.vue
            └── WidgetRenderer.vue
                ├── TableWidget.vue
                ├── ChartWidget.vue
                ├── KpiCardWidget.vue
                ├── PivotTableWidget.vue
                └── GaugeCardWidget.vue

DashboardPage.vue loads a dashboard by slug, DashboardRuntime.vue renders ordered groups, WidgetShell.vue provides the widget frame and editor actions, and WidgetRenderer.vue selects the widget component by target.