{"id":20397122,"url":"https://github.com/elasticpath/epcc-composable-commerce-reference","last_synced_at":"2026-04-21T05:34:23.039Z","repository":{"id":80931129,"uuid":"294132085","full_name":"elasticpath/epcc-composable-commerce-reference","owner":"elasticpath","description":"Elastic Path Commerce Cloud Composable Commerce Reference","archived":false,"fork":false,"pushed_at":"2020-09-15T20:23:00.000Z","size":266,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-15T11:12:20.275Z","etag":null,"topics":["aws","composable-commerce","ecommerce","elastic-path-commerce-cloud","elasticsearch","saas","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elasticpath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-09T14:09:27.000Z","updated_at":"2024-08-01T09:30:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"81663c51-9f46-458e-b8ee-fa975a27c1f2","html_url":"https://github.com/elasticpath/epcc-composable-commerce-reference","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fepcc-composable-commerce-reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fepcc-composable-commerce-reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fepcc-composable-commerce-reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticpath%2Fepcc-composable-commerce-reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elasticpath","download_url":"https://codeload.github.com/elasticpath/epcc-composable-commerce-reference/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241945526,"owners_count":20046869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","composable-commerce","ecommerce","elastic-path-commerce-cloud","elasticsearch","saas","terraform"],"created_at":"2024-11-15T04:11:51.440Z","updated_at":"2026-04-21T05:34:18.015Z","avatar_url":"https://github.com/elasticpath.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://www.elasticpath.com/themes/custom/bootstrap_sass/logo.svg\" alt=\"\" width=\"400\" /\u003e\n\n# Composable Commerce Reference\n\n[![Stable Branch](https://img.shields.io/badge/stable%20branch-master-blue.svg)](https://github.com/elasticpath/epcc-composable-commerce-reference)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/elasticpath/epcc-react-pwa-reference-storefront/issues)\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n[![follow on Twitter](https://img.shields.io/twitter/follow/elasticpath?style=social\u0026logo=twitter)](https://twitter.com/intent/follow?screen_name=elasticpath)\n\n## Overview 🚀\nThe Elastic Path Commerce Cloud Composable Commerce Reference shows how to combine the business capabilities of Elastic Path Commerce Cloud with other services or packaged business components through a modular serverless application. The modules provided here for reference are:\n* an Elasticsearch integration for indexing and searching catalog data,\n* an API version resource showing the API's version and last deployment time.\n\nEach module *independently* contributes to the API and infrastructure, therefore the project structure shown here can easily serve as a blueprint for building and deploying modular serverless applications.\n\n![Composable Commerce API](.github/images/composable-commerce-api.png)\n\nThe Elasticsearch integration works as follows:\n1. Elastic Path Commerce Cloud is configured to send product change events to the new webhook endpoint `/webhooks/search/{resource}`.\n1. When a product change event is received, the serverless Lambda function `updateElasticsearchIndex` is called.\n1. The function creates the search document and updates the Elasticsearch search index accordingly by adding, updating, or deleting entries.\n\n💡 \u0026nbsp;Note that the `/searches` resource exposes the Elasticsearch APIs alongside the Elastic Path Commerce Cloud APIs.\n\n\n## Documentation 📖\n\n### API\nOnce deployed, this project will provide the following API:\n```\n/_version\n/{store_id}/searches/{resource_name}\n/{store_id}/webhooks/search/{resource_name}\n/{store_id}/oauth\n/{store_id}/products\n/{store_id}/orders\n/{store_id}/...\n```\n`{resource_name}` indicates a generic integration pattern. In this case only `products` are supported since the minimal implementation provided here only indexes product data. However, this can easily be extended to support other Elastic Path Commerce Cloud data such as categories, customers, orders etc.\n\n### Prerequisites\nBefore you begin, ensure that you have the following configured:\n- [Elastic Path Commerce Cloud account](https://dashboard.elasticpath.com/login)\n- [Amazon Web Services account](https://aws.amazon.com/)\n- [Elasticsearch](https://www.elastic.co/start) with basic authentication\n\n### Development Tools\nBuilding or extending the Composable Commerce Reference requires the following software:\n- [Git](https://git-scm.com/downloads)\n- [Node.js and npm](https://nodejs.org/en/download/)\n- [AWS Command Line Interface 2.0.26 or later](https://aws.amazon.com/cli/)\n- [Terraform 0.13.2 or later](https://www.terraform.io/downloads.html)\n\n### Building and Deploying\n```bash\n# Clone the Git repository\ngit clone https://github.com/elasticpath/epcc-composable-commerce-reference.git\n\n# Go into the cloned directory\ncd epcc-composable-commerce-reference\n\n# Install dependencies for all modules\nnpm install\n\n# Configure the parameters in the file src/config/config.json.\n# See section \"Configuration Parameter Descriptions\" below.\n\n# Build and deploy\nnpm run start\n```\n`npm run start` will build the project, deploy infrastructure such as API gateway and Lambda functions into AWS, and configure Elastic Path Commerce Cloud with the appropriate integration webhook URL. Terraform will ask you to confirm before creating or destroying any infrastructure: typing in `yes` will confirm.\n\n⚠️ \u0026nbsp;**NOTE:** Depending on your useage, charges may occur when deploying infrastructure in AWS.\n\n### Testing\nOnce everything is deployed and configured you can start the included integration test to ensure everything is working as expected:\n```bash\nnpm run integration-test\n```\n### Cleanup\nUse the following command to undeploy infrastructure and remove the configured integration webhook from Elastic Path Commerce Cloud:\n```bash\nnpm run undeploy\n```\n### Available Scripts\n`package.json` provides these scripts:\n```\nnpm run start\nnpm run build       \nnpm run deploy\nnpm run config\nnpm run integration-test\nnpm run undeploy\nnpm run clean\n```\n`npm run start` is equivalent to the command `npm run build \u0026\u0026 npm run deploy \u0026\u0026 npm run config`.\n\nLocal unit tests can be run via `npm test`. \n\n### API Endpoint\n```\nhttps://\u003capigw_id_etc\u003e.amazonaws.com/dev/\u003cepcc_store_id\u003e\n```\n\n## Configuration Parameter Descriptions ⚙️\n\nParameters that require configuration are in the `src/config/config.json` file:\n\n|Parameter| Importance|Type|Description|\n|--|--|--|--|\n|`epcc_store_id`| Required| String| The store ID of your Elastic Path Commerce Cloud store|\n|`epcc_client_id`| Required| String| A client ID for accessing your store|\n|`epcc_client_secret`| Required| String| The client secret for the client ID|\n|`elasticsearch_url`| Required | String | Elasticsearch endpoint that allows searching, configuration, and managing search documents|\n|`elasticsearch_auth`| Required | String | Elasticsearch basic authentication, e.g. `\"Basic dXNlcjpwYXNzdzByZA==\"`|\n|`api_version`| Required | String | API version, e.g. `\"1.0.0\"`|\n\n✅ \u0026nbsp;Basic authentication requires that user and password are Base64 encoded:\n```\necho -n user:passw0rd | base64\n```\n\n## Contributing\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n\n## Terms And Conditions\n- Any changes to this project must be reviewed and approved by the repository owner. For more information about contributing, see the [Contribution Guide](https://github.com/elasticpath/epcc-composable-commerce-reference/blob/master/.github/CONTRIBUTING.md).\n- For more information about the license, see [GPLv3 License](https://github.com/elasticpath/epcc-composable-commerce-reference/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticpath%2Fepcc-composable-commerce-reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felasticpath%2Fepcc-composable-commerce-reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticpath%2Fepcc-composable-commerce-reference/lists"}