
π Retail & E-commerce Β· Data Flow
How an online store builds 'recommended for you' and 'frequently bought together': click and order data, model training and a fast serving layer.
Drawing diagramβ¦
Data flow for a recommendation engine: the website and app send view, search, add-to-cart and purchase events to an event stream, which lands in a data lake. A daily training job builds collaborative filtering and 'bought together' models, writes item and user embeddings to a feature store and precomputed lists to Redis. A recommendation API combines them with real-time session events and business rules (in stock, margin) and serves results to product and home pages.
flowchart LR APP[Website and App] -->|Views, searches, carts, orders| ES[Event Stream] ES --> DL[(Data Lake)] DL -->|Daily| TR[Model Training] TR -->|Embeddings| FS[(Feature Store)] TR -->|Precomputed lists| RC[(Redis Cache)] ES -->|Session events| API[Recommendation API] FS --> API RC --> API CAT[(Catalog: stock, margin)] -->|Business rules| API API -->|Recommended products| APP
An online store split into microservices: catalog, cart, orders, payments and search, with Kafka events connecting them to shipping and notifications.
What happens when a shopper clicks Pay: stock is reserved, the payment is authorised, the order is created and stock is released again if payment fails.
Every status an online order moves through, from placed to delivered, including cancellations, returns and refunds.
A flexible product catalog: categories, products with variants (size, colour), prices, stock per warehouse and images.
How stock stays in sync across stores, warehouses and marketplaces so the same item isn't sold twice.
How an online store handles a return: eligibility, pickup, quality check at the warehouse and the refund or replacement.