@malevich-studio/strapi-plugin-admin-metrics-widget
v1.0.2
Published
Admin dashboard widget for Strapi v5 that shows the number of unconfirmed users and provides a quick link to filter them in Content Manager. The widget auto-refreshes every 1 minute.
Readme
@malevich-studio/strapi-plugin-admin-metrics-widget
Admin dashboard widget for Strapi v5 that shows the number of unconfirmed users and provides a quick link to filter them in Content Manager. The widget auto-refreshes every 1 minute.
Features
- Unconfirmed users counter widget on the admin dashboard
- Quick link to the filtered list of unconfirmed users
- Auto refresh every 60 seconds
- Internationalization-ready (includes
enmessages)
Requirements
- Strapi v5
- Users & Permissions plugin enabled (the widget queries
plugin::users-permissions.user)
Installation
npm install @malevich-studio/strapi-plugin-admin-metrics-widget
# or
yarn add @malevich-studio/strapi-plugin-admin-metrics-widgetNo manual registration is required. The plugin registers its admin widget automatically.
After installing, rebuild your Strapi admin:
# Inside your Strapi project
npm run build && npm run start
# or
yarn build && yarn startUsage
Open the Strapi admin dashboard. You will see a widget titled “Unconfirmed users” displaying the current count. Clicking the number opens the Content Manager with a filter applied to show only unconfirmed users.
Configuration (optional)
No extra configuration is needed. If you maintain config/plugins.(ts|js) in your Strapi app, you may explicitly enable the plugin:
// config/plugins.ts
export default () => ({
'admin-metrics-widget': {
enabled: true,
},
});Peer dependencies
This package expects the following to be provided by your Strapi app:
- @strapi/strapi ^5.29.0
- @strapi/sdk-plugin ^5.3.2
- react ^18.3.1
- react-dom ^18.3.1
- react-router-dom ^6.30.1
- styled-components ^6.1.19
How it works
The widget fetches a single page (size 1) of users with confirmed=false from the Content Manager API and reads the pagination.total value to display the count. It refreshes every 60 seconds.
Development
This repository uses Strapi’s plugin tooling.
Useful scripts:
# Build distributable files (admin + server)
npm run build
# Watch and link for local development
npm run watch:link
# TypeScript checks
npm run test:ts:front
npm run test:ts:backTo test locally inside a Strapi app, use watch:link and follow Strapi’s plugin linking workflow.
Limitations
- Designed for Strapi v5 admin. Not compatible with Strapi v4.
- Requires Users & Permissions plugin and proper admin permissions to access Content Manager API.
License
MIT © Malevich
