Rishav Raj

Ten minutes to the door, a quick commerce app explained on AWS

A scroll driven, voiced and animated walkthrough of a quick commerce architecture, written in plain JavaScript with no framework, and a simulator of a live delivery company.

What
Personal project, live at pforprompt.com/quick-commerce

Worked on


The scroll engine

The page is a pinned stage. Scroll position is turned into a segment, and each segment is one beat of the story: a phone screen on one side and the AWS architecture growing on the other. The words and numbers for every beat live in one data file, so changing a lesson does not mean touching the animation.

Scroll positionpinned stageBeat kfrom one data filePhone screenwhat the app looks like after beat kDiagramnodes and edges appear, AWS iconsSVG cameraviewBox tweened to the active nodes
On a narrow screen a focus flag decides whether the phone or the diagram gets the space, depending on what is being said.

The diagram is one SVG. A camera animates its viewBox so it pans and zooms to the nodes being explained, and the zoom is tuned per screen size. On a phone there is no room for both, so focus switches between the phone screen and the diagram depending on what is being said. The official AWS icons are used unmodified.

Voice and lip sync

The guide, Nami, is an inline SVG character, so there is nothing to license. Her mouth is an overlay whose opening follows how loud the audio is, she blinks, and she changes pose while speaking.

The voice is pre rendered with the Kokoro text to speech model, so the page needs no speech service at runtime. Each clip is named by a hash of its line, so a reworded line gets a new clip and a shared line is rendered once. The audio plays through a Web Audio analyser. Its level, the root mean square of the waveform, drives the mouth. Words highlight as they are spoken.

Line of textHashFNV-1a of the textClippre rendered Kokoro mp3Audio elementstart button if autoplay blockedLevel meterRMS of the waveformWord highlightpaced to the clipMouth overlayopens with the levelOne speed setting scales the voice, the highlight, the lip sync, the camera and the scenes
The clip name is a hash of its text, so a reworded line has no clip until it is rendered again.

Browsers block sound before the first tap, so the intro has a start button as the fallback. A watchdog watches the clip's playback position, so a clip that stalls hands the story back and does not leave her stuck mid sentence.

Tour mode

Tour mode scrolls the story while she speaks, moving from one beat to the next as each line ends. If you scroll by hand it pauses, so the page never fights you. A single speed control scales the voice, the word highlight, the lip sync, the camera and the CSS animations together, so nothing drifts out of sync when you speed it up.

Pronto Ops, the simulator

A simulator of a live delivery company, in TypeScript and React Flow. There is no start, pause or level. Services call each other, so a slow database ends up as a slow page, and a cache cuts the database's load to a fraction. Auto scaling follows load with a start up delay, so it lags behind a spike. You can swap compute or database on any service while it runs and watch its health and cost change.

CUSTOMER APPCatalogSearchRecommendationsAdsINVENTORYStock serviceWarehouse teamStock cacheDELIVERYDispatch and ridersLive trackingAI AND MLDemand forecastSmart dispatchHealth per service from load against capacity. Swap compute or database live and watch cost move
Traffic follows a daily wave that grows, with events on top: rain slows riders, a slow database, a festival surge.

EC2, Fargate, RDS, Aurora and DynamoDB costs come from the public AWS Price List API, and the ones that are only estimates are labelled as estimates. The simulation is a pure TypeScript module, so I could test it with a script before any UI existed. A second company, a made up health insurer, runs on the same engine with only its content swapped.

The reference app and the AWS design

There is a working shop in React 19 with a Hono and Zod API on SQLite behind a small repository layer. Checkout reserves stock atomically, and the same Hono app exports as a Lambda handler.

The AWS design is serverless first, because quick commerce traffic is spiky. A DynamoDB single table is built around known access patterns. Writing an order and publishing its event could fail separately, so the table's stream feeds EventBridge Pipes as a transactional outbox. Step Functions Standard runs the order lifecycle, which lasts minutes and needs a visible history.

CloudFrontS3, the appAPI GatewayHTTP APILambdathe Hono appDynamoDBsingle tableStreamschange feedEventBridge PipesoutboxStep Functionsorder lifecycleSQS and SNSpick, notifyRider appGPS pingsIoT CoreLambdalast positionWebSocketto the customer
This is the design, as a diagram and a write up. It is not deployed and there is no infrastructure code yet.

Open the story. Numbers on the page are rounded estimates, not any company's figures.