All projects

WARMAY — Maternal Emergency Prevention Platform

WARMAY — Maternal Emergency Prevention Platform

CRE & AI Privacy World

What it is

WARMAY is a maternal emergency prevention platform built for Bolivia, where maternal mortality rates remain among the highest in Latin America. The platform combines Chainlink CRE (Compute & Runtime Environment) to orchestrate a 5-step verified subsidy workflow: WorldID ZK proof → Hospital API via DON consensus → Claude AI eligibility analysis → Nullifier check → SubsidyVault.claim() on Sepolia. Mothers receive automatic MOM token airdrops upon completing verified prenatal controls. The app works offline via SMS, supports three languages (Spanish/Quechua/Aymara), and includes a panic button with GPS emergency dispatch. Zero personally identifiable data is stored on-chain — only anonymous nullifier hashes and control types. Built as a full monorepo with Hardhat contracts, Bun backend, CRE TypeScript workflow, and a complete frontend.

How it Works

  • Chainlink CRE Workflow (TypeScript): 5-step orchestration — HTTPClient with DON BFT consensus (5 nodes) calling WorldID API v2, Hospital Mock API (port 3002), Claude claude-haiku-4-5-20251001 LLM-in-the-loop for eligibility, and EVMClient to write on SubsidyVault Sepolia
  • Smart Contracts (Solidity/Hardhat): SubsidyVault.sol with AccessControl + ReentrancyGuard + Pausable, nullifierUsed anti-Sybil mapping, MOM Token caps per control type (PRENATAL 20, PARTO 50, POSTPARTO 30). MockMOMToken ERC20 with faucet. 15 Hardhat tests.
  • Backend (Bun/Express): 6 endpoints — WorldID proxy, claim submit, Twilio SMS emergency dispatch, Claude AI chat with offline fallback, onchain vault stats, healthcheck
  • Frontend: Single-file HTML (1,590 lines), trilingüe ES/QU/AY, offline SMS, panic button with GPS, blockchain hospital checklist
  • CRE simulate: cre workflow simulate warmay-workflow --target staging-settings --broadcast produces verifiable txHash on Sepolia Etherscan

Links

Created by

  • Alejandro Cosulich Arcienega
  • Omar Quispe vargas
  • Jhamil Calixto Mamani Quea