How this was made

NAFDAC status, joined to Nigerian pharmacy prices. Independent, $0 a month, not endorsed by NAFDAC or any pharmacy here. Code MIT, data CC-BY-4.0. The register: the agency Dora Akunyili led, 2001–2008. Her tribute is on the front page.

03 · catalogue Rebuild. Register is judge.

  • Linker tool. Rules: name overlaps, strength agrees, form compatible.
  • Authority: the register. Not the shop's wording.
  • +359 products → 1,433.
  • Priced at freeze: 335. A catalogue is not a shop shelf.

04 · scrape Scrape. API first.

  • API first: WooCommerce Store API, Shopify /products.json.
  • No API? HTML.
  • Polite: 2 s per host. Python, psycopg. Named User-Agent.
  • Product and price fields only.

05 · route MedPlus. Wrong door, right door.

  • Category pages: same 20 links, every page. Dead end.
  • Drugs route: 20 per page. Page 70: 16 links. Page 71: empty.
  • 128 → 1,396 products.
  • Night run: 1 h 50 m → 2 h 50 m.

06 · refusals Refusal = failure.

  • 403, 429: stop. Failed row written.
  • Night fails: over 10% of pages fail, or a full sweep returns under 1,000 records.
  • Both thresholds: judgement, not measurement. The code says so.

09 · views Answers are views.

  • SQL on PostgreSQL: latest, cheapest, two-shop, not-active, 7-day.
  • 2,800 listings. 559 attached. 261 price cells. 44 comparisons. 154 not active.
  • 7-day: 3 products. Works. Market quiet.

10 · index Index refreshed by machine.

  • mv_drug_price_index. 427 rows.
  • Refresh: pipeline, not person. A stale index looks like a quiet market.

11 · audit Page proves itself.

  • Build renders. Re-reads every query. Compares. Disagreement: nothing written.
  • Last line of the build: 3,791 numbers checked, 0 unexplained.

12 · every price Second page. Every price.

  • Filters on. Each row → the shop page it came from, the register record behind it.
  • Links: sources inspectable. Parsing: not proven.

15 · freeze Then frozen.

  • Nightly run = standing promise. Unwatched free tier: stale, unnamed.
  • 12–15 Nov: 5 to 42 changes a night, against 2,800.
  • Stopped 16 Nov 2026. Newest price 15 Nov. Schedule off.

16 · export Export before switch-off.

  • 8 tables, 36,936 rows.
  • PostgreSQL dump. CSV per table. Written schema record. Manifest: one checksum per file.
  • Published twice: a release on the code repository, a dataset on Hugging Face. Both checked against the manifest on every push.

17 · restore Restore. Then trust the archive.

  • Every push: empty PostgreSQL 17, restore, compare manifest. 22 checks.
  • 1,433 embeddings return as 384-dim vectors.
  • Docker, then the restore check. Throwaway database.
  • Proves the archive works. Not parser correctness. That is 13.

18 · decisions Decisions. Each with its cost.

One decision per row.
DecisionChosenCost
SchedulerGitHub Actions cron, not PrefectFree and unlimited on a public repository. No retry engine. No run history beyond the workflow page.
DatabaseNeon, not SupabaseThe free tier does not pause after idle days. It does suspend on inactivity — hence the export.
MedPlus coverageA full sweep every night, not a rotating windowAbout 68 minutes a night. The whole catalogue, not a quarter.
What a comparison meansTwo pharmacies publishing a price for the same productUnconfirmed stock still counts. A caveat on the page, not a narrower count.
Inactive licencesLabelled, not hiddenThe finding stays visible, and so does the reading it rests on.
What was not builtNo warehouse layer, no ORM, no APISQL files and scripts. A rebuild means running them in order.