MRA-02 — Reseller app — catalog, search, scanner, filters
Catalog grid with tabs and category chips, search with suggestions and recents, barcode scanner, advanced filters (price range, category/sub-category, brand, attributes, availability, promotion) with live counts from facets, sort, infinite scroll; guest mode shows no prices.
| Field | Details |
|---|---|
| Task code | MRA-02 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Mon 9 Nov 2026 |
| Due | Wed 11 Nov 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 2 person-day(s) planned · 6 from scratch · size M |
| Area · app | Reseller app · mobile |
| Depends on | DES-07 |
| Unblocks | — |
| Milestones | — |
Summary
Catalog grid with tabs and category chips, search with suggestions and recents, barcode scanner, advanced filters (price range, category/sub-category, brand, attributes, availability, promotion) with live counts from facets, sort, infinite scroll; guest mode shows no prices.
Description
Resellers find products by browsing, searching, scanning and, per the 17 Oct decision, by combinable advanced filters with live counts (CAT-12, CAT-13), and results must come back in under 3 s (CAT-07, NFR-01). Scope: search RA-10 with suggestions and recents, barcode scanner RA-11, catalog grid RA-12 with tabs and category chips and infinite scroll, and the advanced filters and sort sheet RA-13 driven by catalog.facets: price range (signed-in only), category and sub-category, brand, per-category attributes (power W, connector USB-C/Lightning/Micro-USB, cable length, colour, capacity mAh, Bluetooth version), availability, promotion and new arrivals. Guests browse the same screens with no prices, no price facet and no price sort, and only availability is shown, never quantities (STK-07). It needs catalog.products.list|suggest|byBarcode, catalog.categories|brands|facets with the attribute filter encoding agreed with Anis (SRV-11, attributes from BO-71) and Akram's DES-07 filter and sort sheets. The grid, search bar and filter sheet go into hoco_catalog because MDA-09 reuses them for assisted orders; MRA-03 opens from every result.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | CatalogScreen RA-12: tabs from DES-07, category chips from catalog.categories (tree with sub-categories), ProductGrid with cursor pagination on catalog.products.list (limit 20, prefetch at 70 % scroll) | Imad |
| 2 | CatalogQuery model (q, categoryId, subCategoryIds, brandIds, priceMin/priceMax in centimes, attribute filters, availability, promotion, isNew, sort) serialised into route query params so back navigation, banners and deep links restore the exact filter | Imad |
| 3 | FilterSheet RA-13: sections rendered from GET /catalog/facets for the current query — category/sub-category tree, brands, price range slider (hidden for guests), attribute facets by type (multi-select chips for connector and colour swatches, range sliders for W, mAh and cable length), « En stock » toggle, « En promotion », « Nouveautés » | Imad |
| 4 | Live counts: facets re-requested 300 ms after each change (cancel in-flight requests), counts next to each value, zero-count values disabled, button « Voir 128 produits », « Réinitialiser » | Imad |
| 5 | Applied-filter chips row above the grid with one-tap removal and a filter-count badge on the filter button | Imad |
| 6 | Sort sheet: « Pertinence », « Nouveautés », « Popularité », « Prix croissant » / « Prix décroissant » (signed-in only) | Imad |
| 7 | SearchScreen RA-10: debounced catalog.products.suggest (products, brands, categories), search by name, reference or brand, 10 recent searches stored locally, empty-result state with a « Contacter le support » shortcut | Imad |
| 8 | ScannerScreen RA-11 (mobile_scanner, EAN-13/EAN-8/Code 128, torch toggle) → catalog.products.byBarcode → product detail, or « Produit introuvable » with manual search | Imad |
| 9 | Guest rendering: ProductCard with the price lock, no price facet or price sort, add buttons replaced by the sign-up prompt | Imad |
| 10 | Move ProductGrid, CatalogSearchBar and FilterSheet into hoco_catalog with a host-app callback for add-to-cart (reseller cart vs. assisted-order draft) | Imad |
| 11 | Agree the attribute filter query encoding and facet response shape with Anis | Anis |
Deliverables
- apps/reseller/lib/src/features/catalog/ (catalog, search, scanner screens)
- packages/hoco_catalog/lib/src/catalog_query.dart, product_grid.dart, filter_sheet.dart, sort_sheet.dart
- Widget tests and goldens for the filter sheet (guest and signed-in)
- Firebase App Distribution build 0.2.0 (staging) with catalog and filters for DQA-02
Acceptance criteria
- Filters combine (e.g. sub-category « Chargeurs » + brand ACEFAST + connector USB-C + power 20–65 W + « En stock ») and the grid matches the « Voir N produits » count (CAT-12)
- Attribute sections change with the selected category, following the attribute definitions of that category (CAT-13)
- Guests see no price facet, no price sort and no price on any card; signed-in resellers see their customer-type price (AUTH-10, PRC-05)
- No screen shows a stock quantity; availability is only « En stock » / « En rupture » (STK-07)
- First page of results and facet counts appear in under 3 s on 4G on a mid-range phone (CAT-07, NFR-01)
- Scanning a known HOCO barcode opens its product detail; an unknown one shows « Produit introuvable » (CAT-10)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| CAT-07 | Catalog browsing and search by name, reference or brand, with sorting; results in under 3 seconds | V1 |
| CAT-10 | Barcode scan to find a product | V1 |
| STK-07 | Resellers and guests only ever see availability (in stock / out of stock) — never quantities | V1 |
| PRC-05 | Prices and stock re-validated at cart and at checkout; the reseller only ever sees their own price | V1 |
| AUTH-10 | Guest mode: the reseller app and web can be browsed without an account; prices stay hidden until the visitor signs up and declares a customer type | V1 |
| CAT-12 | Advanced, combinable filters on web and mobile: price range, category and sub-category, brand, attributes (power, connector, cable length, colour…), availability, promotion, new arrivals — with result counts | V1 |
| CAT-13 | Filterable product attributes defined per category (type, unit, allowed values) and filled on every variant | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| RA-10 | Search | RA |
| RA-11 | Barcode scanner | RA |
| RA-12 | Catalog | RA |
| RA-13 | Advanced filters & sort (price range, category/sub-category, brand, attributes…) | RA |
API surface
| Endpoint group | Operations |
|---|---|
| Catalog & favorites | 12 |
Test measures
- Unit tests of CatalogQuery ↔ query-param round-trip including attribute ranges and multi-values
- Widget tests of FilterSheet with recorded facet payloads (guest vs signed-in, zero counts disabled)
- integration_test: search → filter → sort → open product, against Prism examples
- Performance trace of first catalog page and facets on a mid-range Android on throttled 4G
Risks
- Facet calls on every change overload the server or feel laggy — debounce, cancel stale requests and ask Anis for a cached facets query
- Attributes inconsistently filled in the back-office make filters look empty — show only facets with counts and report gaps to Anis for data clean-up
KPI
- Delivered by Wed 11 Nov 2026 within 2 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.
MRA-01 — Reseller app — home
Greeting, notifications bell, search entry with scanner, banner carousel/daily offer, quick access, popular categories, recommended products, balance/credit tiles.
MRA-03 — Reseller app — product detail & favorites
Gallery, variants, prices, availability, quantity stepper with limits, add to cart / order now, specs sheet, similar products, favorites, share.