MedSynapse is a decentralized AI platform that securely shares anonymized health data for research.
MedSynapse: Empowering Patients to Own Their Health Data MedSynapse is a blockchain-powered platform redefining how medical research data is shared giving patients full control over their health information while enabling secure, transparent research collaboration.
🎯 The Problem Medical data today is locked in silos hospitals, apps, and devices don’t communicate. Researchers need diverse, real-world data, but patients lose control once their information is shared. medsynapse started with a simple question: what if patients actually owned their health data and got rewarded for sharing it with researchers? turning that into a product meant stitching together smart contracts, decentralized storage, real-time indexing, and a clean react app. here’s the honest version of how it came together.
đź’ˇ The Solution MedSynapse connects patients and researchers through a transparent data marketplace where patients can:
Upload & encrypt their health data on IPFS Approve or deny research access requests Earn MED tokens for sharing Track who used their data and revoke access anytime
Researchers gain access to verified, diverse datasets with transparent consent and blockchain-level security. ⚙️ How It Works Patients: Upload → Earn 10 MED → Approve/deny requests → Track usage Researchers: Browse → Request → Get approval → Access data instantly All permissions are handled by Ethereum smart contracts for total transparency.
🛠️ Tech Stack Blockchain: Ethereum Sepolia (Solidity) Storage: IPFS + AES-256 encryption via Lighthouse Indexing: Envio HyperSync Frontend: React, TypeScript, Tailwind AI: Predictive analytics & insights Token: MED (ERC20)
🌟 Why MedSynapse ✅ True data ownership ✅ Tokenized rewards ✅ Encrypted, verified storage ✅ Real-time activity tracking ✅ Research-grade datasets
🚀 Current Status Live smart contracts on Sepolia Token rewards system active AI analytics dashboard Real-time blockchain indexing Fully responsive web app for patients & researchers
how i built medsynapse (the real story) hi, i’m pablo. medsynapse started with a simple question: what if patients actually owned their health data and got rewarded for sharing it with researchers? turning that into a product meant stitching together smart contracts, decentralized storage, real-time indexing, and a clean react app. here’s the honest version of how it came together.
the idea in one breath patients create consent on-chain, upload encrypted files to ipfs via lighthouse, and earn tokens. researchers request access. an indexer (envio) tracks every event so the app can feel instant. the frontend is react + typescript with wagmi for wallet stuff.
the stack (why it’s there) • react 18 + typescript + vite: fast dev, fewer type-related facepalms. • wagmi v2: wallet connect, reads/writes, multi-chain (i’m on sepolia). • envio hypersync: graphql over indexed chain events so queries take milliseconds instead of seconds. • lighthouse + ipfs: client-side encryption and decentralized storage for sensitive files. • solidity + hardhat: consent and token contracts; permissions live on-chain.
what actually works today • connect wallet, create on-chain consent, see it in a real-time dashboard. • upload encrypted files to ipfs (with progress). • reward contributors with an erc-20. • fast queries via envio; sub-second updates most of the time.
the messy parts i had to fight • vercel builds kept timing out, so i moved to netlify and wrote a tiny config. it’s fine now. • docker + envio: random “postgres connection error.” my fix became a ritual: kill everything, bring up docker, restart the indexer, wait, pray. • schema changes: i added new fields, but old indexed events didn’t have them. some queries returned, some didn’t. the fix was adding sensible defaults and, when needed, reindexing from scratch. • wagmi types: v1 → v2 changes bit me during ci builds. a couple of ts-ignore band-aids kept me moving. longer-term, i’ll clean this up. • bundle size: wagmi + viem + lighthouse are chunky. manual chunking in vite helped.
small wins that felt big • react query caching and gentle polling made the app feel “live” without hammering anything. • a local-storage fallback means contributors still see their uploads if the indexer is down. • explicit gas limits stopped a few “why did this fail?” moments.
what i learned (the hard way) • web3 dev is half code, half infrastructure babysitting. • docker is both the hero and the villain. • real-time is “easy” to demo and hard to keep stable. • typescript nags for a reason. it saves future me, even when present me grumbles. • platform pivots happen. choose the thing that ships.
what’s still rough • ocasional envio flakiness. i need better retries and backups. • a few wagmi type workarounds to remove. • bundle size could be leaner. • error messages need to be more human than “something broke.”
what’s next • fix types properly and add unit tests. • add retry logic and background reindex safeguards. • shrink bundles with stricter imports. • better docs so contributors can run it without my “restart spell.”
why i kept going
because the mission matters. giving people control over their health data is worth the headaches. every time the dashboard lit up from a fresh on-chain event, it felt like proof we’re on the right track.

