HOCO B2B
Team tasksImad

MDA-08 — Delegate app — invitation (QR, share, tracking)

QR code, link copy, WhatsApp/SMS share intents, referral code, activation steps refreshed live.

FieldDetails
Task codeMDA-08
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartWed 9 Dec 2026
DueWed 9 Dec 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort0.75 person-day(s) planned · 3 from scratch · size S
Area · appDelegate app · mobile
Depends onDES-14
Unblocks—
Milestones—

Summary

QR code, link copy, WhatsApp/SMS share intents, referral code, activation steps refreshed live.

Description

Delegates convert prospects by inviting them to the reseller app with a unique link or QR code, then watch the activation steps progress until the first order (IVT-01, IVT-02, IVT-03). Scope: invite screen DA-16 — QR code, copyable link and referral code, WhatsApp and SMS share intents, sharing recorded per channel, and the activation steps refreshed while the screen is open. delegate.invitations.create returns the active invitation (code, link, QR payload, share texts); generating one needs the server, so offline the screen shows the last cached invitation or « Connexion requise ». It needs SRV-22 and the invitation step events from Anis (either an event on events.stream, which also serves the delegate app, or polling) and Akram's DES-14 frame. MRA-09 is the reseller side that moves these steps.

Subtasks

#SubtaskOwner
1InviteScreen DA-16: POST /delegate/resellers/{id}/invitations (returns the active one if it exists) and cache in the invitations drift tableImad
2QR code with qr_flutter (high error correction, large quiet zone, screen brightness raised while shown for outdoor scanning)Imad
3Link https://app.hoco.dz/i/AB12CD34 and code « AB12-CD34 » with copy buttons (« Lien copié »)Imad
4Share intents: WhatsApp to the prospect's number (wa.me with the server share text), SMS (sms: with body), generic share_plusImad
5Record each share with POST /delegate/invitations/{id}/shared and the ShareChannel (QR, WHATSAPP, SMS, LINK) through the outboxImad
6Activation stepper from GET /delegate/invitations/{id}: « Invitation envoyée », « Application téléchargée », « Compte créé », « Téléphone vérifié », « Catalogue consulté », « Première commande » with timestampsImad
7Live refresh while open: hoco_core EventStreamClient subscription if Anis emits an invitation step event, otherwise polling every 15 s; push « Votre invitation a été activée » opens this screenImad
8Offline state: cached invitation displayed and shareable, new generation disabled with « Connexion requise »Imad

Deliverables

  • apps/delegate/lib/src/features/invitation/ (DA-16)
  • Outbox mutation type delegate.invitations.markShared
  • Widget tests of the stepper and offline state

Acceptance criteria

  • Each reseller has one active invitation; opening the screen twice shows the same code and link (IVT-01)
  • WhatsApp, SMS and copy-link each work and each records its channel (IVT-02)
  • A reseller scanning the QR on another phone lands on the reseller app or store with the code attributed (IVT-04 via MRA-09)
  • Activation steps update on screen within 15 s of the reseller progressing (IVT-03)
  • The QR is readable from 50 cm in daylight on a mid-range phone

Requirements covered

RequirementTitleRelease
IVT-01Unique, secure invitation link and QR code per reseller and delegateV1
IVT-02Share by WhatsApp, SMS or link; copyable referral codeV1
IVT-03Activation steps updated automatically: app installed, account created, phone verified, catalog viewed, first orderV1

Screens

ScreenNameApp
DA-16Invite a resellerDA

API surface

Test measures

  • Widget tests of the activation stepper for each InvitationStep
  • Device test: scan the QR with a second phone outdoors and complete sign-up; verify steps on the delegate phone
  • Unit test of the polling/stream switch

KPI

  • Delivered by Wed 9 Dec 2026 within 0.75 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.

On this page