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

medusa-plugin-settings

v0.0.3

Published

Medusa Plugin Settings is a plugin made for medusa that will make it easier to add new settings with ui to your admin dashboard.

Downloads

73

Readme

Medusa Plugin Settings

Thumbnail

The Medusa Plugin Settings streamlines the addition of new settings with a user interface to your admin dashboard, enhancing customization and efficiency. Tailored for Medusa, it simplifies the integration process, providing a seamless and user-friendly experience for administrators.

Documentation

See Documentation.

Contact

Discord: @raideno ID:423897604330618883

Usage

Installation

npm i medusa-plugin-settings

Run Migrations

First build your backend.

npm run build

Run the migrations

npx medusa migrations run

Configuration

This env variables are required on the admin: BACKEND_URL

// medusa-config.js

const plugins = [
  /** @type {import('medusa-plugin-settings').PluginOptions} */
  {
    resolve: "medusa-plugin-settings",
    options: {
      enableUI: true,
      backendUrl: process.env.BACKEND_URL || "http://localhost:9000",
      settings: [
        {
          id: "is-store-working",
          name: "Is Store Enabled",
          type: SettingSchemaTypes.BOOLEAN,
          defaultValue: true,
          // optional
          description:
            "If set to false store-front will no more be accessible.",
          note: "BE CARFUL!",
        },
        // other settings..
      ],
    },
  },
];

// ...

Use Settings

The plugin will make sure at each startup that every setting is initialized with it's default value / previously set value and make them available through endpoints or via the admin UI under the settings tab.

Image.

Video.

Endpoints

  • GET <BACKEND_URL>/store/extended-settings

  • GET <BACKEND_URL>/store/extended-settings/:settingId

Documentation

See Documentation.

Examples & Use Cases

Contribution

Anyone is welcome to contribute or suggest new features, please contact me on Discord: @raideno ID:423897604330618883.

Features

  • Effortless UI Integration for Settings: The Medusa Plugin Settings simplifies the incorporation of new settings into your admin dashboard. Mark your settings with a decorator, and watch as the plugin seamlessly creates a user interface within the Medusa dashboard.

  • Streamlined Configuration Operations: With the added UI, managing your settings becomes a breeze. Perform essential configuration tasks such as creating new settings, editing existing ones, viewing detailed information, and deleting settings with unparalleled ease.

  • Tailor to Your Needs: Customize the generated UI according to your specific requirements. The Medusa Plugin Settings provides flexibility in controlling the appearance and behavior of UI elements, ensuring a personalized experience.

  • Endpoint Exposure for Enhanced Interaction: Beyond dashboard integration, this plugin exposes your settings through a dedicated endpoint. This feature facilitates seamless interaction between your store and the configured settings, offering a programmatic avenue for efficient communication.