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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chartbrew/plugin-strapi

v2.0.0

Published

Chartbrew brings data visualization to your Strapi dashboard

Downloads

843

Readme

Note This plugin is compatible with Strapi v5.

If you are using Strapi v4, check out the strapi-v4 branch of this repository.

✨ Plugin features

  • Explore your Chartbrew dashboards directly on Strapi
  • Multi-dashboard support, can switch between them
  • Create dashboards from your collection types from the Strapi interface
  • Add charts to existing dashboards straight from Strapi
  • The charts are kept up-to-date automatically (you can set an update schedule on Chartbrew)

👋 Get started with Chartbrew

To use this plugin, you will need to have a Chartbrew account, or self-host the platform.

Chartbrew account

Chartbrew is offered as a managed service in exchange for a monthly subscription. This is the fastest way to get started and create visualizations in Strapi. Follow the instructions below to get started:

  1. Create a new account here
  2. Follow this tutorial to get a Chartbrew API Key to use for Strapi

Self-hosting

Chartbrew is 100% open-source and can be self-hosted. Check out some links to get you started:

🔧 Plugin Installation

Navigate to the root of your Strapi folder and run the installation commands below.

With npm:

npm install --save @chartbrew/plugin-strapi

With yarn:

yarn add @chartbrew/plugin-strapi

Add the following attribute in the config/plugins.js file:

chartbrew: true

Or if you do not have the plugins.js file yet, add the file with the following contents:

module.exports = () => ({
  chartbrew: true,
});

And finally, run the build command:

npm run build

Or if you are using yarn:

yarn build

⚙️ Plugin settings

In order for the plugin to work properly, it needs the right credentials to authenticate with Chartbrew.

The plugin can also create charts straight from Strapi, but this needs access to Strapi through an API token.

Follow the instructions below to learn how to configure the plugin.

Chartbrew connection

If you self-host Chartbrew, you will have to enter the frontend and backend addresses. The default values are:

  • Frontend: http://localhost:4018
  • Backend: http://localhost:4019

If you want to use the plugin with a managed service account at chartbrew.com, click on the Use managed Chartbrew address button as shown below:

Cannot authenticate with Chartbrew

Read more here

If you run both Strapi and Chartbrew on localhost or on a non-secure connection (http), you will need to tweak the Strapi security settings. To do this, open the config/middlewares.js file and add the following attribute:

module.exports = [
...
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'http:', 'https:'],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
...
];

And don't forget to build the Strapi project again:

# npm
npm run build

# yarn
yarn build

Create charts from Strapi

You can create charts directly from your Strapi dashboards. To do this, you will need to create a Strapi API Token and add it in the Chartbrew settings page.

⚠️ Dependencies

  • Strapi v5+