HOCO B2B

Overview

What the HOCO B2B ecosystem is, who builds what, where everything lives and how to read these docs.

HOCO distributes phone accessories — HOCO, ACEFAST and BOROFONE — to shops across Algeria. Today the network runs on phone calls, WhatsApp and spreadsheets: resellers order by message, delegates report their day verbally, stock and payments are reconciled by hand. The project replaces that with one platform and one source of truth (cahier §1).

These docs are the team's working surface for that project: what we build and why (PRD), exactly how it must behave (SRS), how the apps talk to the server (API reference), what every screen does (design), how we work, and who delivers what, when (the plan).

The ecosystem

DeliverableForBuilt byStackRepository
Central API (@hoco/server)Every appAnisExpress 5, oRPC contract-first REST + OpenAPI 3.1, Prisma 7, PostgreSQL, Redis/BullMQ, Better AuthAnisBetehi/hoco
Back-office (@hoco/dashboard)HOCO staff — 6 internal rolesAnisNext.js 16, Tailwind 4, TanStack Query/TableAnisBetehi/hoco
Reseller web (@hoco/web)Resellers on a computerAnisNext.js 16 — same API, same account, same cart as the appAnisBetehi/hoco
Reseller appShop ownersImadFlutter (Android first)hoco-mobile (Imad's account)
Delegate appField sales delegatesImadFlutter, offline-firsthoco-mobile
Design of all of the aboveEveryoneAkramClaude Design — design system firstClaude Design project
These docs (@hoco/docs)The team and HOCOAnisFumadocs, deployed later on the VPSAnisBetehi/hoco

The team

PersonRoleOwnsStart here
AnisFull-stack developerServer, back-office, reseller web, docs, DevOps, the client relationshipAnis's tasks
ImadMobile developer (Flutter)Reseller app and delegate appImad's tasks · Mobile guide
AkramUI/UX designerDesign system, every interface, design QA, training and store assetsAkram's tasks · Design plan

How the work is sequenced

V1 takes three months from design to deployment: from 18 October 2026 to mid-January 2027. Production go-live is at the start of January, followed by a two-week pilot; generalisation and V2 come after. Right now the team writes and validates these docs. No application code is written until they are done.

Three tracks start on day one and meet at the API contract and the designs:

  1. Anis defines the server's services, then the database, then every API endpoint with its request and response — published as an OpenAPI document with a mock server — so the mobile work is never blocked on server code (SRV-01 → SRV-02 → SRV-03).
  2. Imad builds the Flutter foundations that need no API (repository, core HTTP layer, localisation, the design system as soon as Akram's components exist), then generates the API client from the contract and builds against the mock server.
  3. Akram designs for 21 working days: the design system first (days 1–4), the screen inventory validated with the developers (day 5), then the reseller app, the delegate app, the back-office and the reseller web, and the handoff (day 21).

119 open tasks · 173.75 d of planned effort (434.25 d from scratch) · plan ends 22 Feb 2027

PhaseEffortStartEnd
P0 — Foundations (cadrage, UX/UI, architecture & contract)36.25 d18 Oct 202616 Nov 2026
P1 — V1 build & integration73 d08 Nov 202627 Dec 2026
P2 — Acceptance, go-live & pilot27.5 d23 Dec 202614 Jan 2027
P3 — Generalisation (after the 3 months)10.5 d14 Jan 202724 Jan 2027
P4 — V2 evolutions26.5 d21 Jan 202722 Feb 2027

3-month frame: design → development → deployment — deadline 17 Jan 2027.

DateMilestoneTargetReached when these tasks end
18 Oct 2026Cadrage validated — validation sheet signed—PRJ-03
18 Oct 2026API contract v1 published (OpenAPI + mock server)—SRV-03
19 Oct 2026Server V1 feature-complete—SRV-26, SRV-40
21 Oct 2026Design system v1 ready (tokens + components)—DES-04
22 Oct 2026Screen inventory frozen—DES-05
29 Oct 2026Reseller app designs ready for client review—DES-10
05 Nov 2026Delegate app designs ready for client review—DES-14
08 Nov 2026Mobile foundations ready—MOB-11
12 Nov 2026Back-office designs ready for client review—DES-19
16 Nov 2026Design handoff complete—DES-21
03 Dec 2026Back-office and reseller web V1 feature-complete—DSH-12, WEB-05, WEB-06
15 Dec 2026Mobile apps V1 feature-complete—MDA-12
22 Dec 2026Staging integration complete—MOB-14, SRV-28
28 Dec 2026Acceptance report (PV de recette) signed—QA-02
29 Dec 2026Production go-liveon time — 17 Jan 2027LCH-01
30 Dec 2026Pilot startson time — 17 Jan 2027LCH-02
14 Jan 2027Pilot go / no-go—LCH-03, LCH-03B
21 Jan 2027Generalisation complete—LCH-05
22 Feb 2027V2 delivered—SRV-38, DSH-21, MDA-20, WEB-20, DQA-12

The timeline shows every task on the calendar; progress shows what is actually done.

Decisions that shape everything

DecisionWhyWhere
REST + OpenAPI, contract-first with oRPC — not tRPCThe mobile apps are Flutter; Dart generates its client from OpenAPI while the Next apps keep end-to-end typesArchitecture › ADR-002
One central API; the Next apps hold no business logicOne set of rules for four clientsADR-003
Offline-first delegate app with idempotent replayField networks are weak; nothing may be lost or duplicated (cahier §7.3)Offline sync design
Money in integer centimes, dates in UTC, business days in Africa/AlgiersNo rounding drift, no day-boundary bugsADR-011
French first, Arabic and English preparedCahier §9ADR-014
V1 = the cahier's recommended scope (§14.1) plus after-sales (SAV) and returns; loyalty, packs, detailed credit and integrations in V2Ship the field-to-order loop first, with a clean way to handle problems after deliveryScope

Product rules decided by the team (17 Oct 2026)

These complete the cahier and apply to every app:

RuleConsequence
Three prices per product — super-gros, demi-gros, détailEach reseller declares their customer type at sign-up (confirmed at validation) and sees only that price (PRC-02, AUTH-11)
Guest browsing without pricesAnyone can open the reseller app or web and browse; prices appear after sign-up (AUTH-10)
Availability, never quantitiesResellers and guests see En stock / En rupture only; quantities live in the back-office (STK-07)
Every order is confirmed by a personNo automatic confirmation — the back-office works an "orders to confirm" queue (ORD-14)
Live order statusReseller screens update in real time and every status change is notified (ORD-15)
Advanced filtersPrice range, category and sub-category, brand, product attributes, availability, promotion — on web and mobile (CAT-12)
Regional WhatsApp supportA fixed WhatsApp button opens the support number of the user's region (SUP-05)
After-sales service and returns in V1Claims on delivered orders handled in the back-office; cancellations and returns put quantities back in stock automatically (SUP-04, ORD-13)

Reading guide

SectionWhat it answers
Timeline · Progress · Team tasksWhen, who, what is done
Ways of workingRepositories, branches, reviews, the API-contract loop, rituals, definition of done
PRD · User flowsWhat we build and why; every journey end to end
SRSRequirements, lifecycles, business rules, permissions, notifications, acceptance scenarios, data model, API, integrations, operations, decisions
ArchitectureContainers, deployment and the decision records
DesignDesign plan, design system, reference screens, inventory and every screen's specification
MobileThe Flutter side in depth
Planning methodHow effort becomes dates

Source

Everything traces back to the client's Cahier des charges — Écosystème B2B HOCO, version 1.0 (July 2026), section by section — see source traceability. Anything not described there is a change request (process).

On this page