Logo Lanfrica

baiwadda2003-prog/Gambia-numberfix

Domaine:

digital infrastructure

Type de record:

software
Créateur:
bai
HĂ´te:
# Gambia NumberFix 🇬🇲 Converts eligible Gambian mobile numbers from the old 7-digit format to the new 9-digit format for the Phase 1 migration (begins 4 September 2026). ## Running it ```bash npm install npm run dev # localhost npm test # runs the engine test suite (vitest) npm run build # production build ``` This was built without network access on the build machine, so `npm install` has not been run here — do that first. The core engine logic was verified independently against Node's TypeScript loader before packaging; see "What's been tested" below. ## ⚠️ The one thing you need to resolve before this is fully correct **We do not have verified old-number ranges per operator.** The spec's rules (QCell → 83, Comium → 86, Africell → 87) tell us the *migration prefix*, but not which 7-digit numbers belong to which operator in the first place. Without that, a bare 7-digit number like `3771234` cannot be auto-classified — doing so would mean guessing, which the spec explicitly forbids. So, as built: **every 7-digit number is routed to "Needs review" and the person is asked to confirm the network themselves** (a button/dropdown, right there in the result). Once you have official PURA range data, add it to `src/lib/numbering-rules/rules.json` (there's a `rangesConfigured` flag already there for this) and update `detectOperator.ts` to match against it — that's the only file that needs to change. Everything else — the UI, the bulk table, the CSV export — will keep working unmodified, they just won't need to show the manual picker anymore. Already-converted numbers (9 digits starting with 83/86/87) and Gamcel/Gamtel exclusion are handled automatically since those don't require guessing. ## Architecture ``` src/lib/numbering-rules/ the ONLY place operator/prefix data lives (rules.json) src/lib/engine/ pure functions: normalize -> validate -> detectOperator -> migrate -> pipeline src/lib/files/ CSV parsing/export …