SRV-51 — Reseller one-time codes by WhatsApp with SMS backup
WhatsApp sender for reseller codes, channel choice in auth.otp.send, SMS fallback, on/off setting and simulator.
| Field | Details |
|---|---|
| Task code | SRV-51 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Thu 3 Dec 2026 |
| Due | Sun 6 Dec 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 1 person-day(s) planned · 3 from scratch · size S |
| Area · app | Server · server |
| Depends on | SRV-05 |
| Unblocks | WEB-22, MRA-22, SRV-52 |
| Milestones | — |
Summary
WhatsApp sender for reseller codes, channel choice in auth.otp.send, SMS fallback, on/off setting and simulator.
Description
Decision D-64, asked by Anis on 8 Nov 2026, not yet accepted by HOCO. Moves the code part of NOT-08 into V1. Off by default through auth.otpWhatsappEnabled. Real sending needs HOCO's Meta account and an approved template.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Sender for the authentication template, with simulator and Mailpit copy | Anis |
| 2 | channel in auth.otp.send, cooldown per channel, SMS fallback | Anis |
| 3 | Setting auth.otpWhatsappEnabled and its label in the back office | Anis |
| 4 | First real send on HOCO's Meta account | Anis |
Deliverables
- apps/server/src/modules/identity/whatsapp.ts
- packages/contracts/src/schemas/auth.ts
Acceptance criteria
- With the setting off, every code goes by SMS
- With it on, a reseller code goes by WhatsApp and a delegate code by SMS
- When Meta refuses a message, the same code goes by SMS and channel answers SMS
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| AUTH-03 | Reseller self sign-up: phone verified by OTP, store details, declared customer type (super-gros, demi-gros, détail), password, optional invitation code | V1 |
| AUTH-04 | Reseller sign-in (phone or email + password, or a one-time code) and password reset by OTP | V1 |
| AUTH-07 | Password policy, hashing, OTP expiry/resend cooldown and attempt limiting | V1 |
API surface
| Endpoint group | Operations |
|---|---|
| Authentication & sessions | 14 |
Test measures
- Unit tests of the sender and the fallback with a mocked fetch
- Integration test of the channel in auth.otp.send
Risks
- Meta approval is in HOCO's hands
- A message accepted by Meta but not delivered is not detected without a webhook: the SMS option on the code screen covers it
KPI
- Delivered by Sun 6 Dec 2026 within 1 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.
WEB-06 — Reseller web — Notification Centre, action buttons, group preferences, promotion tabs & flash-sale countdown
The reseller-web side of document 03: Notification Centre card on RW-02, grouped dropdown and page with action buttons on RW-11, per-group push switches on RW-12, Promotions / Ventes flash tabs and countdown cards on RW-10.
WEB-22 — Reseller web code screens for WhatsApp
Sign-up and password-reset code screens word themselves from the channel and offer the SMS option.