Skip to content

Commit 0451bbb

Browse files
authored
Merge pull request #146 from gadget-inc/devaoc/new-reviews
Reviews template rewrite
2 parents 6b32e87 + c81fbba commit 0451bbb

File tree

130 files changed

+7759
-5910
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+7759
-5910
lines changed

.github/workflows/product-reviews-template.yaml renamed to .github/workflows/product-reviews-public-remix-ssr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Product Reviews Deployment
33
on:
44
push:
55
paths:
6-
- "product-reviews-template/**"
6+
- "shopify/product-reviews-public-remix-ssr/**"
77
branches:
88
- main
99
workflow_dispatch:
@@ -15,7 +15,7 @@ jobs:
1515
- name: Checkout the current repository
1616
uses: actions/checkout@v4
1717
- name: Push to development environment
18-
run: npx ggt push --app=product-reviews-template --env=development --force --allow-unknown-directory
19-
working-directory: product-reviews-template/
18+
run: npx ggt push --app=product-reviews-public-remix-ssr --env=development --force --allow-unknown-directory
19+
working-directory: shopify/product-reviews-public-remix-ssr/
2020
env:
21-
GGT_TOKEN: ${{ secrets.PRODUCT_REVIEWS_DEPLOY_TOKEN }}
21+
GGT_TOKEN: ${{ secrets.PRODUCT_REVIEWS_PUBLIC_REMIX_SSR_DEPLOY_TOKEN }}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
.gadget/
22
node_modules/
33
**/.DS_Store
4+
.react-router/
45

