百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

product-reviews-sample-app

> 编程语言
开源

一个示例 Shopify 应用程序,用于为商店创建和存储产品评论,编写于 Node.js

378 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个示例 Shopify 应用程序,用于为商店创建和存储产品评论,编写于 Node.js

Product Reviews Sample App

:warning: WARNING The application in the repo uses a convention that is no longer the default approach to building a Node.js application on Shopify. Use this repo for the most up-to-date approach for structuring your Node.js Shopify application. This sample app was built as a reference to show how Shopify Developer tools can be used together to create a fully functional application. The example we chose to showcase is an application that facilitates review creation for products in a Shopify store.

The application is written in Node.js and is comprised of the following elements:

  • Embedded Node.js application: Displays an admin UI for managing (publishing and unpublishing) reviews.
  • Theme app extension: Enables review information to be displayed to an online store.
  • Post-purchase checkout extension: Prompts user to submit a review directly after making a purchase.

Refer to the architecture diagram below to see how the application's components and Shopify interact with each other.

…

Tutorials and Instructions

Instructions are provided to show how to setup and run the various components of this code repo. Click on each one to follow an in-depth tutorial.

  • Installing the embedded Node.js application
  • Extending the app with a Theme Extension
  • Add a Post-Purchase Checkout Extensions

Technical Details

To complement the tutorials above, we have documented additional information about how various parts of the application work.

  • Authentication
  • Data layer
  • Review creation
  • Product average rating calculation
  • Publishing / Unpublishing reviews

Limitations ❕

When using this code keep in mind:

  1. This is a sample application. It is not production-ready.
  2. Metafields are going to be a bigger part of the platform and will support building applications with more complex data structures.

APIs and Tools Used ️

GraphQL

Shopify APIs have previously been available through REST, but more recently the Admin API was made available through GraphQL. Unlike REST APIs, which use multiple endpoints to return large sets of data, GraphQL uses a single endpoint with fields that can be queried to specify the data you need. This generally improves the speed of your app because it’s not asking for data it doesn’t intend to use.

for more information on the GraphQL Admin API, check out our reference guide.

App Bridge

Shopify App Bridge lets you embed your app directly inside the Shopify Admin. It offers React component wrappers for some actions, and is directly integrated with Polaris components. It offers a consistent experience for merchants, whether it’s on the web or in the Shopify Mobile app for iOS or Android.

for more information on App Bridge, check out our reference guide.

Metafields

Metafields represent custom metadata attached to a resource (for example, a shop or a product). Metafields can be sorted into namespaces and are composed of keys, values, and value types. They can be used as a data layer to create and store a small amount of information relating to Shopify resources.

for more information on Metafields, check out our guide.

Theme App Extensions

Theme app extensions let you extend themes via app blocks. App blocks are liquid files that contain code, a schema and static resource dependencies (CSS, JS). They can be added to existing theme sections or as full-width content on the page. App blocks can also be reordered, removed and configured by merchants directly from the theme editor. Theme app extensions do not modify a theme's code, are served by Shopify, and can be cleanly uninstalled without leaving ghost code behind.

for more information on Theme App Extensions, check out our guide.

Post-Purchase Checkout Extension

Post-purchase checkout extensions give developers and Plus merchants the ability to add post-purchase interactions directly into the Shopify checkout. A post-purchase page displays a customizable UI to a buyer after their order is confirmed, but before the thank you page.

for more information on Post-Purchase Checkout Extensions, check out our guide.

Contributing

For help on setting up the repository locally, building, testing and contributing please see CONTRIBUTING.md.

Code of conduct

All developers who wish to contribute through code or issues, please first read our Code of Conduct.

License

Copyright © 2022 Shopify. See LICENSE for further details.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言