Decentralized neural data consent for community health research in Kenya.
A patient-facing consent wallet where users store encrypted biosignal data on Filecoin, grant and revoke researcher access via Lit Protocol's programmable conditions, and receive SMS notifications when their data is accessed — mobile-first, bilingual (English / Swahili).
Built for the PL Genesis Hackathon 2026 — Cognitive Sovereignty & Neural Data Rights track.
Watch Demo
CortexVault.Kenya.mp4
- Connect with a wallet address (or use demo mode)
- Upload an EEG session — encrypted with Lit Protocol, stored on Storacha/Filecoin
- Grant a researcher access: set their name, purpose, and an expiry date
- View the full audit log of every access event
- Revoke access at any time — the researcher is blocked immediately
- Receive an SMS: "Dr. Odhiambo accessed your brain data on March 30"
- Connect with a wallet address
- See all datasets patients have granted access to
- Click to decrypt and view (Lit Protocol checks conditions on-chain)
- After revocation, decryption fails with "Access revoked by data owner"
| Layer | Tool |
|---|---|
| Frontend | Next.js 14 + Tailwind CSS + shadcn/ui |
| Storage | Storacha (@web3-storage/w3up-client) |
| Access control | Lit Protocol v8 SDK |
| SMS notifications | Africa's Talking API |
| Demo data | PhysioNet EEG Motor Movement dataset |
| Deployment | Vercel |
app/
├── page.tsx # Landing / language selector
├── patient/
│ ├── page.tsx # Patient dashboard (consents, audit log, ethics)
│ └── upload/page.tsx # EEG upload flow
├── researcher/
│ └── page.tsx # Researcher portal
└── api/
├── upload/route.ts # Storacha upload handler
├── grant/route.ts # Lit Protocol access grant
├── revoke/route.ts # Lit Protocol revocation
└── notify/route.ts # Africa's Talking SMS trigger
components/
├── ConsentCard.tsx # Grant/revoke UI card
├── AuditLog.tsx # Access event trail
├── EthicsPanel.tsx # Ethics disclosure built into the app
├── LanguageToggle.tsx # EN / SW switcher
└── ui/ # shadcn/ui primitives
lib/
├── storacha.ts # Storacha client wrapper
├── lit.ts # Lit Protocol encrypt/decrypt/conditions
├── sms.ts # Africa's Talking client wrapper
└── store.ts # localStorage state (datasets, grants, audit log)
locales/
├── en.json # English strings
└── sw.json # Swahili strings
npm installCopy .env.example and fill in your keys:
cp .env.example .env.local# Storacha (web3.storage w3up)
# Sign up at web3.storage, create a space, then:
# npx w3 key create → STORACHA_KEY
# npx w3 proof create ... → base64 encode → STORACHA_PROOF
STORACHA_KEY=
STORACHA_PROOF=
# Africa's Talking SMS (free sandbox at africastalking.com)
AT_API_KEY=
AT_USERNAME=sandbox
AT_SENDER_ID=CortexVaultLit Protocol (Naga Dev testnet) requires no API key — just install the SDK.
npm run devOpen http://localhost:3000.
No API keys required to explore the app. On the upload page, click Load Demo EEG to use a synthetic biosignal file. Use any wallet address string to log in — the full grant/revoke/audit flow works entirely from localStorage.
CortexVault is built on the principle that individuals own their neural data.
- Researchers must state a purpose and accept a time-limited access window
- Patients can revoke consent instantly at any time
- All data is encrypted at rest; CortexVault never holds decryption keys
- Every access event is logged and the patient is notified by SMS
- Compliant with the Kenya Data Protection Act 2019
MIT © 2026 CortexVault Kenya