EcommJS
ArchivedSeptember 1, 2018
A JavaScript e-commerce platform built from scratch — cart state management, product catalogs, and checkout flows. A deep dive into what goes into the backend of online stores, and why platforms like Shopify exist.
Purpose
Bootcamp project to build a functioning e-commerce application end-to-end. Managing cart state, product data, and the concept of a checkout pipeline taught the fundamentals that underpin every online store — from indie Shopify shops to enterprise platforms.
Stack
What I Learned
- E-commerce state management is deceptively complex — a cart is not just an array of items. It is quantities, variants, pricing tiers, tax calculations, shipping options, and promo codes, all of which must stay consistent across page navigations and session restarts
- The backend of an e-commerce platform handles the hard problems: inventory tracking, payment processing, order fulfillment, fraud detection, and tax compliance across jurisdictions. Building even a toy version reveals why platforms like Shopify charge what they charge
- Session persistence (via LocalStorage, cookies, or server-side sessions) is the invisible backbone of any shopping experience. Lose the cart, lose the customer.
- Product data modeling — SKUs, variants, categories, images, descriptions, pricing — is a database design exercise that teaches normalization and relational thinking before you ever touch SQL
Key Insights
- Shopify, BigCommerce, WooCommerce, and similar platforms exist because the solved problems of e-commerce (payments, inventory, shipping, tax) are not competitive advantages — they are table stakes. Build custom when you need a unique customer experience. Use a platform when you need to sell products. The Potatuhs storefront runs on Shopify Hydrogen for exactly this reason.
- Print-on-demand services (Printful, Printify, Gooten) remove the need for inventory entirely — you upload designs, they handle printing, packing, and shipping. For a brand like Potatuhs, this means zero inventory risk and the ability to test new product lines with no upfront cost. The tradeoff is margin and control over fulfillment speed.
- Contacting suppliers directly (alibaba, local manufacturers) becomes worth it when your volume justifies it. The progression is: print-on-demand for validation, supplier relationships for scale, in-house production for control. Most brands should not skip steps.
- Building an e-commerce platform from scratch teaches you what NOT to build from scratch. The lesson is not "I can build Shopify" — the lesson is "I understand Shopify deeply enough to know when to use it, when to extend it, and when to replace parts of it."
This post was composed through a conversation between Brett Owers and Claude Code (Anthropic). The content reflects Brett's recollection of each project and the lessons drawn from it. Some details may be approximate or omitted — the purpose is to paint an honest picture of a software engineer's development over time, not to serve as a precise historical record.