Skip to content

Commit 66fcf09

Browse files
authored
Merge pull request #144 from gadget-inc/devaoc/new-tagger
Product tagger rewrite
2 parents f203961 + e12936c commit 66fcf09

File tree

88 files changed

+6403
-2526
lines changed

Some content is hidden

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

88 files changed

+6403
-2526
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Product Tagger Deployment
33
on:
44
push:
55
paths:
6-
- "shopify/product-tagger-template/**"
6+
- "shopify/product-tagger-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-tagger-template --env=development --force --allow-unknown-directory
19-
working-directory: shopify/product-tagger-template/
18+
run: npx ggt push --app=product-tagger-public-remix-ssr --env=development --force --allow-unknown-directory
19+
working-directory: shopify/product-tagger-public-remix-ssr/
2020
env:
21-
GGT_TOKEN: ${{ secrets.PRODUCT_TAGGER_DEPLOY_TOKEN }}
21+
GGT_TOKEN: ${{ secrets.PRODUCT_TAGGER_PUBLIC_REMIX_SSR_TOKEN }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Product Tagger
2+
3+
A Shopify app built with Gadget that helps merchants efficiently manage and organize their product tags. This application provides an intuitive interface for controlling which tags can be applied to products, streamlining the tagging process and maintaining consistency across your product catalog.
4+
5+
[![Fork template](https://img.shields.io/badge/Fork%20template-%233A0CFF?style=for-the-badge)](https://app.gadget.dev/auth/fork?domain=product-tagger-public-remix-ssr.gadget.app)
6+
7+
## Features
8+
9+
- **Tag Management**: Create and manage a curated list of allowed product tags
10+
- **Shopify Integration**: Seamlessly integrates with Shopify's API for real-time product data
11+
- **User-Friendly Interface**: Built with Remix for a modern, responsive frontend experience
12+
- **Organization Tools**: Help merchants maintain consistent and organized product categorization
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.gadget/
2+
node_modules/
3+
**/.DS_Store
4+
.react-router/
5+
6+
# Shopify
7+
extensions/**/dist
8+
extensions/**/node_modules
9+
extensions/**/generated
10+
shopify.app.*.toml
11+
.env.*
Lines changed: 32 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,62 @@
11
{
22
"version": "v1",
3-
"setup": "Setup.md",
4-
"introduction": "Intro.md",
3+
"webflow": {
4+
"title": "Automated Product Tagger",
5+
"description": "Automate tagging products within a Shopify store inventory. This app tracks keywords within product descriptions and creates a tag for each keyword found.",
6+
"content": "webflow/content.md",
7+
"mainImage": "webflow/tagger.png",
8+
"wistiaId": "udboa27dyt",
9+
"features": {
10+
"shopify": true,
11+
"frontend": true,
12+
"models": true,
13+
"actions": true
14+
}
15+
},
516
"featuredModels": {
617
"allowedTag": {
718
"description": "Stores the tag keyword and the shop it is associated with.",
8-
"featuredFields": [
9-
"keyword",
10-
"shop"
11-
]
19+
"featuredFields": ["keyword", "shop"]
1220
},
1321
"shopifyProduct": {
1422
"description": "Synchronizes and stores product data from connected Shopify stores.",
15-
"featuredFields": [
16-
"title",
17-
"body",
18-
"tags"
19-
]
20-
},
21-
"shopifyShop": {
22-
"description": "Keeps track of Shopify shops that your app has been installed on.",
23-
"featuredFields": [
24-
"name",
25-
"syncs",
26-
"shopOwner"
27-
]
23+
"featuredFields": ["body", "tags"]
2824
}
2925
},
3026
"featuredActions": {
3127
"shopifyProduct": {
3228
"create": {
33-
"description": "Reacts to Shopify's product/create events and copies the product data in your database, and then calls `applyTags()` defined in `shopifyProduct/utils.js`",
34-
"tags": [
35-
"edited"
36-
]
29+
"description": "Reacts to Shopify's product/create events and copies the product data in your database, and then calls `applyTags` defined in `shopifyProduct/utils.js` (if the product description has changed).",
30+
"tags": ["edited"]
3731
},
3832
"update": {
39-
"description": "Reacts to Shopify's product/update events and copies the product data in your database, and then calls `applyTags()` defined in `shopifyProduct/utils.js`",
40-
"tags": [
41-
"edited"
42-
]
43-
},
44-
"utils.js": {
45-
"description": "Matches incoming product descriptions against keywords stored in the `allowedTag` model, and then updates the products in Shopify with any matching tags.",
46-
"tags": [
47-
"added"
48-
]
33+
"description": "Reacts to Shopify's product/update events and copies the product data in your database, and then calls `applyTags` defined in `shopifyProduct/utils.js` (if the product description has changed).",
34+
"tags": ["edited"]
4935
}
5036
}
5137
},
38+
"featuredBackends": {
39+
"api/models/shopifyProduct/utils.ts": {
40+
"description": "Matches incoming product descriptions against keywords stored in the `allowedTag` model, and then updates the products in Shopify with any matching tags.",
41+
"tags": ["added"]
42+
}
43+
},
5244
"featuredAccessControls": {
5345
"shopify-app-users": {
5446
"allowedTag": {
55-
"description": "This means you can add `allowedTags` from the authenticated admin view.",
56-
"featuredFilters": {
57-
"allowedTag/filters/tenancy.gelly": {
58-
"description": "has been added so that merchants are only able to read tags for their store."
59-
}
60-
}
47+
"description": "This means you can add `allowedTags` from the authenticated admin view."
6148
}
6249
}
6350
},
6451
"featuredFrontends": {
65-
"components/App.jsx": {
66-
"description": "Handles routing for the frontend pages.",
67-
"tags": [
68-
"edited"
69-
]
70-
},
71-
"routes/index.jsx": {
52+
"web/routes/_app._index.tsx": {
7253
"description": "Displays an embedded Shopify Admin UI that allows merchants to add or manage their keyword list.",
73-
"tags": [
74-
"edited"
75-
]
54+
"tags": ["edited"]
7655
}
7756
},
78-
"webflow": {
79-
"title": "Automated Product Tagger",
80-
"description": "Automate tagging products within a Shopify store inventory. This app tracks keywords within product descriptions and creates a tag for each keyword found.",
81-
"content": "webflow/content.md",
82-
"mainImage": "webflow/tagger.webp",
83-
"wistiaId": "udboa27dyt",
84-
"features": {
85-
"shopify": true,
86-
"frontend": true,
87-
"models": true,
88-
"actions": true
57+
"featuredGlobalActions": {
58+
"api/actions/writeToShopify.ts": {
59+
"description": "Is used to write to Shopify. In this particular application it writes tags on the product resource."
8960
}
9061
}
91-
}
62+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Product Tagger
2+
3+
Core Purpose: This app allows Shopify merchants to create and manage a curated list of "allowed tags" that can be applied to their products. Rather than letting merchants use any random tags, it provides a controlled tagging system where only pre-approved keywords can be used as product tags.
4+
5+
Key Functionality: Merchants can define a set of approved keywords through the `allowedTag` model (each tag must be unique per shop). The app syncs with their Shopify product catalog automatically, giving them visibility into their products within the app interface. The `writeToShopify` action is used to write tag data back to Shopify, applying the approved tags to products based on merchant selections and product description. The product tagging operation is performed automatically when the product description is changed.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Automatically tag new products as they're added to the Shopify inventory.
2+
- Easily manage and categorize products updated or added in bulk.
3+
- Structures unorganized product data uploaded to Shopify.
4+
- Tenancy enforced: App 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, data models, backend logic, and a keyword management frontend.
68.3 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
filter ($session: Session) on AllowedTag [
2+
where shopId == $session.shopId
3+
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
filter ($session: Session) on ShopifyGdprRequest [
2+
where shopId == $session.shopId
3+
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
filter ($session: Session) on ShopifyProduct [
2+
where shopId == $session.shopId
3+
]

0 commit comments

Comments
 (0)