About
## The problem it solves
India's drug regulators publish failed medicine batches as PDFs, tables and press notes, days apart, in formats no pharmacy software can read.

On **2 October 2025** Tamil Nadu declared batch **SR-13** of COLDRIF cough syrup adulterated (48.6% w/v diethylene glycol) after child deaths. WHO listed it on 13 October. Every state rewrote the same alert by hand, while the pack's printed expiry ran to April 2027. A chemist at the counter or a parent at 11 PM had no way to check the bottle in their hand.
**Nazar** turns those scattered notices into one live, verifiable feed. Type or scan the batch number from the pack and get one of four honest answers in under three seconds:
- **Flagged** (red): a named regulator listed this exact batch, with the notice, date and reason in the regulator's words.
- **Retracted** (amber): an alert was withdrawn or corrected; the original stays on record.
- **No alert found** (slate grey, never green): always shown with "this is not a safety certificate".
- **Can't tell** (amber): the batch could not be read, or only a look-alike matched (5R-13 vs SR-13). It asks you to re-read the pack and never shows a flag.
## Everything is real
This is not a mock-up with sample rows. **Every alert in Nazar comes from a real regulator document** that the pipeline downloaded, hashed and read:
- **1,404 real alerts from 21 real notices** published to Arkiv Tiramisu, from CDSCO (its online NSQ portal and its alert PDFs), Tamil Nadu Drugs Control, Maharashtra FDA and WHO Medical Product Alerts.
- **Real batches you can check right now:** `SR-13` (COLDRIF, WHO Medical Product Alert N°5/2025), `TG25-2281A` (Levcon-M, CDSCO: spurious), `R01GL2523` and `LSL25160` (Respifresh TR and ReLife), `(N)25567` (sodium chloride injection, CDSCO).
- **Every alert traces back to its source:** the regulator's URL, the SHA-256 of the exact bytes downloaded, and an Arkiv entity created by Nazar's publisher wallet. Click "View regulator notice" on any result to open the original.
- **It keeps running on its own:** a worker fetches CDSCO every 6 hours and the states and WHO every 3 hours, renews a heartbeat on Arkiv every 5 minutes, and an hourly monitor checks that SR-13 is still flagged.
- **Honest labels:** a handful of hand-reviewed rows (the Oct 2025 DEG syrups) are labelled as source `curated` with their source links, and machine-read rows say "awaiting pharmacist confirmation". Demo data only appears if you are offline on a first visit, and the status pill then says "Offline · demo data".
## How it works

## Who uses it
- **Chemists:** check at the counter, or sweep up to 500 batches from a stock CSV and print a return sheet.
- **Families:** keep a Cabinet of the medicines at home, re-checked on every visit, with a **Child Shield** banner for paediatric products.
- **AI assistants:** a read-only MCP server lets Claude and other assistants answer "Is batch SR-13 of Coldrif flagged?" with the same four states and the Arkiv proof.
- **Anyone building on it:** a REST API, RSS/Atom/JSON feeds and the raw entities on Arkiv.
The app has a Hindi mode, reads QR and Data Matrix codes and pack labels on the device, and keeps checks, the cabinet and photos on the device.
Every answer carries its chain of custody: regulator document → SHA-256 → Arkiv notice entity → alert entity, created by Nazar's publisher wallet. Anyone can verify it without trusting Nazar.
## Challenges I ran into
**1. Reading regulator PDFs reliably.** CDSCO's monthly lists change layout, merge cells and wrap batch numbers across lines, and a wrong batch number is worse than none. We made extraction deterministic first: PDF table geometry plus 6 per-regulator templates, OCR only for scans, and a grounded LLM only for rows the parser rejects, where every value it returns must appear in the source text. Rows get confidence tiers (≥ 0.90 auto, 0.60–0.89 labelled "machine-read", below 0.60 held for a curator), backed by golden tests.
**2. Never publishing a duplicate.** Alerts are `readonly` on Arkiv, so a duplicate can never be deleted. Each alert carries `rid = hash(source sha, row, parser)`, publishing is a dry run by default, and a fresh server rebuilds its ledger from Arkiv before writing. When we tested that, it adopted every published alert by row id and published zero duplicates.
**3. Atomic notice → alerts writes.** We wanted a notice and its alerts to land together, already linked. `predictEntityKeys` derives keys from the account nonce, so any concurrent write breaks the prediction. We serialise writes behind one mutex and send each notice as `executeBatch` chunks.
**4. Gas was much higher than our first estimate.** A tiny test entity cost ~136k gas, but a real alert (25 attributes, ~1 KB payload) costs ~210k, because each attribute is an ABI tuple. Our balance pre-check under-reserved by ~35%. The SDK has no estimate call, so we built a calldata-capturing viem transport and call `eth_estimateGas` ourselves.
**5. Pagination broke on a 2-second chain.** `page.next()` failed with "cursor belongs to a different query, block or select" whenever a block passed between pages. We pin every page with `.atBlock(page.blockNumber).cursor(page.cursor)`.
**6. "No alert" must not read as "safe".** The hardest product problem was honesty: no green, a look-alike guard (0/O, 1/I/L, 5/S, 8/B) that never shows a flag, and "not a safety certificate" on every clean result.
**7. Geo-blocks.** The Telangana, Karnataka and Kerala regulator sites are blocked outside India or down, and our worker runs in Singapore, so those sources stay disabled for now.
Every Arkiv issue is written up with versions and repro steps in [`arkiv/friction.md`](https://github.com/pranshurastogi/Nazar/blob/main/arkiv/friction.md).
Screenshots
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.










