Logo Lanfrica

baiwadda2003-prog/Gambia-numberfix

Domain:

digital infrastructure

Record type:

software
Creator:
bai
Host:
# 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 …