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

@ozzaim/medusa-plugin-product-reviews

v1.0.4

Published

A product review plugin for Medusa v1 that allows customers to leave reviews and ratings for products, including optional admin UI.

Readme

Medusa Product Review Plugin

A plugin for Medusa that enables product reviews in your e-commerce store.

Features

  • Customers can leave reviews on products
  • Admins can moderate, approve, or delete reviews
  • Ratings and comments support
  • Aggregate product ratings
  • Fully customizable through the Medusa admin panel

Installation

Install the Plugin

npm install medusa-plugin-reviews

Add the Plugin to Your medusa-config.js

const plugins = [
  // ...other plugins
  {
    resolve: "medusa-plugin-reviews",
    options: {},
  },
];

Usage

Customers

Customers can submit reviews via the storefront or API.

Admins

Admins can manage reviews in the Medusa admin dashboard.

API Endpoints

POST /store/reviews

Submit a review.

Request Body:

{
  "product_id": "prod_123",
  "variant_id": "variant_123",
  "rating": 4,
  "comment": "Good quality",
  "name": "Ali"
}

Responses:

200 OK

{
  "review": {
    "id": "rev_456",
    "product_id": "prod_123",
    "rating": 4,
    "comment": "Good quality",
    "name": "Ali",
    "approved": false,
    "created_at": "2025-06-16T12:30:00.000Z"
  }
}

400 Bad Request

{
  "message": "Missing required fields"
}

GET /store/products/:id/reviews

Retrieve reviews for a specific product.

Query Parameters:

  • product_id (string, optional): Filter reviews by Product ID.
  • variant_id (string, optional): Filter reviews by Variant ID.

Responses:

200 OK

{
  "reviews": [
    {
      "id": "rev_123",
      "product_id": "prod_123",
      "variant_id": "variant_123",
      "rating": 5,
      "comment": "Awesome product!",
      "name": "Ali",
      "approved": true,
      "created_at": "2025-06-16T12:00:00.000Z"
    }
  ],
  "count": 1
}

404 Not Found

{
  "message": "No reviews found for the provided criteria"
}

500 Internal Server Error

{
  "message": "An error occurred while fetching reviews"
}

Admin API

GET /admin/reviews

Get all reviews, optionally filtered by product or approval status.

Query Parameters:
  • product_id (string, optional)
  • variant_id (string, optional)
  • approved (boolean, optional)

Responses:

200 OK

{
  "reviews": [
    {
      "id": "rev_123",
      "product_id": "prod_123",
      "variant_id": "variant_456",
      "rating": 5,
      "comment": "Great!",
      "name": "Ali",
      "approved": false,
      "created_at": "2025-06-16T10:00:00.000Z"
    }
  ],
  "count": 1
}

500 Internal Server Error

{
  "message": "An error occurred while fetching reviews"
}

POST /admin/reviews

Manually create a review (usually for admin input/testing).

Request Body:
{
  "product_id": "prod_123",
  "variant_id": "variant_123",
  "rating": 5,
  "comment": "Admin feedback",
  "name": "Admin"
}

Responses:

200 OK

{
  "review": {
    "id": "rev_789",
    "product_id": "prod_123",
    "rating": 5,
    "comment": "Admin feedback",
    "name": "Admin",
    "approved": false,
    "created_at": "2025-06-16T14:00:00.000Z"
  }
}

500 Internal Server Error

{
  "message": "An error occurred while creating the review"
}

POST /admin/reviews/approve

Approve a pending review by ID.

Request Body:
{
  "review_id": "rev_789"
}

Responses:

200 OK

{
  "message": "Review approved"
}

404 Not Found

{
  "message": "Review not found"
}

500 Internal Server Error

{
  "message": "An error occurred while approving the review"
}

Configuration

You can configure the plugin options in medusa-config.js as needed.

Example configuration:

{
  resolve: "@decorotika/medusa-plugin-product-reviews",
  options: {
    // your options here
  }
}

Admin Panel Setup (Medusa Admin)

To add the review approval UI into your Medusa Admin panel:

1. Create a new file in your Admin panel:

medusa-admin/src/extensions/medusa-plugin-product-reviews.ts

import routes from "@decorotika/medusa-plugin-product-reviews/admin";

export default routes;

2. Update your Admin panel’s extensions index:

medusa-admin/src/extensions/index.ts

import productReviewRoutes from "./medusa-plugin-product-reviews";

const extensions = [...productReviewRoutes];

export default extensions;

3. Restart your Admin Panel to see the new /a/product-reviews page.

License

MIT License. See LICENSE for more details.


💡 Bonus Tip:
Install the plugin via yarn or npm:

yarn add @decorotika/medusa-plugin-product-reviews

And configure the backend part in medusa-config.js as shown above.


If you need any further help or have questions, feel free to ask! 🚀