A production-ready Shopify app for creating dynamic product bundles with tiered discounts and market-aware pricing. Works seamlessly with any theme and integrates with popular bundle and subscription apps. Built for easy client deployment and customization.
β
Easy client deployment β Configure environment variables, deploy to your hosting platform, and customize UI per client.
β
Market & geolocation pricing β Automatically shows correct prices and currencies for international customers.
β
Flexible discount modes β Percentage off, fixed price, amount off, or full price tiers.
(Add screenshots or demo video of your bundle widget and admin UI here)
- Multi-tier discounts β Configure unlimited quantity-based tiers with different pricing strategies
- 4 pricing modes β Percentage discount, fixed total price, fixed amount off, or full price
- Smart visibility β Show bundles on all products, specific products, collections, or exclude certain products
- Schedule bundles β Set start and end dates for promotional bundles
- Shopify Markets support β Automatic currency conversion and pricing for enabled markets
- Geolocation pricing β Detect customer location and show correct prices via Storefront API
- Multi-currency β Support for presentment currencies
- Compare-at pricing β Display savings with strike-through original prices
- Theme app extension β Works on any Online Store 2.0 theme; no theme modifications needed
- Real-time pricing β Updates based on customer location and market
- Customizable UI β Full control over styling to match client branding
- Advanced features:
- Countdown timer for urgency
- Low stock alerts
- Sticky add-to-cart button
- Progressive gift tiers
- Custom badges (Most Popular, Best Value)
- Subscription toggle (one-time vs subscription)
- Rust discount function β Lightning-fast discount calculation at checkout
- Automatic discounts β No coupon codes needed; discounts apply automatically
- Smart tier matching β Always applies the best available discount based on cart quantity
- Complete bundle CRUD operations with Polaris UI
- Visual tier configuration with live preview
- Product picker with search
- Collection-based targeting
- Feature toggles for all advanced options
Summary: Merchant configures bundles in the admin β database stores config and syncs Shopify discounts β Rust discount function applies the best tier at checkout β theme app extension shows bundle tiers on the storefront.
shopify-bundle-app/
βββ app/
β βββ routes/ # Remix routes
β β βββ app.bundles._index.tsx # Bundle list
β β βββ app.bundles.new.tsx # Create bundle
β β βββ app.bundles.$id.tsx # Edit bundle (full UI)
β β βββ apps.bundle-widget.tsx # App proxy (storefront API)
β βββ bundle.server.ts # Bundle CRUD operations
β βββ pricing.server.ts # Market/geolocation pricing
β βββ discounts.server.ts # Shopify discount sync
β βββ store-config.server.ts # Detect Markets/Geolocation
β βββ shopify.server.ts # Shopify API setup
βββ extensions/
β βββ bundle-widget/ # Theme app extension
β β βββ blocks/bundle-widget.liquid
β β βββ assets/bundle-widget.js
β β βββ assets/bundle-widget.css
β βββ discount-function/ # Rust discount function
β βββ src/cart_lines_discounts_generate_run.rs
βββ prisma/
β βββ schema.prisma # Database models
β βββ migrations/ # PostgreSQL migrations
βββ docs/
β βββ ARCHITECTURE.md # Detailed system design
β βββ GITHUB_SETUP.md # Repository setup guide
βββ README.md # This file
βββ .env.example # Environment variables template
βββ shopify.app.toml # Shopify app configuration
- Node.js >= 20.19 or >= 22.12
- PostgreSQL database
- Shopify Partner Account (Sign up)
- Development Store or Shopify Plus sandbox
- Shopify CLI (Install guide)
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your DATABASE_URL and Shopify credentials -
Run database migrations
npx prisma migrate deploy npx prisma generate
-
Link to your Shopify app
npm run config:link
-
Start development server
npm run dev
This will start the Remix server, create a tunnel, and open the app in your development store.
Full setup instructions: GITHUB_SETUP.md
- Merchant creates bundle in admin UI with products and tiered pricing
- Database stores bundle configuration
- Discount sync creates Shopify automatic discount with metafield config
- Storefront widget displays tiered pricing on product pages (fetches from app proxy)
- Checkout applies discount automatically via Rust function
No theme modifications required. Widget works via theme app extension.
| Your setup | What to do |
|---|---|
| Any Online Store 2.0 theme | Install theme app extension via Shopify admin |
| Markets enabled stores | Auto-detects and uses contextual pricing |
| Geolocation pricing | Auto-detects and uses Storefront API pricing |
| Bundle apps (Kaching, etc.) | Works alongside; can target same or different products |
| Subscription apps (Recharge, etc.) | Subscription toggle feature included in widget |
- Framework: Remix - Full-stack React framework
- Database: PostgreSQL with Prisma ORM
- UI: Shopify Polaris design system
- Discount Logic: Rust (Shopify Functions)
- API: Shopify Admin GraphQL & Storefront GraphQL
- Authentication: OAuth 2.0 (Shopify App Bridge)
git clone https://github.com/rsusano/shopify-bundle-app.git client-name-bundle-app
cd client-name-bundle-app- Widget styles: Edit
extensions/bundle-widget/assets/bundle-widget.css - Colors, fonts, spacing: Customize to match client brand
- JavaScript: Edit
extensions/bundle-widget/assets/bundle-widget.js - Liquid template: Edit
extensions/bundle-widget/blocks/bundle-widget.liquid
- Pricing rules: Extend
app/pricing.server.ts - Discount calculations: Modify
extensions/discount-function/src/cart_lines_discounts_generate_run.rs
# shopify.app.toml
application_url = "https://your-production-url.com"
[auth]
redirect_urls = [ "https://your-production-url.com/api/auth" ]DATABASE_URL=your_production_database_url
NODE_ENV=production# Build the app
npm run build
# Deploy to Shopify
npm run deploy- Cloudflare Workers - Serverless, global edge
- Fly.io - Docker-based, multi-region
- Railway - Simple deployment
- Heroku - Classic PaaS
GET /apps/bundle-widget
?bundle_id={id}
&product_id={id}
&country={code}
¤cy={code}Response:
{
"bundle": {
"name": "Summer Bundle",
"tiers": [
{
"minQuantity": 2,
"tierPrice": "19.98",
"savingsPercent": 10,
"currencyCode": "USD"
}
],
"pricingMode": "markets"
}
}- Create a bundle with multiple tiers
- Add bundle products to cart
- Verify discount applies at checkout
- Test with different quantities
- Check Markets pricing (if enabled)
- Test visibility rules (specific/except/collections)
- Verify widget renders on product page
- Test start/end date scheduling
- Confirm countdown timer works (if enabled)
- Test subscription toggle (if enabled)
| Issue | Solution |
|---|---|
| Database connection error | Verify DATABASE_URL in .env and PostgreSQL is running |
| Widget not showing | Check bundle status is "active" and visibility rules match product |
| Discount not applying | Ensure bundle has shopifyDiscountId (activate in admin UI) |
| Markets pricing not working | Confirm store has Markets enabled in Shopify admin |
| Compilation errors | Run npm install and npx prisma generate |
More troubleshooting: ARCHITECTURE.md
- Architecture - System design and data flow
- GitHub Setup - Repository deployment guide
- Shopify App Docs - Official Shopify documentation
Current Version: 1.0.0
Backend: ~85-90% complete
Production Ready: Yes
- Core bundle CRUD operations
- Multi-tier discount system (all 4 pricing modes)
- Markets & geolocation pricing
- Storefront widget with theme extension
- Discount function in Rust
- Admin UI with full bundle management
- Visibility rules (all/specific/collections/exclusions)
- Feature toggles
- Schedule bundles with start/end dates
- Analytics dashboard
- Bulk bundle import/export
- A/B testing for tiers
- Advanced upsell recommendations
MIT License - Free for personal and commercial use. See LICENSE.
- Documentation: See
docs/folder - Issues: Open an issue on GitHub
- Contact: rsusano123s@gmail.com
Built for Shopify merchants | Production Ready | Fully Customizable
β Star this repo if you find it helpful for your client projects.
