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 app | Delegate app | |
|---|---|---|
| Application id | dz.hoco.reseller | dz.hoco.delegate |
| Users | Shop owners (revendeurs), and guests who have no account yet | Field sales delegates (délégués), accounts created by the back-office |
| Does | Catalog 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 posture | Online-first with read caches; live order status over SSE while open, push otherwise | Offline-first: local drift database, outbox of idempotent mutations replayed through sync.batch, delta pulls (cahier §7.3) |
| Screens | RA-01…RA-41 (V1 except RA-37…39) | DA-01…DA-28 |
| Shared code | hoco_core, hoco_api, hoco_ui, hoco_l10n, hoco_catalog | the 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.
| Decision | What it means in the apps | Where |
|---|---|---|
| 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 session | Architecture › 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 later | Architecture › sign-up |
| Availability only (STK-07) | Stock is shown as En stock / En rupture — never a number, in both apps | API integration › models |
| No automatic confirmation (ORD-14) | After checkout an order shows Envoyée and waits for the back-office; the confirmation screen says so | Architecture › 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 background | API 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 arrivals | Architecture › 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 picker | Location 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 uploads | API 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.
| Date | Milestone | Target | Reached when these tasks end |
|---|---|---|---|
| 18 Oct 2026 | Cadrage validated — validation sheet signed | — | PRJ-03 |
| 18 Oct 2026 | API contract v1 published (OpenAPI + mock server) | — | SRV-03 |
| 19 Oct 2026 | Server V1 feature-complete | — | SRV-26, SRV-40 |
| 21 Oct 2026 | Design system v1 ready (tokens + components) | — | DES-04 |
| 22 Oct 2026 | Screen inventory frozen | — | DES-05 |
| 29 Oct 2026 | Reseller app designs ready for client review | — | DES-10 |
| 05 Nov 2026 | Delegate app designs ready for client review | — | DES-14 |
| 08 Nov 2026 | Mobile foundations ready | — | MOB-11 |
| 12 Nov 2026 | Back-office designs ready for client review | — | DES-19 |
| 16 Nov 2026 | Design handoff complete | — | DES-21 |
| 03 Dec 2026 | Back-office and reseller web V1 feature-complete | — | DSH-12, WEB-05, WEB-06 |
| 15 Dec 2026 | Mobile apps V1 feature-complete | — | MDA-12 |
| 22 Dec 2026 | Staging integration complete | — | MOB-14, SRV-28 |
| 28 Dec 2026 | Acceptance report (PV de recette) signed | — | QA-02 |
| 29 Dec 2026 | Production go-live | on time — 17 Jan 2027 | LCH-01 |
| 30 Dec 2026 | Pilot starts | on time — 17 Jan 2027 | LCH-02 |
| 14 Jan 2027 | Pilot go / no-go | — | LCH-03, LCH-03B |
| 21 Jan 2027 | Generalisation complete | — | LCH-05 |
| 22 Feb 2027 | V2 delivered | — | SRV-38, DSH-21, MDA-20, WEB-20, DQA-12 |
| Task | Name | Phase | Dates | Effort | Depends on |
|---|---|---|---|---|---|
MOB-01 | Flutter monorepo — workspace, two apps, flavors, CI | P0 | Sun 18 Oct | 1 d | — |
MOB-02 | Core package — HTTP client, interceptors, errors, storage, logging | P0 | Mon 19 Oct | 1 d | MOB-01 |
MOB-07 | Localisation & formatting | P0 | Tue 20 Oct | 0.5 d | MOB-01 |
MOB-04 | Flutter design system — tokens, theme, components | P0 | Wed 21 Oct → Sun 25 Oct | 2.5 d | DES-03, MOB-01 |
MOB-03 | API client from the OpenAPI contract + mock server workflow | P0 | Sun 25 Oct → Mon 26 Oct | 1 d | SRV-03, MOB-02 |
MOB-05 | Navigation, app shells & system states | P0 | Mon 26 Oct → Tue 27 Oct | 0.75 d | MOB-04 |
MOB-06 | Authentication flows (both apps) | P0 | Tue 27 Oct → Wed 28 Oct | 1.75 d | MOB-03, MOB-05, DES-06 |
MOB-08 | Push notifications foundation | P0 | Thu 29 Oct | 0.75 d | MOB-06 |
MOB-09 | Offline foundation for the delegate app (local DB + outbox sync) | P0 | Thu 29 Oct → Wed 04 Nov | 2.5 d | MOB-03 |
MOB-10 | Location, maps & consent foundation | P0 | Wed 04 Nov → Thu 05 Nov | 1.25 d | MOB-05 |
MOB-11 | Media capture & uploads | P0 | Thu 05 Nov → Sun 08 Nov | 0.75 d | MOB-03 |
MRA-01 | Reseller app — home | P1 | Sun 08 Nov → Mon 09 Nov | 1.25 d | MOB-06, DES-07 |
MRA-02 | Reseller app — catalog, search, scanner, filters | P1 | Mon 09 Nov → Wed 11 Nov | 2 d | DES-07 |
MRA-03 | Reseller app — product detail & favorites | P1 | Wed 11 Nov → Thu 12 Nov | 0.75 d | DES-08 |
MRA-04 | Reseller app — cart, checkout & confirmation | P1 | Thu 12 Nov → Sun 15 Nov | 1.5 d | DES-08 |
MRA-05 | Reseller app — orders, tracking & assisted-order confirmation | P1 | Sun 15 Nov → Tue 17 Nov | 1.5 d | DES-09 |
MRA-06 | Reseller app — promotions & daily offers | P1 | Tue 17 Nov | 0.75 d | DES-10 |
MRA-07 | Reseller app — account, store, finance & settings | P1 | Wed 18 Nov → Thu 19 Nov | 1.25 d | DES-10, DES-09 |
MRA-08 | Reseller app — notifications & support | P1 | Thu 19 Nov → Sun 22 Nov | 1.25 d | MOB-08, DES-10 |
MRA-09 | Reseller app — invitation attribution | P1 | Sun 22 Nov → Mon 23 Nov | 0.75 d | MOB-06 |
MRA-10 | Reseller app — returns & live order updates | P1 | Mon 23 Nov → Tue 24 Nov | 1 d | MRA-05 |
MRA-11 | Reseller app — Notification Centre, action buttons, group preferences, promotion tabs & flash-sale countdown | P1 | Tue 24 Nov → Wed 25 Nov | 1.5 d | MRA-06, MRA-08, MRA-10, DES-23, SRV-39 |
MDA-01 | Delegate app — home, profile, zone, objectives | P1 | Wed 25 Nov → Thu 26 Nov | 1.25 d | DES-11, MOB-09 |
MDA-02 | Delegate app — tour programme & calendar | P1 | Sun 29 Nov → Mon 30 Nov | 1.5 d | DES-12 |
MDA-03 | Delegate app — map, navigation & arrival check-in | P1 | Mon 30 Nov → Tue 01 Dec | 1.25 d | DES-12, MOB-10 |
MDA-04 | Delegate app — point-of-sale sheet & prospects list | P1 | Tue 01 Dec → Wed 02 Dec | 1.25 d | DES-13 |
MDA-05 | Delegate app — visit flow | P1 | Thu 03 Dec → Sun 06 Dec | 1.5 d | DES-13, MOB-11 |
MDA-06 | Delegate app — visit report & follow-ups | P1 | Sun 06 Dec → Mon 07 Dec | 1.25 d | DES-13 |
MDA-07 | Delegate app — new reseller (offline) & edit | P1 | Mon 07 Dec → Tue 08 Dec | 1.25 d | DES-14 |
MDA-08 | Delegate app — invitation (QR, share, tracking) | P1 | Wed 09 Dec | 0.75 d | DES-14 |
MDA-09 | Delegate app — first-order assistance & orders | P1 | Wed 09 Dec → Thu 10 Dec | 1.25 d | DES-14, MRA-04 |
MDA-10 | Delegate app — tour closing, reports & performance | P1 | Sun 13 Dec → Mon 14 Dec | 1.25 d | DES-14 |
MDA-11 | Delegate app — messages, settings & sync centre | P1 | Mon 14 Dec | 0.75 d | DES-14, MOB-09 |
MDA-12 | Delegate app — location sampling during tours | P1 | Tue 15 Dec | 0.75 d | MOB-10 |
MOB-12 | Staging integration — real API, edge states, performance | P1 | Tue 15 Dec → Thu 17 Dec | 2 d | MDA-12, SRV-23, SRV-18, SRV-19, SRV-24, SRV-26 |
MOB-13 | Field test with a delegate — GPS, weak network, offline | P1 | Thu 17 Dec → Mon 21 Dec | 1.5 d | MOB-12 |
MOB-14 | Store readiness — Play Console tracks, data safety, location declaration | P1 | Mon 21 Dec → Tue 22 Dec | 1 d | MOB-13, DQA-01 |
MOB-15 | Mobile test automation & hardening | P1 | Tue 22 Dec → Thu 24 Dec | 2 d | MOB-14 |
MOB-17 | Design QA fixes & accessibility pass (both apps) | P1 | Thu 24 Dec → Sun 27 Dec | 1.5 d | DQA-03, MOB-15 |
LCH-03B | Pilot (2 weeks) — mobile support & hotfixes (Imad) | P2 | Thu 31 Dec → Thu 14 Jan | 10 d | LCH-02 |
MOB-18 | Pilot improvements — mobile | P3 | Sun 17 Jan → Tue 19 Jan | 3 d | LCH-03B |
MOB-16 | iOS build & App Store release (on client decision) | P3 | Wed 20 Jan → Sun 24 Jan | 3 d | MOB-18 |
MRA-20 | V2 — Reseller app loyalty, rewards & packs V2 | P4 | Mon 25 Jan → Wed 27 Jan | 3 d | SRV-29, DES-30 |
MDA-20 | V2 — Optimised routes & field analytics in the delegate app V2 | P4 | Thu 28 Jan → Sun 31 Jan | 1.5 d | MRA-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:
- Before the contract — foundations that need no API: the repository, flavors and CI (MOB-01);
hoco_corewith 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. - 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. - 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).
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-mobilecreated 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
ghinstalled. - Pub workspace with
apps/reseller,apps/delegate,apps/galleryand the sevenhoco_*packages;melos run analyzeandmelos run testgreen. - Flavors
dev,staging,prodbuild on Android with their own application id suffix, name and icon;env/*.jsonread at start. - CI on pull requests: format, analyze, test. lefthook with
dart formatand 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 instagingandprod. -
hoco_l10n(MOB-07):app_fr.arbas template,arandenscaffolded, enum labels generated fromenums.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,prodcreated 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
Repository and structure
Architecture
API integration
Offline sync
Location and maps
Notifications and deep links
Design system in Flutter
Quality and testing
Build and release
Conventions
Design workflow & handoff
How designs move from Claude Design to code — project structure, frame naming, statuses and who moves them, annotations, the handoff bundle, asset export, token releases, change requests after handoff, design QA and responsibilities.
Repository and structure
How hoco-mobile is created and laid out: GitHub settings, the Dart pub workspace with Melos scripts, the package tree, application ids, flavors, Firebase projects, signing and the bootstrap commands.