# Request order — frontend handover

Approved design snapshot: 17 October 2026. React 18 / TypeScript / CSS. Customer accent is now black with white text; pink and yellow are retired. Existing crafter lime, Yarn connected and Craftmode identities remain.

## Landing layout revision — 17 October 2026

Removed the “What would you like made?” section and its route card. The three-step process strip now floats immediately below the Made for you hero, with an inset border and responsive stacked steps on mobile. Existing pattern-only scope and request entry remain. Verified at desktop and 320px without horizontal overflow; primary CTA still opens the advertising page.

## Address and actual materials revision — 17 October 2026

Section 03 now captures the finished-garment recipient, street/house number, optional apartment/c/o, four-digit Norwegian postal code, city and country. Required fields block Review; the address carries into the request basket and the same checkout editor. Public tenders receive only city/country, never street address or recipient. Production must enforce this separation and assigned-crafter access on the server.

Section 03, advertising and basket reuse `FinishedBasketMaterials` and real catalogue photography. The primary example is actual Permin pattern 93995 with Kamma 9902050 and Angel 9902026. See CATALOGUE.md for source links, EANs and published size amounts. This is a captured catalogue snapshot, not a live catalogue API integration. Retailer prices and stock are null; purchase remains blocked until a verified quote exists. Pattern 93995's captured price is NOK 49. The former Golden Hour/Soft Merino/Silk Cloud material examples are replaced.

`DeliveryAddress.tsx` owns the shared editor, summary and validation. `catalogue-assets.ts` embeds compressed source images. Section 03 can be opened directly through `previews/Krafthub-request-details.html`.

Verified blank fields and a three-digit postcode are rejected; 0150 retains its leading zero. Full address appears in Review and request basket. A published test request appears in Norway's tender board with Oslo, Norway and no street address. Size L plus Kamma Skovgrøn carries the correct image, EAN 5702858895337 and 5 + 8 balls into section 03. Material images load; address and cards fit 320px without horizontal overflow. TypeScript and production build pass.

## Hero photo revision — 17 October 2026

The user-supplied sculptural floral knit photograph is used only in the customer landing page’s Made for you hero. `hero-asset.ts` embeds the compressed image. The actual Permin garment and yarn photographs remain in pattern cards, requests and basket. Desktop framing was visually checked and the production build passes.

## Crafter request-and-quote revision — 17 October 2026

The crafter landing page now focuses on browsing customer requests and responding with quotes. Hero CTA goes to customer briefs; request cards use “View brief & quote.” Pattern browsing in crafter mode shows open-request counts and “View customer requests”; it has no customer-view switch or “Request this knit” action. Pattern-image navigation stays inside crafter request browsing. Customer ordering remains on the customer side.

Quote lifecycle: reserved → sent → selected → confirmed/paid → working → finished. Selected quotes stay under My quotes; only confirmed/paid jobs enter My commissions. First eligible reservation remains the agreed matching principle; customer selection is acceptance of that crafter’s quote, not automatic assignment or a new competitive bidding policy. The preview's customer-selection/payment controls simulate backend events; production must enforce actor permissions and verified payment events.

Verified no “Request this knit” buttons in crafter views; by-pattern request browsing opens briefs. Zero-price quote rejected; NOK 4,000 quote submitted and shows NOK 3,600 net. Customer selection appears as a separate status and does not create a commission. Mobile width 320px fits without horizontal overflow; TypeScript and production build pass.

## Desktop width revision — 17 October 2026

Removed the 1440px application wrapper limit. Customer and crafter previews fill the desktop viewport, with existing responsive layouts and component spacing retained. Verified application left edge 0 and width 1637px in a 1637px desktop content viewport.

## Review and run

Open any file in `previews/` without installing dependencies. Start with `Krafthub-customer-journey.html`; use the role switch for the crafter workspace. `Krafthub-pattern-to-commission.html` starts at the advertising page; `Krafthub-advertisement-and-basket.html` starts with the basket open.

For editable development, enter `source/`, install with `npm install`, then run `npm run dev`. `npm run typecheck` checks TypeScript and `npm run build` creates `dist/`. Dependencies are pinned in package.json. No local absolute imports are required. The preview uses embedded example imagery and the supplied trial font; production should use the platform's licensed fonts and real media.

This is a design and interaction reference, not production-integrated checkout. People, orders, making quotes and payments are fixtures. Connected yarn identity, images and requirements are a catalogue snapshot; retailer prices and stock remain unconfirmed. No real payments, payouts, messages or orders are sent. Keep demonstration shortcuts such as “Use sample details” out of the production flow.

Bespoke uploads, drawing briefs and design consultations are deferred. Existing patterns are the only starting point for commissioned orders.

## Agreed experience

Customer is the fifth role. Existing crafter portfolios and showcases are out of scope.