56
# Shopify
67
extensions/**/dist
78
extensions/**/node_modules
89
extensions/**/generated
10+
shopify.app.*.toml
11+
.env.*
12+
.shopify
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"version": "v1",
3+
"webflow": {
4+
"title": "Product Reviews",
5+
"description": "A comprehensive product review system for Shopify stores. Automatically requests reviews from customers, manages review data, and displays reviews on product pages through a theme extension.",
6+
"setup": "./setup.md",
7+
"content": "webflow/content.md",
8+
"mainImage": "webflow/reviews.png",
9+
"features": {
10+
"shopify": true,
11+
"frontend": true,
12+
"models": true,
13+
"actions": true
14+
}
15+
},
16+
"featuredModels": {
17+
"review": {
18+
"description": "Stores customer reviews with ratings, content, and approval status. Connected to Shopify customers, orders, and products.",
19+
"featuredFields": [
20+
"rating",
21+
"content",
22+
"approved",
23+
"customer",
24+
"product",
25+
"order"
26+
]
27+
},
28+
"shopifyOrder": {
29+
"description": "Synchronizes order data from Shopify and tracks review request timing and limits.",
30+
"featuredFields": [
31+
"requestReviewAfter",
32+
"reviewCreationLimit",
33+
"reviewCreationLimitReached",
34+
"reviews"
35+
]
36+
},
37+
"shopifyProduct": {
38+
"description": "Synchronizes product data from Shopify and stores review metadata in Shopify metafields.",
39+
"featuredFields": ["reviewsMetafield", "reviews", "title"]
40+
}
41+
},
42+
"featuredActions": {
43+
"review": {
44+
"create": {
45+
"description": "Creates new customer reviews and updates the associated product's review metafield in Shopify.",
46+
"tags": ["edited"]
47+
},
48+
"update": {
49+
"description": "Updates existing reviews and syncs changes back to Shopify metafields when approval status changes.",
50+
"tags": ["edited"]
51+
}
52+
},
53+
"shopifyShop": {
54+
"install": {
55+
"description": "This action creates a review metaobject definition and a corresponding metafield definition in Shopify, and then triggers a data sync for the new shop.",
56+
"tags": ["edited"]
57+
}
58+
}
59+
},
60+
"featuredGlobalActions": {
61+
"createReviewMetaobject": {
62+
"description": "This global action is responsible for creating a review metaobject in Shopify for a given shop.",
63+
"tags": ["added"]
64+
},
65+
"createReviewsMetafield": {
66+
"description": "Creates the review summary metafield in Shopify.",
67+
"tags": ["added"]
68+
},
69+
"enqueueEmails": {
70+
"description": "This global action adds email-sending jobs to a background queue to be processed asynchronously.",
71+
"tags": ["added"]
72+
},
73+
"fetchOrderData": {
74+
"description": "This global action fetches an order and its associated products using a unique, single-use code provided as a parameter.",
75+
"tags": ["added"]
76+
},
77+
"sendEmail": {
78+
"description": "This global action sends a review request email to a customer and then clears the requestReviewAfter field on the corresponding order to prevent re-sending the email",
79+
"tags": ["added"]
80+
},
81+
"sendReviewRequests": {
82+
"description": "Scheduled global action that automatically sends review request emails to customers based on order fulfillment and timing rules.",
83+
"tags": ["added"]
84+
},
85+
"updateReviewsMetafield": {
86+
"description": "Updates the review summary metafield in Shopify products with aggregated review data.",
87+
"tags": ["added"]
88+
}
89+
},
90+
"featuredAccessControls": {
91+
"shopify-app-users": {
92+
"review": {
93+
"description": "Merchants can update and manage reviews through the admin interface, including approving or rejecting reviews."
94+
}
95+
},
96+
"unauthenticated": {
97+
"review": {
98+
"description": "Allows public creation of reviews through the storefront theme extension using unique review codes."
99+
},
100+
"fetchOrderData": {
101+
"description": "Enables customers to fetch order data for review creation without authentication."
102+
}
103+
}
104+
},
105+
"featuredFrontends": {
106+
"web/routes/_app._index": {
107+
"description": "Displays an embedded Shopify Admin UI for merchants to view and manage customer reviews and approval workflow.",
108+
"tags": ["edited"]
109+
},
110+
"web/routes/_public.review": {
111+
"description": "Public review submission page accessible via unique codes sent to customers, allowing them to leave reviews without authentication.",
112+
"tags": ["added"]
113+
},
114+
"extensions/product-reviews/blocks/productReviews.liquid": {
115+
"description": "Shopify theme extension that displays customer reviews and ratings directly on product pages in the storefront.",
116+
"tags": ["added"]
117+
}
118+
},
119+
"featuredFiles": {
120+
"api/utils/emailQueueOptions.ts": {
121+
"description": "This file exports configuration options for a message queue, including a dynamically generated queue name using a UUID, a maximum concurrency of 50, and a retry limit of 1.",
122+
"tags": ["added"]
123+
},
124+
"api/utils/renderEmail.tsx": {
125+
"description": "This file exports a function that uses the react-email library to generate the HTML for a review request email, including a link with a unique code for the user to submit their review.",
126+
"tags": ["added"]
127+
}
128+
}
129+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Product Reviews
2+
3+
Core Purpose: This app enables Shopify merchants to collect, manage, and display customer reviews for their products. It provides an automated review collection system that requests feedback from customers after purchase, along with a comprehensive admin interface for review moderation and a storefront display system.
4+
5+
Key Functionality: The app automatically sends review request emails to customers based on configurable timing after order fulfillment. Customers can submit reviews through a secure, code-based system that doesn't require account creation. Merchants can approve or reject reviews through the admin interface, and approved reviews are displayed on product pages via a theme extension. The system syncs review data with Shopify using metafields, maintaining review summaries and ratings directly in the merchant's product catalog for seamless integration with their storefront.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Setting up your wishlist app
2+
3+
1. [Connect to Shopify](https://docs.gadget.dev/guides/tutorials/connecting-to-shopify#connecting-to-shopify) using our built-in Shopify plugin.
4+
5+
2. Make sure that you have the [Shopify CLI](https://shopify.dev/docs/api/shopify-cli#installation) installed locally or run the Shopify CLI from the Gadget terminal using `shopify app dev`.
6+
7+
3. Create a shopify app proxy that has proxy URL matching `https://<application-slug>--<env-slug>.gadget.app/proxy`. Note the subpath used in the theme app extension's JS file. For more information on Shopify app proxies, read the [Shopify docs](https://shopify.dev/docs/apps/build/online-store/display-dynamic-data)
8+
9+
4. Embed your theme app extension on the product page of your devalopment store.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Automatically request reviews from customers after order fulfillment based on configurable timing.
2+
- Easily manage and moderate customer reviews through an integrated admin interface.
3+
- Structures customer feedback data and syncs it with Shopify product metafields.
4+
- Tenancy enforced: Review data will be unique to the store it is installed on.
5+
- Ready-to-Use: No need to start from scratch – equipped with a Shopify connection, review models, automated email system, theme extension, and customer review management frontend.
67.7 KB
Loading

0 commit comments

Comments
 (0)