Hearst Marketplaces

Faststore Builder

The FastStore Builder is a monorepo application designed to manage multiple FastStore instances for different magazines or stores within our organization.

Development Workflow | Bash script and automations

image

Hearst Faststore Builder – Development & CI/CD Process

Explanation of the development workflow, local file synchronization, and the automated CI/CD processes powered by GitHub Actions in the hearst-faststore-builder monorepo.

1. Local Development Workflow

1.1. Running the Development Environment

To start local development, run: yarn dev

What Happens?

    • yarn dev triggers the copy-files script, which runs copy_files.sh.
    • This shell script (and related watcher scripts) monitors for file changes in the configs and store directories.
    • The configs folder is structured to organize environment-specific configuration files for each store. The typical structure looks like this:
      configs/
        store1/
          dev/
            ...config files...
          qa/
            ...config files...
          prod/
            ...config files...
        store2/
          dev/
            ...config files...
          qa/
            ...config files...
          prod/
            ...config files...
      ...
    • When a file changes, the watcher script:
    • Copies the updated file into the correct location in the target store directory.
    • Detects the changed file.
    • If certain files (like yalc.lock) change, it can automatically restart the development server.
    • This ensures your local application always reflects the latest configuration and source changes, providing a seamless development experience.

Scripts Involved

    • watch_changed_files.sh (macOS/Linux) and watch_changed_files_win.sh (Windows): These scripts handle the logic for detecting changed files and copying them to the appropriate destination.
    • copy_files.sh: Orchestrates the file watching and synchronization process.

2. Build Process

2.1. Building Store Packages

To build all store packages for a specific environment (e.g., dev, qa, prod): ./build.sh [env] This script:
    • Creates a .build directory.
    • For each store in configs, it copies the base store code from store and overlays the environment-specific configuration.
    • The result is a set of ready-to-deploy store directories for each environment.

3. GitHub Actions Automation

The repository uses several GitHub Actions workflows to automate testing, building, deployment, and integrations with Jira and Slack.

3.1. build-and-deploy.yml

Trigger: On pull requests to main, dev, or qa. Steps:
    • Copies the relevant store configuration into store.
    • For each store:
        • Clones the corresponding target repository.
        • Creates a new branch, syncs the latest build, and pushes changes.
        • Opens or updates a pull request in the target repo.
        • Uploads a list of created PR URLs to S3.
        • Comments on the original PR with links to all created PRs.
        • Downloads the list of related PR URLs from S3.
        • If the main PR was closed (not merged), closes the related PRs.

3.3. jira-automation.yml

Trigger: On PR open or close events. Steps:
    • Extracts the Jira issue key from the branch name or PR title.
    • Transitions the Jira issue to the appropriate status based on the PR action and target branch:
        • dev → Review
        • qa → UAT
        • main → Done
    • Adds comments to the Jira issue with PR details.
    • Sends a Slack notification when a PR is merged to main, including PR and Jira links.

3.4. auto-update-branches.yml

Trigger: On push to main. Steps:
    • Automatically merges changes from main into qa and dev branches, keeping all environments in sync.

Summary

    • Local development is streamlined with file watchers and automatic server restarts.
    • Builds are environment-specific and automated.
GitHub Actions handle:
    • Multi-repo PR creation and merging
    • Jira ticket transitions and Slack notifications
    • CI (build, lint, test)
    • Branch synchronization

Description

Contributions to Hearst Marketplace

During my time working on Hearst Marketplace, I contributed to the development and launch of multiple e-commerce storefronts, optimizing performance, development workflows, and customer experience across the board.

Development Workflow & Automation

  • Created a monorepository architecture to manage and maintain multiple storefronts from a single codebase.

  • Implemented GitHub Actions for automated pull requests, cross-repository merges, deployment tracking, Slack notifications, and Jira board automation, saving ~40% development time per feature.

Performance Monitoring & Observability

  • Developed a synthetic monitoring system with New Relic to track the critical customer journey from homepage to checkout.

  • Set up precise alerting mechanisms for any interruption in key paths to ensure fast incident response.

 Sephora Beauty Insider Integration

  • Led backend integration for Sephora’s Beauty Insider program, enabling users to sign in, link loyalty accounts, and redeem member-specific discounts via a secure third-party API.

VTEX FastStore Storefront Launches

  • Successfully led the launch of 6 storefronts using VTEX FastStore, in 18 months ensuring performance, pixel-perfect UI, and consistent feature sets.

UI & Experience Enhancements

Contributed and led the development of multiple customer-facing features:

  • Product Recommendation modules

  • Editorial Reviews

  • Responsive Image Gallery (Web & Mobile)

  • Zip Code auto-detection for shipping estimates

  • Image auto-rotation and interaction on PDP/PLP/carousels

  • SKU-based badging on PLP

  • Wishlist functionality

  • Final Sale messaging and logic

  • Sponsored Product (Criteo) integration for PLP and Search

Analytics & Membership Systems

  • Optimized GTM and Google Analytics implementation

  • Built custom server-side analytics integration

  • Integrated Chargebee for managing memberships and billing workflows


Tech Stack

  • Frontend: Next.js, TypeScript, VTEX FastStore

  • Backend: Node.js, Python

  • Cloud & Infra: AWS (Lambda, CloudWatch, S3, etc.), New Relic

  • DevOps & Tooling: GitHub, GitHub Actions, Jira

  • Monitoring: Synthetic Monitoring (New Relic), Custom Alerting

  • Third-party Integrations: Criteo, Chargebee, Sephora APIs