1. Pattern card → pattern advertising page. Preserve the existing Yarn connected badge. A distinct request action/badge indicates commissioned-making eligibility; keep both signals separate and route through the advertising page, never directly from a card to checkout.
2. Advertising page → choose garment size and yarn colours, inspect quantities and materials → Request this garment. Only eligible patterns permit commission requests. The Patternizer permission checkbox is agreed follow-up work, not an implemented editor in this package.
3. Complete a request linked to an eligible pattern already in the Krafthub catalogue, add it to the basket/drawer and publish the request. Creating/publishing a request does not charge or assign the job.
4. Crafter landing page → browse/filter requests → first eligible crafter reserves a request and supplies a quote. Customer approves the quote. Crafter then confirms materials and timing. Full successful payment is required before assignment.
5. Customer orders pattern access and yarn; yarn goes to the crafter. Pattern permission/access is granted to the assigned crafter within the purchased commission's scope. Reuse the existing one-access-per-pattern rule; do not add quantity controls to digital patterns.
6. Reuse the finished basket composition: Basket → Materials → Shop → Delivery → Details → Review, with fixed footer and material rows. Retain selections when editing/backtracking and validate required information before advancing.
7. Assigned → making → delivered → customer explicitly releases making funds → provider pays crafter. Customer silence is neither automatic refund nor automatic payout; stalled release/disputes need a separate provider-backed resolution path.

Domestic Norway first. International fulfilment and yarn substitution are deferred. Keep the prescribed yarn qualities fixed; customers can choose colour variants within each quality. Size drives independent quantities for each yarn line. Retailers determine availability, delivery and applicable costs. Recheck exact variants/quantities before payment; insufficient stock must block completion until resolved.

## Fees and payment boundaries

The prototype calculates both fees on the quoted making price, with pattern/materials/delivery shown separately: customer adds 10%; crafter receives making price less 10%. At NOK 4,000 making, customer making payment is NOK 4,400, crafter net is NOK 3,600 and Krafthub's gross fees are NOK 800. VAT, payment charges, refunds and final commercial fee base require production confirmation.

The intended architecture uses an independent payment provider to hold making funds, with Krafthub not holding customer money. Pattern/retailer purchases are separate from the delayed making payout. Mangopay alongside Stripe is a candidate, not an approved integration in this package. Provider acceptance, NOK support, settlement/holding limits, account onboarding, refunds, disputes and payment/payout webhooks remain implementation dependencies. Do not present a production escrow guarantee before the provider and contracts support it.

## Source map and component reuse

- `app.tsx`: customer navigation, request form, quotes, order state and crafter workspace mounting.
- `crafter.tsx` / `crafter.css`: request landing, filters, reservation/quote views, work states and shared pattern catalogue.
- `FinishedPattern.tsx` / `finished-pattern.css`: supplied pattern advertising composition, size/colour materials, creator cards, shared Conversation and commission entry.
- `FinishedBasket.tsx` / `finished-basket.css`: supplied basket frame, material rows and fixed footer; used by the commission drawer rather than a parallel drawer design.
- `commission.tsx` / `commission.css`: drawer stages, stock/shop/delivery validation, quote confirmation, simulated payment and customer release states.
- `materials.ts`: captured canonical pattern/yarn identities, EANs and size amounts; nullable retailer prices and stock. Replace the snapshot with production catalogue/retailer services, preserving unknown values and purchase blocking.
- `src/components.tsx`, `src/cards.tsx`, `src/workspace-tabs.tsx`: shared Krafthub controls/cards/tabs; DiscoveryCard adds request action/badge support.
- `src/conversation.tsx`: shared in-place Conversation with `naturalHeight` option so details/Conversation switching preserves panel height and the local draft.
- `customer.css`: scoped customer role tokens and layout; request accent is black with white foreground. The crafter override retains lime with dark foreground.

Underlying references: KRA-308 shared UI; KRA-309 pattern advertising; KRA-170 basket/materials; KRA-341 one pattern access per basket. Integrate with their current production components and data; do not overwrite their existing ordinary purchase paths with fixture behavior. The request flow extends these views.

## Production work required

- Persist requests, ownership, exact pattern/material selection, quotes and order history. Authenticate role actions; enforce catalogue pattern identity and commissioned-making eligibility on the server.
- Enforce reservation atomically on the server: one eligible crafter wins concurrent attempts; other users see the new state. Reservation expiry/release and recovery rules still need a product decision; the prototype is not an authoritative lock service.
- Version quotes and confirmations. Invalidate approval when price, materials or timing changes. Bind successful verified payment to the accepted quote; handle stale prices/stock, failed or duplicated callbacks, retries and cancellation without duplicate assignment/charges.
- Provide real notifications, shipping/tracking, delivery evidence, customer release and dispute/support flows. Define failed delivery, cancellation, refunds and loss responsibilities before launch.
- Add Patternizer commissioned-making permission, enforce it at request creation and pattern entitlement delivery. Define the licensed access lifecycle.
- Replace sample retailer stock/prices and identity cards with real data. Confirm tax invoices, provider accounts, fee ledger and payout reconciliation on the server.

## Acceptance and verification

The supplied source passes TypeScript checking and a Vite production build. The monochrome customer role, selected size and customer-request badges were checked; crafter role remains lime with dark text. Earlier interaction review covered size/colour preservation, stock blocking/resolution, all six drawer steps, crafter confirmation before payment, assignment after payment, explicit release, Escape/focus return and narrow drawer behavior at 390/320px.

Tech must repeat these against real services, including simultaneous reservation attempts, duplicate payment webhooks, denied access and failures. Verify desktop/mobile, long localized text, keyboard focus, drawer close/reopen and accessible contrast. Supply implementation PR and deployed evidence before treating the feature as production complete.
