Gesture-Driven Shopping App (Angular + handtrackjs)

An Angular storefront controlled by camera-based hand gestures.

Concept illustration of camera hand recognition driving a storefront and cart
Concept illustration of gesture detection and shopping actions.

Explore another way to navigate a storefront

This group assignment used Angular and handtrackjs to build a gesture-controlled shopping prototype. A camera detects hand poses, the app translates them into commands, and the storefront supports product browsing, quantity changes, and a cart.

I focused on the detection pipeline, the events connecting detection to the UI, and the navigation and cart interactions.


Turn predictions into a small command language

The hand-tracker component loads its model, starts the camera, and samples detections every 500 milliseconds. It counts labels such as open, closed, pointing, and pinching hands, then emits a normalized event for the surrounding application.

The mapping includes:

Gesture Action
Two open hands Show Home
Two closed hands Show Cart
One closed hand Previous product
One open hand Next product
Pointing hand Add to cart
Open and closed hands together Increase quantity
Open and pointing hands together Decrease quantity

The two combined gestures were custom interactions in our implementation.


Keep detection separate from shopping logic

The home component receives the event and maps it to an existing UI action. The carousel handles product movement and quantity, while a shared in-memory cart service handles items. The cart calculates totals from the static JSON inventory.

On-screen changes and Toastr messages acknowledge actions. Mouse and keyboard controls remain available, which also makes it easier to inspect the shopping flow independently of the camera detector.


What the prototype made visible

Gesture input introduces ambiguity that a button click usually avoids. A detected pose can remain present across several samples, and lighting or positioning can affect recognition. Those details make feedback and command timing important areas to evaluate.

Building the prototype gave me a practical approach to unfamiliar input methods: isolate detection, normalize the event, connect it to understandable actions, and keep the result visible. The working storefront made the gesture-to-command mapping available to inspect and refine.


Run the project

npm install
ng serve

Open the app in a desktop browser and allow camera access to try the gestures.