HOCO B2B
Mobile (Flutter)

Mobile track

The two Flutter apps at a glance: what each does, Imad's plan, how the mobile work runs in parallel with the server contract, and the first-week checklist.

Imad builds both Flutter apps — the reseller app (application revendeur) and the delegate app (application délégué, for the field sales representatives) — in his own repository hoco-mobile. They talk only to the central API (https://api.hoco.dz/v1) and are designed by Akram in Claude Design. This section is the engineering guide for that repository: decisions already taken, recommendations with their reasons, and the procedures that connect the mobile track to Anis's contract and Akram's handoff.

Library choices below are recommendations: the final pick is Imad's, unless the choice changes the API contract (then it is agreed with Anis in SRV-03).

The two apps

Reseller appDelegate app
Application iddz.hoco.resellerdz.hoco.delegate
UsersShop owners (revendeurs), and guests who have no account yetField sales delegates (délégués), accounts created by the back-office
DoesCatalog with advanced filters, cart, checkout, live order tracking, assisted-order confirmation, returns and after-sales claims, invoices and payments, promotions, notifications, tickets, regional WhatsApp support (cahier §5)Day and tour programme, map and navigation, GPS check-in, visits with checklist and photos, visit reports and follow-ups, prospect creation, invitations (QR, link), first-order assistance, tour closing and performance (cahier §6)
Network postureOnline-first with read caches; live order status over SSE while open, push otherwiseOffline-first: local drift database, outbox of idempotent mutations replayed through sync.batch, delta pulls (cahier §7.3)
ScreensRA-01…RA-41 (V1 except RA-37…39)DA-01…DA-28
Shared codehoco_core, hoco_api, hoco_ui, hoco_l10n, hoco_catalogthe same, plus hoco_offline and hoco_maps

Android comes first, on mid-range phones (cahier §9, NFR-04). iOS is built only if HOCO decides it (decision D-10) and only after the pilot (MOB-16, phase P3), so it can never delay the go-live: keep the ios/ folders compiling, but spend no V1 time on them.

Product decisions that shape the Flutter code

These are binding (team decisions of 17 Oct 2026). Each one has a home in this guide.

DecisionWhat it means in the appsWhere
Guest mode (AUTH-10, RA-41)The reseller app opens without an account: home, catalog, product pages, promotions and the WhatsApp button work; prices are null and replaced by a lock (« Créez un compte pour voir les prix »); cart, favorites, orders and account require a sessionArchitecture › navigation
Customer type at sign-up (AUTH-11)RA-05 asks Super-gros, Demi-gros or Détail; the declared type selects the price shown right after sign-up (default, to confirm); only the back-office changes it laterArchitecture › sign-up
Availability only (STK-07)Stock is shown as En stock / En rupture — never a number, in both appsAPI integration › models
No automatic confirmation (ORD-14)After checkout an order shows Envoyée and waits for the back-office; the confirmation screen says soArchitecture › routes
Live order status (ORD-15)SSE client on GET /v1/events while the reseller app is in the foreground, Last-Event-ID resume, push in the backgroundAPI integration › live updates
Advanced filters (CAT-12)Filter state driven by catalog.facets counts: price range (signed in only), category and sub-category, brand, attributes, availability, promotion, new arrivalsArchitecture › catalog query state
Regional WhatsApp (SUP-05)Fixed button; signed-in users use Me.supportRegion; guests are asked for coarse location only if they agree, otherwise a wilaya pickerLocation and maps › WhatsApp region
After-sales and returns in V1 (SUP-04, ORD-13)Claims on order lines with photos (RA-33) and return requests on delivered orders (RA-40), both with photo uploadsAPI integration › uploads

Imad's plan

V1 has a three-month frame from design to deployment: production at the start of January, then a two-week pilot; generalisation, iOS and V2 come after. The mobile lane is the tightest one inside that frame — both apps are feature-complete only shortly before staging integration, the field test and store readiness, with no slack before acceptance. Dates are computed by the scheduler; the timeline shows all three lanes.

3-month frame: design → development → deployment — deadline 17 Jan 2027.

DateMilestoneTargetReached when these tasks end
18 Oct 2026Cadrage validated — validation sheet signed—PRJ-03
18 Oct 2026API contract v1 published (OpenAPI + mock server)—SRV-03
19 Oct 2026Server V1 feature-complete—SRV-26, SRV-40
21 Oct 2026Design system v1 ready (tokens + components)—DES-04
22 Oct 2026Screen inventory frozen—DES-05
29 Oct 2026Reseller app designs ready for client review—DES-10
05 Nov 2026Delegate app designs ready for client review—DES-14
08 Nov 2026Mobile foundations ready—MOB-11
12 Nov 2026Back-office designs ready for client review—DES-19
16 Nov 2026Design handoff complete—DES-21
03 Dec 2026Back-office and reseller web V1 feature-complete—DSH-12, WEB-05, WEB-06
15 Dec 2026Mobile apps V1 feature-complete—MDA-12
22 Dec 2026Staging integration complete—MOB-14, SRV-28
28 Dec 2026Acceptance report (PV de recette) signed—QA-02
29 Dec 2026Production go-liveon time — 17 Jan 2027LCH-01
30 Dec 2026Pilot startson time — 17 Jan 2027LCH-02
14 Jan 2027Pilot go / no-go—LCH-03, LCH-03B
21 Jan 2027Generalisation complete—LCH-05
22 Feb 2027V2 delivered—SRV-38, DSH-21, MDA-20, WEB-20, DQA-12
18 Oct 2026 → 31 Jan 2027
Oct 2026Nov 2026Dec 2026Jan 2027Feb 202718/1025/101/118/1115/1122/1129/116/1213/1220/1227/123/110/117/124/131/1
Milestones
P1 — V1 build & integration
P2 — Acceptance, go-live & pilot
P3 — Generalisation (after the 3 months)
ImadV2 scopePublic holiday◆ Milestone (hover for name)
TaskNamePhaseDatesEffortDepends on
MOB-01Flutter monorepo — workspace, two apps, flavors, CIP0Sun 18 Oct1 d—
MOB-02Core package — HTTP client, interceptors, errors, storage, loggingP0Mon 19 Oct1 dMOB-01
MOB-07Localisation & formattingP0Tue 20 Oct0.5 dMOB-01
MOB-04Flutter design system — tokens, theme, componentsP0Wed 21 Oct → Sun 25 Oct2.5 dDES-03, MOB-01
MOB-03API client from the OpenAPI contract + mock server workflowP0Sun 25 Oct → Mon 26 Oct1 dSRV-03, MOB-02
MOB-05Navigation, app shells & system statesP0Mon 26 Oct → Tue 27 Oct0.75 dMOB-04
MOB-06Authentication flows (both apps)P0Tue 27 Oct → Wed 28 Oct1.75 dMOB-03, MOB-05, DES-06
MOB-08Push notifications foundationP0Thu 29 Oct0.75 dMOB-06
MOB-09Offline foundation for the delegate app (local DB + outbox sync)P0Thu 29 Oct → Wed 04 Nov2.5 dMOB-03
MOB-10Location, maps & consent foundationP0Wed 04 Nov → Thu 05 Nov1.25 dMOB-05
MOB-11Media capture & uploadsP0Thu 05 Nov → Sun 08 Nov0.75 dMOB-03
MRA-01Reseller app — homeP1Sun 08 Nov → Mon 09 Nov1.25 dMOB-06, DES-07
MRA-02Reseller app — catalog, search, scanner, filtersP1Mon 09 Nov → Wed 11 Nov2 dDES-07
MRA-03Reseller app — product detail & favoritesP1Wed 11 Nov → Thu 12 Nov0.75 dDES-08
MRA-04Reseller app — cart, checkout & confirmationP1Thu 12 Nov → Sun 15 Nov1.5 dDES-08
MRA-05Reseller app — orders, tracking & assisted-order confirmationP1Sun 15 Nov → Tue 17 Nov1.5 dDES-09
MRA-06Reseller app — promotions & daily offersP1Tue 17 Nov0.75 dDES-10
MRA-07Reseller app — account, store, finance & settingsP1Wed 18 Nov → Thu 19 Nov1.25 dDES-10, DES-09
MRA-08Reseller app — notifications & supportP1Thu 19 Nov → Sun 22 Nov1.25 dMOB-08, DES-10
MRA-09Reseller app — invitation attributionP1Sun 22 Nov → Mon 23 Nov0.75 dMOB-06
MRA-10Reseller app — returns & live order updatesP1Mon 23 Nov → Tue 24 Nov1 dMRA-05
MRA-11Reseller app — Notification Centre, action buttons, group preferences, promotion tabs & flash-sale countdownP1Tue 24 Nov → Wed 25 Nov1.5 dMRA-06, MRA-08, MRA-10, DES-23, SRV-39
MDA-01Delegate app — home, profile, zone, objectivesP1Wed 25 Nov → Thu 26 Nov1.25 dDES-11, MOB-09
MDA-02Delegate app — tour programme & calendarP1Sun 29 Nov → Mon 30 Nov1.5 dDES-12
MDA-03Delegate app — map, navigation & arrival check-inP1Mon 30 Nov → Tue 01 Dec1.25 dDES-12, MOB-10
MDA-04Delegate app — point-of-sale sheet & prospects listP1Tue 01 Dec → Wed 02 Dec1.25 dDES-13
MDA-05Delegate app — visit flowP1Thu 03 Dec → Sun 06 Dec1.5 dDES-13, MOB-11
MDA-06Delegate app — visit report & follow-upsP1Sun 06 Dec → Mon 07 Dec1.25 dDES-13
MDA-07Delegate app — new reseller (offline) & editP1Mon 07 Dec → Tue 08 Dec1.25 dDES-14
MDA-08Delegate app — invitation (QR, share, tracking)P1Wed 09 Dec0.75 dDES-14
MDA-09Delegate app — first-order assistance & ordersP1Wed 09 Dec → Thu 10 Dec1.25 dDES-14, MRA-04
MDA-10Delegate app — tour closing, reports & performanceP1Sun 13 Dec → Mon 14 Dec1.25 dDES-14
MDA-11Delegate app — messages, settings & sync centreP1Mon 14 Dec0.75 dDES-14, MOB-09
MDA-12Delegate app — location sampling during toursP1Tue 15 Dec0.75 dMOB-10
MOB-12Staging integration — real API, edge states, performanceP1Tue 15 Dec → Thu 17 Dec2 dMDA-12, SRV-23, SRV-18, SRV-19, SRV-24, SRV-26
MOB-13Field test with a delegate — GPS, weak network, offlineP1Thu 17 Dec → Mon 21 Dec1.5 dMOB-12
MOB-14Store readiness — Play Console tracks, data safety, location declarationP1Mon 21 Dec → Tue 22 Dec1 dMOB-13, DQA-01
MOB-15Mobile test automation & hardeningP1Tue 22 Dec → Thu 24 Dec2 dMOB-14
MOB-17Design QA fixes & accessibility pass (both apps)P1Thu 24 Dec → Sun 27 Dec1.5 dDQA-03, MOB-15
LCH-03BPilot (2 weeks) — mobile support & hotfixes (Imad)P2Thu 31 Dec → Thu 14 Jan10 dLCH-02
MOB-18Pilot improvements — mobileP3Sun 17 Jan → Tue 19 Jan3 dLCH-03B
MOB-16iOS build & App Store release (on client decision)P3Wed 20 Jan → Sun 24 Jan3 dMOB-18
MRA-20V2 — Reseller app loyalty, rewards & packs V2P4Mon 25 Jan → Wed 27 Jan3 dSRV-29, DES-30
MDA-20V2 — Optimised routes & field analytics in the delegate app V2P4Thu 28 Jan → Sun 31 Jan1.5 dMRA-20

44 tasks · 69.75 d of open effort. Dates are computed — Sunday–Thursday weeks, holidays excluded.

Imad also takes part in tasks owned by others: the cadrage workshop PRJ-03, the screen-inventory validation DES-05, the contract SRV-03 (as its first reviewer), end-to-end testing QA-01, acceptance QA-02, go-live LCH-01 and generalisation LCH-05.

Working in parallel with Anis

Anis defines services, then the database, then the API contract in the first week (SRV-01 → SRV-02 → SRV-03). The mobile track never waits for server code:

  1. Before the contract — foundations that need no API: the repository, flavors and CI (MOB-01); hoco_core with the interceptors and the error envelope, which are already fixed by the API conventions (MOB-02); localisation and formatting (MOB-07); then the Flutter design system as soon as Akram's day-3 mobile components exist (DES-03 → MOB-04). Meanwhile Imad reviews contract drafts with the Dart-generation checklist.
  2. Contract published (milestone API contract v1 published) — generate hoco_api, start the Prism mock server and build every screen against it (MOB-03). Stateful flows (cart, tour day) use in-memory fakes behind the same repository interfaces, because Prism does not keep state.
  3. Modules land on staging — switch endpoint groups one by one from the mock to staging (progressive switch); full integration in MOB-12 with Anis.

What each feature task waits for

Every feature task starts when its design day is done; it is built against the mock and becomes real when the server modules in the last column are on staging (checked in MOB-12).

TaskScreensDesign dayAPI groupsReal on staging after
MRA-01 homeRA-09DES-07 (after MOB-06)catalog, promotions, finance, notificationsSRV-11, SRV-12, SRV-13, SRV-19, SRV-18, SRV-08
MRA-02 catalog, search, scanner, filtersRA-10, RA-11, RA-12, RA-13DES-07catalogSRV-11, SRV-12, SRV-13
MRA-03 product detail & favoritesRA-14, RA-15, RA-16DES-08catalog, cartSRV-11, SRV-15
MRA-04 cart, checkout & confirmationRA-17, RA-18, RA-19, RA-20DES-08cart, profileSRV-15, SRV-14
MRA-05 orders, tracking, assisted ordersRA-21, RA-22, RA-23DES-09ordersSRV-16
MRA-06 promotions & daily offersRA-24, RA-25DES-10promotionsSRV-19
MRA-07 account, store, finance, settingsRA-27, RA-28, RA-29, RA-30, RA-31, RA-35DES-09, DES-10profile, finance, files, notificationsSRV-14, SRV-18, SRV-07, SRV-08
MRA-08 notifications, support, after-sales, WhatsAppRA-26, RA-32, RA-33, RA-34DES-10 (after MOB-08)notifications, supportSRV-08, SRV-24, SRV-20
MRA-09 invitation attributionRA-02, RA-03— (after MOB-06)invitationsSRV-22
MRA-10 returns & live order updatesRA-40, RA-21, RA-22— (after MRA-05)orders, notificationsSRV-16, SRV-20, SRV-26
MDA-01 home, profile, zone, objectivesDA-05, DA-22, DA-24, DA-25DES-11 (after MOB-09)delegate-daySRV-21
MDA-02 tour programme & calendarDA-06, DA-07DES-12delegate-toursSRV-21
MDA-03 map, navigation, check-inDA-08DES-12 (after MOB-10)delegate-toursSRV-21
MDA-04 POS sheet & prospects listDA-09, DA-13DES-13delegate-resellersSRV-14, SRV-22
MDA-05 visit flowDA-10, DA-11DES-13 (after MOB-11)delegate-tours, filesSRV-21, SRV-07
MDA-06 visit report & follow-upsDA-12, DA-19DES-13delegate-tours, delegate-resellersSRV-21, SRV-14
MDA-07 new reseller (offline) & editDA-14, DA-15DES-14delegate-resellers, filesSRV-14, SRV-07
MDA-08 invitation (QR, share, tracking)DA-16DES-14delegate-resellersSRV-22
MDA-09 first-order assistance & ordersDA-17, DA-18DES-14 (after MRA-04)delegate-orders, catalogSRV-16, SRV-11
MDA-10 tour closing, reports, performanceDA-20, DA-21DES-14delegate-tours, delegate-daySRV-21
MDA-11 messages, settings, sync centreDA-23, DA-26, DA-27DES-14 (after MOB-09)notifications, syncSRV-08, SRV-23
MDA-12 location sampling during tours—— (after MOB-10)syncSRV-23

The delegate app's offline engine is the riskiest piece: it is built in MOB-09 against the mock, but only SRV-23 on staging proves it, and the field test MOB-13 proves it under real network conditions. Ask Anis to deploy sync.batch and sync.delta to staging as early as SRV-23 allows, even before the delegate screens are finished.

First week checklist

No application code is written before these specification pages are done and reviewed; the first week below is the first week of code, in the order of the plan. Time is tight — anything that slips here pushes every feature task, because the mobile lane has no buffer before acceptance.

Repository and tooling (MOB-01):

  • Private repository hoco-mobile created under Imad's account, Anis and Akram invited, GitHub Pro active so branch protection applies (repository).
  • Flutter stable pinned with FVM; Android SDK, JDK 17, Node 22 (Prism, commitlint) and gh installed.
  • Pub workspace with apps/reseller, apps/delegate, apps/gallery and the seven hoco_* packages; melos run analyze and melos run test green.
  • Flavors dev, staging, prod build on Android with their own application id suffix, name and icon; env/*.json read at start.
  • CI on pull requests: format, analyze, test. lefthook with dart format and commitlint.

Core, localisation, design system:

  • hoco_core (MOB-02): dio with the header, auth, idempotency, retry and gate interceptors; error-envelope parsing unit-tested against the examples of the error registry; secure storage for the token and the install id; Sentry in staging and prod.
  • hoco_l10n (MOB-07): app_fr.arb as template, ar and en scaffolded, enum labels generated from enums.json, money, date, phone and distance formatters with tests.
  • hoco_ui (MOB-04): token JSON received from Akram after day 2, theme generated after day 3, gallery app running on a phone.

Accounts and decisions to request through Anis at the cadrage workshop (PRJ-03) — most have lead times:

  • Google Play Console organisation account owned by HOCO (D-U-N-S number and identity verification take time) — Imad gets admin rights for releases (build and release).
  • Firebase projects dev, staging, prod created under HOCO's Google account; Imad and Anis editors.
  • Google Cloud billing account for the Maps SDK key (maps provider pending, ADR-015).
  • Store names of the two apps (working names HOCO Revendeur and HOCO Délégué), privacy policy owner, iOS yes/no (D-10 — needed only for the post-pilot iOS task).
  • Background location: not requested unless HOCO insists — the foreground-service design covers tours (location).

Design and contract:

  • Day 5 inventory session (DES-05): every RA/DA screen has a route in the route tables and its states listed (loading, empty, error, offline, guest, pending validation).
  • Contract drafts of SRV-03 reviewed with the Dart-generation checklist; the mock server running the day the contract is published.
  • Two physical test phones identified: one current mid-range Android (reference for the 3-second budget) and one older low-RAM phone.

Pages in this section

On this page