Search⌘ K

Planning Our Shopping Cart

Learn how to plan and design a real-time shopping cart for an e-commerce app using Phoenix channels, PubSub, and Elixir. Understand the features like stock notifications, cart persistence, and multi-tab synchronization that enhance user experience.

A shopping cart’s functions

Our store currently lacks any form of checkout process, so we’ll start from scratch as we build our shopping cart. Shopping carts are conceptually very simple—put items in, take items out, and purchase the cart. However, Sneaker23’s sneaker launch process means that we’ll need our shopping cart to go beyond the basics. We need a shopping cart that tells a shopper when an item becomes out-of-stock, so they have a chance to select a different size very quickly.

First, we’ll walk through the requirements of our shopping cart. This will help us stay focused on building the minimal working feature set, and these requirements will drive our acceptance tests. After that, we’ll see our approach to implementing our shopping cart. Finally, we’ll set up our local environment so we can build the feature.

Requirements of a shopping cart

Due to the limited nature of a Sneakers23 release, our shopping cart will be pretty straightforward. The real-time nature of the sneaker launch process will throw a few ...