How to Build an E-Commerce Platform Like Shopify: The Architecture Guide
- Ashit VoraBuild & ShipLast updated on

To build an e-commerce platform like Shopify, you need: multi-tenant merchant architecture, a storefront builder (templated or drag-and-drop), product catalog management, order management, payment processing via Stripe Connect, and an app marketplace. An MVP takes 20-30 weeks and costs $150K-$350K. Multi-tenancy, the storefront theme system, and split payment architecture are the most complex engineering problems. Build a stable API first. Open it to third-party developers only after the platform is stable.
Key Takeaways
Multi-tenancy is the foundational architecture decision. Each merchant needs isolated data while sharing infrastructure. Row-level isolation is simplest and sufficient for most vertical platforms.
The storefront builder is the most visible differentiator and one of the most complex pieces to build. Start with 3-5 templated themes. Add a drag-and-drop builder in v2.
Payments are more complex than a standard checkout. Platform fee collection, merchant payout scheduling, refund and chargeback handling, and tax calculation all need careful design with Stripe Connect.
Define your business model before building. The standard model for vertical e-commerce platforms is monthly subscription plus transaction fee. Shopify charges both.
The app marketplace is not a v1 feature. Build a stable API first. Then open it to third-party developers after the platform is proven.
Shopify built a $100 billion business by making e-commerce infrastructure available to any business that needed it. That did not happen because Shopify built everything -- it happened because they built a platform extensible enough for others to build the rest.
If you are building a vertical e-commerce platform -- for a specific product category, a specific business model (wholesale, subscription, rental), or a specific geography where Shopify's payment coverage or language support is insufficient -- the engineering is real and substantial.
This guide covers the architecture.
What you are actually building
A Shopify-equivalent is a SaaS platform for merchants. It is not a single e-commerce store. The layers:
The merchant portal is the admin interface where merchants manage their products, orders, customers, and settings.
The storefront layer is the customer-facing shop, either from a template the merchant configures or a custom build. This is what shoppers interact with.
The commerce engine handles the backend logic for inventory, pricing, discount rules, tax calculation, and checkout.
Payment infrastructure is the integration layer between merchants, payment processors, and your platform fee collection.
Analytics provide sales data, traffic, conversion rates, and customer insights for merchants.
This is more than one app. It is a suite of interconnected products.
Multi-tenancy: The foundational decision
The first architecture decision: how do you isolate merchant data?
Row-level isolation (most common): All merchants share the same database tables. Every row has a merchant_id column. All queries filter by merchant_id. Simple to build and operate, scales well with proper indexing.
Schema-level isolation: Each merchant has their own database schema within a shared database server. Higher isolation, easier to run per-merchant backups and migrations, but more complex to operate.
Database-level isolation: Each merchant gets their own database. Maximum isolation, simplest compliance story, but expensive to operate at scale.
For most platforms: row-level isolation. Implement database-level isolation only if you have enterprise compliance requirements (HIPAA, SOC2) that demand it.
The storefront layer
This is what differentiates your platform visually, but it is also one of the most complex pieces to build.
Templated storefronts: Pre-built theme options that merchants can configure (colors, fonts, logo, layout). Merchants cannot code; they configure. This is Shopify's original model and covers 80% of merchant needs. Requires a theme template system (Liquid-style templating or React-based with configuration injection).
Drag-and-drop builder: Visual storefront builder where merchants rearrange blocks. Much higher development cost (you are building a visual editor), but more self-service. Webflow-style block editors are the modern reference point.
Headless commerce: Your platform provides APIs; merchants bring their own front-end. B2B and enterprise merchants prefer this. Requires clean, comprehensive APIs and good documentation.
For v1: templated storefronts with 3-5 themes. Add drag-and-drop later.
The commerce engine
The business logic layer that makes the platform work:
Product catalog: Products, variants (size, color, material), inventory levels per variant, images, and pricing. Handle physical products, digital products, and services differently.
Inventory management: Track stock per variant, per location if the merchant has multiple warehouses. Reserve inventory at checkout; decrement on order fulfillment.
Pricing and discounts: Base price, sale price, percentage discounts, fixed amount discounts, and coupon codes. Discount stacking rules (can a customer use a coupon and a sale price together?) need explicit rules.
Tax calculation: The regulatory nightmare. Tax rates vary by product category, merchant location, and customer shipping address. For US merchants, integrate TaxJar or Avalara. For international, it gets more complex. Do not build tax calculation logic from scratch.
Checkout: The most important user flow. Shipping address, shipping method selection (with rates from your carrier integration), payment, and order confirmation. The checkout conversion rate is the primary metric that determines merchant success -- and their satisfaction with your platform.
Payment infrastructure
Stripe Connect is the standard architecture for platforms.
How it works:
- Merchant creates a Stripe Connect account during onboarding
- Your platform is the primary Stripe account
- Customer payments are captured through your platform
- Your platform fee is deducted automatically
- The remainder is transferred to the merchant's connected account on your payout schedule
Key implementation areas:
Onboarding KYC: Stripe requires merchants to submit identity and business information before they can receive payouts. Build a smooth onboarding flow for this.
Payout schedules: Daily, weekly, or monthly -- configurable. The merchant needs visibility into pending payouts.
Refund handling: When a customer returns an item, the refund comes from the merchant's connected account. You may need to refund your platform fee as well (business decision).
Chargeback management: Stripe handles chargeback disputes, but you need to notify the merchant and freeze funds during the dispute period.
Order management
After checkout, the order enters a lifecycle:
- Placed -- payment captured
- Processing -- merchant acknowledges and begins fulfillment
- Shipped -- tracking number added, customer notified
- Delivered -- tracking confirms delivery
- Completed -- closed, no follow-up needed
Returns and refunds require a separate flow. Merchants need: the order list view, order detail view, fulfillment controls, and refund initiation. Customers need: order confirmation email, shipping notification with tracking, and order history in their account.
Integrations your merchants need
No e-commerce platform works in isolation. Required integrations for day one:
Shipping carriers (UPS, FedEx, USPS, DHL) rate APIs for live shipping quotes at checkout
Email (Mailchimp, Klaviyo, or Postmark) for order confirmation, shipping notifications, and marketing
Analytics (Google Analytics 4) for storefront traffic
Social pixels (Facebook, TikTok) for ad conversion tracking
What to skip in v1
App marketplace (third-party developers)
POS (point of sale) for physical retail
B2B wholesale pricing
Subscription billing for merchants (add after launch)
Advanced analytics and reporting
Multi-currency and international shipping in v1 (unless this is your vertical)
Tech stack
| Layer | Choice |
|---|---|
| Merchant portal | React + Next.js |
| Storefront | Next.js (SSG/ISR for performance) |
| Backend | Node.js |
| Database | PostgreSQL |
| Payments | Stripe Connect |
| Tax | TaxJar API |
| Postmark (transactional) + Mailchimp (marketing) | |
| Search | Elasticsearch (product search) |
| Storage | AWS S3 + CloudFront |
| Hosting | AWS ECS or Vercel |
Cost to build
| Scope | Timeline | Cost |
|---|---|---|
| MVP (merchant portal, storefront, checkout, orders) | 20-30 weeks | $150K-$350K |
| With drag-and-drop storefront builder | Add 12-16 weeks | Add $100K-$180K |
| With app marketplace API | Add 8-12 weeks | Add $60K-$100K |
The real question: Why not just use Shopify?
If your merchants can use Shopify, they should. Shopify has 15 years of commerce infrastructure, a 10,000-app ecosystem, and best-in-class checkout conversion.
Build a custom platform when:
Your vertical has compliance or data requirements Shopify cannot meet (medical supplies, regulated goods)
Your business model requires transaction economics Shopify does not support (wholesale, auctions, rental)
Your geography requires payment or language support Shopify cannot provide
You are building for a specific industry workflow that requires deep integration (event ticketing, food service, B2B purchasing)
These are real use cases. We build them regularly.
If you are building a vertical commerce platform for a specific business model, let's talk about the architecture.
Frequently asked questions
- An MVP with merchant signup, product catalog, storefront, checkout, and basic order management takes 20-30 weeks with a team of 5-8 developers. A production-grade platform with theme customization, app extensions, and advanced analytics takes 12-18 months. Most vertical platforms win by going deep on a specific use case, not by building broad.
- MVP development: $150K-$350K. Monthly operating costs depend on merchant count and transaction volume. The payment processing layer is where variable costs accumulate. A 0.5-2% platform fee on GMV is typical, and collecting it requires Stripe Connect or a comparable split payment architecture.
- Multi-tenancy means one platform installation serves many merchants, each with isolated data. Row-level isolation (all merchants in the same tables, filtered by merchant ID) is simplest and most common. Schema-level isolation (each merchant has their own database schema) is more expensive but easier for compliance. Database-level isolation (each merchant gets their own database) is most isolated but operationally expensive at scale.
- Stripe Connect is the standard architecture. Merchants onboard as Stripe connected accounts. Customer payments flow through your platform account. You collect your platform fee automatically and transfer the remainder to the merchant's connected account on your payout schedule. Stripe Connect handles platform fee collection, merchant payouts, refunds, and chargeback management.
- Build custom when your vertical has compliance requirements Shopify can't meet (medical supplies, regulated goods), when your business model requires transaction economics Shopify doesn't support (wholesale, auctions, rental), when your geography requires payment or language support Shopify can't provide, or when your industry workflow needs deep integration that Shopify's app model can't accommodate.
Ask an AI
Get an instant summary of this post from your preferred AI assistant.


