This project contains an AWS CDK stack that deploys a serverless e-commerce backend powered by Shopify and Elastic Path. It sets up an API Gateway with Lambda functions for product management, order management, and cart management.
graph TD
A[API Gateway] --> B[Product Management Lambda]
A --> C[Order Management Lambda]
A --> D[Cart Management Lambda]
B --> E[Shopify API]
C --> E
D --> F[Elastic Path API]
- Node.js (v14.x or later)
- AWS CLI configured with appropriate credentials
- AWS CDK CLI installed (
npm install -g aws-cdk) - Shopify account with API access
- Elastic Path account with API access
Before deploying, make sure to set the following environment variables:
SHOPIFY_SHOP_DOMAIN: Your Shopify shop domainSHOPIFY_ACCESS_TOKEN: Your Shopify API access tokenSHOPIFY_API_VERSION: Shopify API version to useELASTIC_PATH_API_BASE_URL: Elastic Path API base URLELASTIC_PATH_CLIENT_ID: Elastic Path client IDELASTIC_PATH_CLIENT_SECRET: Elastic Path client secret
- Clone the repository:
git clone <repository-url>
cd shopify-powered-stack- Install dependencies:
npm install- Build the project:
npm run build- Deploy the stack:
cdk deployAfter successful deployment, the CDK will output the API Gateway URL, which you can use to access your e-commerce backend.
/product-management/*: Product management operations (Shopify)/order-management/*: Order management operations (Shopify)/cart-management/*: Cart management operations (Elastic Path)
To run the unit tests:
npm testTo remove the stack from your AWS account:
cdk destroyPlease read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.