ProjectIntent Over Keywords: From Stitched Embeddings to a Production Fashion Agent · Module 18: The frontend · part 20 of 26
Part 20 · Module 18: The frontend
Module 18: The frontend
25 min read·
About 50 minutes · Needs: Module 12 (high-level design), Module 13 (the chat contract and sessions), Module 15 (clarification policy and quick replies) · Code: part3-styleme/frontend/src/api.ts, part3-styleme/frontend/src/lib/chatReducer.ts, part3-styleme/frontend/src/pages/ChatPage.tsx, part3-styleme/frontend/src/lib/group.ts, part3-styleme/frontend/src/ux.test.tsx
Where this fits
This module (blue): the React page the shopper uses, the nginx container that serves it on one URL, and the API it calls. Blue marks our own code in every figure.
Everything in Modules 13 to 17 happens on the server: the planner decides, the implementer searches, the generator writes and the grounding check cleans the reply. The shopper sees none of it unless a page shows it well. This module is the page: a React app that sends one message at a time to /api/chat, keeps the conversation readable, shows why each product is there, and survives a slow model, a reload and a server that answers with something unexpected.
The rest of this project is yours to keep
This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.