-
No medicine should expire while someone needs it.
-
Medicine is missing in one place and expiring in another.
-
Found it? Reach out to the clinic in one tap.
-
Each need gets ranked matches: Najjera covers all 500 tablets, Ggaba is closer but only has 200.
-
Built for the phone in the storeroom.
-
Anyone can browse the available surplus, expiring first.
-
Clinics list what they have too much of and what they need. Sawa does the matching.
Inspiration
Somewhere a clinic is throwing away antibiotics that expired on the shelf, while a few kilometres away another clinic has run out of them. Studies in Ethiopian public health facilities found that 4.9 to 8 % of medicine stock is lost to expiry, and the WHO estimates that around two billion people lack reliable access to essential medicines. Part of the medicine that's missing already exists. It's just in the wrong building.
What it does
Clinics post surplus (with expiry date) and needs (with urgency), picked from the WHO Essential Medicines List so both sides mean the same product. Sawa pairs every need with every matching surplus and ranks them by coverage, expiry, real driving distance and urgency. In our demo, Makindye Health Centre in Kampala needs 500 amoxicillin tablets. Ggaba is closest at 7.8 km but only has 200, Najjera is 16.6 km away and can cover everything, so it ranks first.
The clinic in need sends a request, the other side accepts, the quantity gets reserved, and they arrange the pickup by email. Anyone can browse the available surplus without an account, and the landing page counts hand-overs live from the database.
A lot of stock still lives on paper, so clinics can photograph or scan an MSF stock card. Sawa turns it into an editable table, matches it to the right medicine in the catalogue, and forecasts how long the stock will last based on actual consumption and batch expiry. If it runs out soon, one tap creates a request. If a batch will expire unused, one tap offers it to other clinics.
How we built it
Next.js 16 on Vercel, and Supabase for everything else (Postgres, Auth, Row Level Security, Realtime, Storage). There's no server of our own: matching, ranking and the request flow are SQL functions. The 1,371 products are parsed from the WHO eEML, road distances come from an Edge Function using OSRM, and the stock card scanner uses an OpenAI vision model with a strict output schema, plus a second call that picks the matching product from the whole catalogue (also from French or Portuguese names and MSF codes).
Challenges we ran into
The WHO list has no API, so we parse its HTML. One line like "dispersible tablet: 250 mg; 500 mg" becomes several products, and units have to be guessed from free text.
We built too many screens: a transfers page with a map, a "For you" feed, an inbox, a messages page. In the end everything about one medicine moved onto one card.
Our first version let two clinics get an accepted request for the same tablets. Now accepting reserves the quantity and locks the rows while it checks.
Handwritten stock cards are messy: ditto marks, crossed-out numbers, signatures across rows. The model must never fill in a missing number by doing the math itself. It copies what's written and flags rows where the balance doesn't add up. For the forecast, expired batches don't count as stock, and batches are used up first-expiry-first-out, so "lasts until" never goes past the expiry date.
Accomplishments that we're proud of
The whole loop works with real data, from a paper stock card to a listing to the confirmed hand-over, live on both sides. It's built for phones first. And one SQL call resets a full demo city of 8 clinics in Kampala.
What we learned
Postgres can carry far more of an app than we expected. Getting the data in (catalogue, distances, paper stock cards) is harder than the matching. And deleting screens helped more than adding them.
What's next for Sawa
A pilot with real clinics in Kampala, translations for the languages stock cards are written in (French, Portuguese), and tracking stock over repeated scans instead of one card at a time.
Built With
- deno
- leaflet.js
- next.js
- openai
- openstreetmap
- postgresql
- react
- supabase
- tailwindcss
- typescript
- vercel