MDA-08 — Delegate app — invitation (QR, share, tracking)
QR code, link copy, WhatsApp/SMS share intents, referral code, activation steps refreshed live.
| Field | Details |
|---|---|
| Task code | MDA-08 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Wed 9 Dec 2026 |
| Due | Wed 9 Dec 2026 |
| Responsible | Imad — Mobile developer (Flutter) |
| Co-responsible | — |
| Effort | 0.75 person-day(s) planned · 3 from scratch · size S |
| Area · app | Delegate app · mobile |
| Depends on | DES-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
| # | Subtask | Owner |
|---|---|---|
| 1 | InviteScreen DA-16: POST /delegate/resellers/{id}/invitations (returns the active one if it exists) and cache in the invitations drift table | Imad |
| 2 | QR code with qr_flutter (high error correction, large quiet zone, screen brightness raised while shown for outdoor scanning) | Imad |
| 3 | Link https://app.hoco.dz/i/AB12CD34 and code « AB12-CD34 » with copy buttons (« Lien copié ») | Imad |
| 4 | Share intents: WhatsApp to the prospect's number (wa.me with the server share text), SMS (sms: with body), generic share_plus | Imad |
| 5 | Record each share with POST /delegate/invitations/{id}/shared and the ShareChannel (QR, WHATSAPP, SMS, LINK) through the outbox | Imad |
| 6 | Activation 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 timestamps | Imad |
| 7 | Live 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 screen | Imad |
| 8 | Offline 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
| Requirement | Title | Release |
|---|---|---|
| IVT-01 | Unique, secure invitation link and QR code per reseller and delegate | V1 |
| IVT-02 | Share by WhatsApp, SMS or link; copyable referral code | V1 |
| IVT-03 | Activation steps updated automatically: app installed, account created, phone verified, catalog viewed, first order | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| DA-16 | Invite a reseller | DA |
API surface
| Endpoint group | Operations |
|---|---|
| Prospects, points of sale, follow-ups & invitations | 13 |
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.
MDA-07 — Delegate app — new reseller (offline) & edit
Sign-up form with wilaya/commune pickers, GPS capture, façade photo, status stepper, duplicate-phone feedback; client-generated id for offline creation.
MDA-09 — Delegate app — first-order assistance & orders
4-step assisted order reusing the catalog/cart widgets, send for confirmation, status of assisted orders, read-only orders of my resellers.