Shopify Status Checker is a Node.js application that monitors the Shopify status page for changes, analyzes them with OpenAI, and posts updates to Slack.
This service performs the following operations:
- Scrapes the Shopify status page (shopifystatus.com)
- Cleans the HTML content
- Compares it with the previous version stored in an S3 bucket
- If changes are detected, uses OpenAI to analyze the content and generate a structured JSON report
- Posts a brief summary of Shopify's system health to a Slack channel
Before you begin, ensure you have Node.js and pnpm installed.
Install dependencies:
pnpm install
To run the application locally, use the following command:
pnpm run dev
pnpm run dev
: Runs the application in development mode.pnpm run build
: Builds the application for production.pnpm run start
: Start the application locally.
To configure the application, you need to set up environment variables. Create a .env
file from .env.template
in the root directory of the project with the following content:
# Environment
NODE_ENV=development
PAGE_TO_SCRAPE=https://www.shopifystatus.com
# OpenAI
OPENAI_API_KEY=your_openai_api_key
OPENAI_ORGANIZATION_ID=your_organization_id
OPENAI_PROJECT_ID=your_project_id
# AWS
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_S3_BUCKET=your_s3_bucket_name
# Slack
SLACK_APP_WEBHOOK_URL=your_slack_webhook_url
- The application fetches the HTML content from the Shopify status page
- It cleans the HTML to extract only the relevant information
- The cleaned content is compared with the previous version stored in S3
- If changes are detected:
- The new content is saved to S3, replacing the previous version
- The content is sent to OpenAI for analysis
- OpenAI returns a structured JSON with the system health status
- A formatted message is sent to Slack with the status information
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Commit your changes.
- Push to the branch.
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.