WEB-01 — Reseller web — foundation & account flows
Responsive Next.js app shell, sign-in, sign-up with OTP and account claim, password reset, invitation landing /i/{code}.
| Field | Details |
|---|---|
| Task code | WEB-01 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Sun 29 Nov 2026 |
| Due | Mon 30 Nov 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 1 person-day(s) planned · 4 from scratch · size S |
| Area · app | Reseller web · web |
| Depends on | DSH-01, DES-20, SRV-16 |
| Unblocks | WEB-02 |
| Milestones | — |
Summary
Responsive Next.js app shell, sign-in, sign-up with OTP and account claim, password reset, invitation landing /i/{code}.
Description
The reseller web is the team's responsive web version of the reseller app (RWA-01, RWA-02), delivered in V1 right after the back-office, before the client acceptance and using the same account, cart and orders as the mobile app. This task builds its foundation at app.hoco.dz: the responsive Next.js shell (header with search, cart badge and account menu on desktop, bottom navigation on small screens), guest mode (catalog routes reachable without a session, prices locked, AUTH-10), and the account flows of RW-01 — sign-in by phone + password, sign-up with OTP, store details, wilaya/commune and the declared customer type Super-gros, Demi-gros or Détail (AUTH-03, AUTH-11), account claim of a field prospect (AUTH-05), password reset by OTP (AUTH-04), the pending-validation state (browse, no ordering), and the invitation landing /i/{code} with the code prefilled (IVT-04). Out of scope: catalog pages (WEB-02) and the WhatsApp button (WEB-05).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | apps/web shell: layout, header, responsive bottom navigation, footer, @hoco/ui tokens from DES-20, next-intl fr (ar/en prepared) | Anis |
| 2 | Session handling with the .hoco.dz cookie, protected-route middleware with return URL, guest context for public routes | Anis |
| 3 | Sign-in page « Se connecter » (phone + password) with lockout and status messages (ACCOUNT_SUSPENDED, ACCOUNT_DISABLED) | Anis |
| 4 | Sign-up wizard: phone → OTP (resend cooldown) → store details, wilaya/commune → customer type cards with explanations → password → optional invitation code | Anis |
| 5 | Account claim step when the phone matches a field prospect (« Nous avons trouvé votre magasin ») | Anis |
| 6 | Password reset by OTP and pending-validation banner (« Votre compte est en cours de validation ») with ordering locked | Anis |
| 7 | Invitation landing /i/{code}: inviter and store prefill, CTA install the Android app or continue on the web with the code | Anis |
| 8 | Guest banner and sign-up prompts replacing price and add-to-cart areas | Anis |
| 9 | Design QA of RW-01 and the shell at mobile, tablet and desktop widths | Akram |
Deliverables
- apps/web/src/app/[locale]/{layout.tsx,(auth)/{login,signup,reset-password}/page.tsx,i/[code]/page.tsx}
- apps/web/src/features/auth/ (sign-up wizard, OTP input, claim step)
- Dokploy apps hoco-web-staging and hoco-web serving app.hoco.dz
Acceptance criteria
- A sign-up cannot complete without choosing a customer type; the chosen type is shown in the profile (AUTH-03, AUTH-11)
- A visitor without an account can open the catalog routes; protected routes redirect to sign-in and back (AUTH-10)
- Signing up with the phone of a field prospect claims the existing store instead of creating a duplicate (AUTH-05)
- A pending-validation reseller sees the banner and cannot reach checkout (AUTH-08)
- Opening /i/AB12CD34 on desktop shows the sign-up with the code prefilled and attributes the account to the inviting delegate (IVT-04)
- Layouts work from 360 px to 1440 px without horizontal scroll
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| RWA-01 | Responsive web version of the reseller app with V1 feature parity (account, catalog, cart, orders, promotions, finance, support, notifications) | V1 |
| RWA-02 | Same account, cart and orders as the mobile app (single backend, no web-only rules) | V1 |
| 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 + password) and password reset by OTP | V1 |
| AUTH-05 | Account claim: a prospect created in the field is activated by the reseller without creating a duplicate | V1 |
| IVT-04 | The link opens the right app or store and attributes the sign-up to the inviting delegate | V1 |
| AUTH-10 | Guest mode: the reseller app and web can be browsed without an account; prices stay hidden until the visitor signs up and declares a customer type | V1 |
| AUTH-11 | Customer type declared at sign-up, reviewed at account validation; any later change is made by the back-office and audited | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| RW-01 | Sign in, sign-up (with customer type), OTP, password reset — and guest browsing | RW |
API surface
| Endpoint group | Operations |
|---|---|
| Authentication & sessions | 10 |
| Invitations & attribution (public + reseller) | 3 |
Test measures
- Playwright e2e: guest browse → sign-up with OTP (simulator) → pending banner → validation in the back-office → checkout unlocked
- Playwright e2e at mobile viewport for the sign-up wizard
- Manual cross-browser check (Chrome, Firefox, Safari mobile)
KPI
- Delivered by Mon 30 Nov 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.
DSH-12 — Back-office administration pages
Users, roles & permissions matrix, activity log, business settings, reference lists, app versions, data imports.
WEB-02 — Reseller web — home, catalog, product, favorites
Home with banners, catalog with advanced sidebar filters (facets with counts), search, product detail, favorites — guest browsing without prices.