Shopify Upsell & Bundle Engine (NestJS)
I'm building an Upsell and Bundle engine for Shopify stores, designed to help merchants lift average order value without adding friction to checkout. The project applies backend engineering practices I'd previously used building NestJS middlewares for a Chrome extension and enterprise third-party integrations, applied here to a Shopify-specific problem: rules that need to stay fast and correct under real traffic, not just in a demo.
The architecture splits the storefront-facing admin (React Router, App Bridge, Polaris) from a standalone NestJS backend that owns the rules engine, data model, and Shopify API integration. That separation lets each side be built, tested, and scaled independently.
Key features:
- Six configurable upsell rule types: spend-based thresholds, direct product upsells, true bundles with custom pricing, tag/segment targeting, returning-customer offers, and countdown-driven urgency offers
- Modular rule architecture: each rule type is a self-contained NestJS module, so rules can be extended or adjusted without affecting others
- Structured data layer: TypeORM entities backed by PostgreSQL enforce a consistent shape for rules, shop settings, and drawer configuration across the app
- Redis-backed sessions and caching: keeps rule evaluation fast under load, which matters most during high-traffic sales
- Shopify-native integration: OAuth and session handling via
@nestjs-shopify, webhook processing, and GraphQL calls to Shopify's Admin API, kept isolated from core business logic so platform changes don't ripple into the rules engine - Cart drawer rendering built around Shopify's Ajax Cart API for real-time sync as offers apply
Still in active development, with a focus on making the rules engine reliable enough to trust at scale before expanding the feature set.
The full stack,
explained.
Building a Shopify Upsell Engine to improve AOV