Skip to content

Commit

Permalink
Merge pull request #21 from commercetools/kinghin.leung/rename-produc…
Browse files Browse the repository at this point in the history
…t-ingestion

Rename product ingestion to product export
  • Loading branch information
leungkinghin-ct authored Mar 11, 2024
2 parents 80e982b + db9151e commit 9842507
Show file tree
Hide file tree
Showing 30 changed files with 18 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Execute integration test
run: npm run test:ci

build-full-ingestion:
name: Build the application for full-ingestion
build-full-export:
name: Build the application for full-export
runs-on: ubuntu-latest
env:
CTP_CLIENT_ID: ${{ secrets.CTP_CLIENT_ID }}
Expand All @@ -47,7 +47,7 @@ jobs:
SEARCH_PLATFORM_CONFIG: ${{ secrets.SEARCH_PLATFORM_CONFIG }}
defaults:
run:
working-directory: full-ingestion
working-directory: full-export
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# connect-product-ingestion-template
This repository provides a [connect](https://docs.commercetools.com/connect) template for a product ingestion connector for populating a external systems with product data from composable commerce. This boilerplate code acts as a starting point for such integration.
# connect-product-export-template
This repository provides a [connect](https://docs.commercetools.com/connect) template for a product export connector for populating a external systems with product data from composable commerce. This boilerplate code acts as a starting point for such integration.

This template uses the [Product type](https://docs.commercetools.com/api/projects/productTypes), [Product](https://docs.commercetools.com/api/projects/products), [Store](https://docs.commercetools.com/api/projects/stores), [Product Selection](https://docs.commercetools.com/api/projects/product-selections) data models from commercetools composable commerce which can be used for querying Store-specific product data to sync into external systems. Template is based on asynchronous [Subscriptions](https://docs.commercetools.com/api/projects/subscriptions) to keep the external systems up to date.

Expand All @@ -24,11 +24,11 @@ Users are expected to create api clients/ keys in external system . Those detail

## Getting started
The template contains two separated modules :
- Full Ingestion : Provides a REST-API to users to export all products from specific store of a commercetools project to external system as initial load or for full reindexing whenever needed.
- Full Export : Provides a REST-API to users to export all products from specific store of a commercetools project to external system as initial load or for full reindexing whenever needed.
- Incremental Updater : Receives message from commercetools project once there are product changes in commercetools store. The modified products are then synchronized to the external system.

Regarding the development of both modules, please refer to the following documetations:
- Development of Full Ingestion
- Development of Full Export
- Development of Incremental Updater

#### 1. Develop your specific needs
Expand All @@ -44,7 +44,7 @@ Follow guidelines [here](https://docs.commercetools.com/connect/getting-started)
In order to deploy your customized connector application on commercetools Connect, it needs to be published. For details, please refer to [documentation about commercetools Connect](https://docs.commercetools.com/connect/concepts)
In addition, in order to support connect, the search connector template has a folder structure as listed below
```
├── full-ingestion
├── full-export
│ ├── src
│ ├── test
│ └── package.json
Expand All @@ -55,10 +55,10 @@ In addition, in order to support connect, the search connector template has a fo
└── connect.yaml
```

Connect deployment configuration is specified in `connect.yaml` which is required information needed for publishing of the application. Following is the deployment configuration used by full ingestion and incremental updater modules
Connect deployment configuration is specified in `connect.yaml` which is required information needed for publishing of the application. Following is the deployment configuration used by full export and incremental updater modules
```
deployAs:
- name: full-ingestion
- name: full-export
applicationType: service
endpoint: /fullSync
scripts:
Expand Down Expand Up @@ -126,4 +126,4 @@ Here you can see the details about various variables in configuration

## Recommendations
#### Implement your own test cases
We have provided simple integration test cases with [Jest](https://jestjs.io/) and [supertest](https://github.com/ladjs/supertest#readme). The implementation is under `test` folder in both `full-ingestion` and `incremental-updater` modules. It is recommended to implement further test cases based on your own needs to test your development.
We have provided simple integration test cases with [Jest](https://jestjs.io/) and [supertest](https://github.com/ladjs/supertest#readme). The implementation is under `test` folder in both `full-export` and `incremental-updater` modules. It is recommended to implement further test cases based on your own needs to test your development.
2 changes: 1 addition & 1 deletion connect.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
deployAs:
- name: full-ingestion
- name: full-export
applicationType: service
endpoint: /fullSync
scripts:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions full-ingestion/README.md → full-export/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Full Ingestion
# Full Export
This module provides a REST-API hosted on commercetools-provided infrastructure. Once the API is triggered, it exports all products under the specific store of the commercetools project, and then import to the external search index.

## Get started
#### Install your search-specific SDK
Assuming you have already published your developed SDK as a package to the npm registry, please run following npm command under full-ingestion folder to install the package.
Assuming you have already published your developed SDK as a package to the npm registry, please run following npm command under full-export folder to install the package.
```
$ npm install <your-search-index-sdk>
```
Expand Down
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions full-ingestion/package.json → full-export/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"name": "full-ingestion",
"name": "full-export",
"version": "1.0.0",
"type": "module",
"main": "src/index.js",
"private": true,
"scripts": {
"start": "node src/index.js",
"start:dev": "node_modules/.bin/nodemon -q src/index.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion incremental-updater/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Since search index in external platform is supposed to be store-specific, each d
For details how to set environment variables for search connector in non-local environment, please refer to [Deployment Configuration](../README.md#Deployment Configuration).
## Get started
#### Change the key of commercetools Subscription
Please specify your desired key for creation of commercetools Subscription [here](https://github.com/commercetools/connect-search-ingestion-template/blob/c4f1a3e04988a4a44842d3e1607638c96983ef29/incremental-updater/src/connectors/actions.js#L1).
Please specify your desired key for creation of commercetools Subscription [here](https://github.com/commercetools/connect-product-export-template/blob/c4f1a3e04988a4a44842d3e1607638c96983ef29/incremental-updater/src/connectors/actions.js#L1).
#### Install your search-specific SDK
Assuming you have already published your developed SDK as a package to the npm registry, please run following npm command under incremental-updater folder to install the package.
```
Expand Down

0 comments on commit 9842507

Please sign in to comment.