- Track: DLT for Operations
- Hashgraph Certificate
- Pitch Deck
- Demo Video
- Hedera Integration Summary
- Deployment and Setup Instructions
- Architectural Diagram
- Deployed Hedera IDs
- Project Structure
MediSphere consists of 11 integrated services solving specific healthcare challenges:
- LifeChain - Health Records Management (HCS + IPFS + NFTs)
- PersonaVault - Decentralized Identity (Hedera DID + Verifiable Credentials)
- CareXpay - Token-Based Payments (HTS fungible tokens + HBAR)
- DataBridge - Consent-Based Data Exchange (8 actor types, JWT access control)
- HealthIQ - AI Health Assistant (Personalized insights, conversational AI)
- ClaimSphere - Insurance Claims (HCS verification + automatic HTS payouts)
- ImpactGrid - Health Campaigns (Custom HTS tokens, batch rewards)
- GovHealth - Compliance & Licensing (IPFS certificates, HCS regulatory logs)
- MediTrace - Pharmaceutical Supply Chain (QR codes, anti-counterfeiting)
- MedFlow - Appointment Management (Scheduling with HCS logs)
- BlockExplorer - Public Data Verification (Mirror Node indexer, statistics)
MediSphere integrates four core Hedera services to deliver secure, transparent, and affordable health data management across Africa. The platform emphasizes cost-efficiency and scalability for resource-limited healthcare systems.
Why HCS:
HCS offers predictable micro-fees ($0.0001/message) for immutable logging, ensuring compliance and auditability at a fraction of cloud costs ($0.10–$0.30/GB). This enables even small clinics to maintain secure, verifiable audit trails.
Transaction Types Executed:
TopicMessageSubmitTransaction- Submit audit log entries to HCS topicsTopicCreateTransaction- Initialize platform-wide audit topic during deploymentTopicInfoQuery- Retrieve topic metadata and verify topic configuration
Economics:
A hospital logging 1,000 events/month pays $0.10, versus $50–$200 using centralized systems — a 500–2000× cost reduction. With 10,000+ TPS, scalability is guaranteed.
Use Cases:
- Health record updates
- Consent trails
- Insurance claim tracking
- Campaign participation logs
- Regulatory compliance and licensing
Why HTS:
With $1 token creation and $0.001 transfer fees, HTS enables micro-payments for campaigns, insurance payouts, and patient rewards. ABFT finality ensures instant settlement — essential for time-critical healthcare operations.
Transaction Types Executed:
TokenCreateTransaction- Create fungible tokens for health campaigns (e.g., vaccination rewards)TokenMintTransaction- Mint NFTs for vaccination certificates and achievement badgesTokenAssociateTransaction- Associate users with platform tokens before first transferTransferTransaction- Distribute campaign rewards, insurance payouts, and peer-to-peer paymentsTokenBurnTransaction- Burn redeemed reward tokens to maintain economic balanceTokenInfoQuery- Query token metadata, supply, and treasury account
Economics:
Rewarding 100,000 users costs $101 total vs $2,000–$3,000 via traditional processors — 95%+ savings and real-time settlement.
Use Cases:
- CARE token (native currency)
- Campaign rewards
- Automated insurance payouts
- NFT vaccination certificates
- Tokenized analytics access
- Peer-to-peer payments
Why Mirror Node:
Provides free REST API access to verified blockchain data for our BlockExplorer, enabling public record verification without on-chain query fees. Data updates within 2–3 seconds of consensus.
Endpoints:
/topics/{topicId}/messages, /transactions/{transactionId}, /accounts/{accountId}/tokens, /tokens/{tokenId}, /accounts/{accountId}
Economics:
Zero-cost indexing vs $50–$500/month for other APIs. Supports 10,000+ messages/day, making transparency scalable and sustainable.
Use Cases:
- Real-time HCS message polling and indexing
- Public record verification via hash lookup
- Platform-wide statistics dashboard (30-day activity, record distribution)
- Top providers leaderboard (incentivizes quality care)
- Privacy-preserving indexing (no PHI stored, only metadata)
- HashScan integration for blockchain verification links
Why Hedera DID:
Provides free, decentralized identity management, solving Africa’s credential fraud problem. DID setup costs ~$0.50 versus $10,000+ for PKI systems, using W3C Verifiable Credentials for global interoperability.
Transactions:
TopicMessageSubmitTransaction, TopicCreateTransaction, DID document publishing & resolution
Economics:
10,000 practitioners = $500/year, vs $50k–$100k using legacy systems — a 99% reduction.
Use Cases:
- Doctor license credential issuance
- Facility accreditation certificates
- Lab certification credentials
- Pharmacy licensing
- Patient identity verification (GDPR/HIPAA compliant)
- Cryptographic proof of qualification without exposing sensitive data
Ensure you have the following installed and configured:
- Node.js v18.0.0 or higher (Download)
- MongoDB v6.0 or higher (Download)
- Hedera Testnet Account with HBAR balance (Create Free Account)
- Pinata Account for IPFS storage (Sign Up)
- Cloudinary Account for media uploads (Sign Up)
git clone https://github.com/yourusername/medisphere.git
cd medisphere# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Create environment file
cp .env.example .envConfigure Environment Variables (Edit backend/.env):
Initialize Hedera Resources (First-time setup):
# Create HCS audit topic (note down the topic ID)
node scripts/createHCSTopic.js
# Create NFT collection for vaccination certificates (note down the token ID)
node scripts/createNFTCollection.js
# Update .env with the generated IDs# Navigate to frontend directory (from project root)
cd ../frontend
# Install dependencies
npm install
# Create environment file
echo "NEXT_PUBLIC_API_URL=http://localhost:4000/api" > .env.localOpen 3 terminal windows:
Terminal 1 - MongoDB (if not running as service):
mongod --dbpath /path/to/your/data/directoryTerminal 2 - Backend API Server:
cd backend
npm startExpected output:
✅ MongoDB connected
✅ Hedera client initialized (Account: 0.0.YOUR_ACCOUNT_ID)
✅ Server running on http://localhost:4000
✅ API Documentation: http://localhost:4000/api/docs
Terminal 3 - Backend Indexer (Optional but recommended):
cd backend
npm run indexerTerminal 4 - Frontend Development Server:
cd frontend
npm run dev- Access Frontend: Open browser to
http://localhost:3000 - Access API Docs: Navigate to
http://localhost:4000/api/docs - Backend API: Express.js REST API on
http://localhost:4000/api
┌─────────────────────────────────────────────────────────────────────────┐
│ MEDISPHERE ARCHITECTURE │
│ (11 Integrated Services) │
└─────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────┐
│ FRONTEND (Next.js/React) │
│ │
│ Row 1: Core Health Services │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ LifeChain │ │ PersonaVault │ │ DataBridge │ │ HealthIQ │ │
│ │ (Records) │ │ (DID/VC) │ │ (Data Share) │ │ (AI Chat) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ Row 2: Payment & Incentive Layer │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ CareXpay │ │ ClaimSphere │ │ ImpactGrid │ │ MedFlow │ │
│ │ (Payments) │ │ (Insurance) │ │ (Campaigns) │ │(Appointments)│ │
│ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ Row 3: Compliance & Verification │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ GovHealth │ │ MediTrace │ │BlockExplorer │ │
│ │ (Compliance) │ │ (Pharma QR) │ │ (Verifier) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ [HTTP/HTTPS API] │
│ ↓ │
└──────────────────────────────────────────────────────────────────────────┘
│
↓
┌──────────────────────────────────────────────────────────────────────────┐
│ BACKEND (Express.js/Node.js) │
│ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ API Layer (REST) │ │
│ │ /auth /records /persona /databridge /healthiq /payments │ │
│ │ /claims /impact /gov /meditrace /medflow /explorer │ │
│ └────────────────────────────┬────────────────────────────────────────┘ │
│ ↓ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ Business Logic Controllers │ │
│ │ AuthController │ RecordController │ DatabridgeController │ etc... │ │
│ └────┬──────────────────┬────────────────────┬─────────────────────┬──┘ │
│ │ │ │ │ │
│ ↓ ↓ ↓ ↓ │
│ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ MongoDB │ │ IPFS │ │Cloudinary│ │ Hedera │ │
│ │ (User │ │ (Pinata) │ │ (Media) │ │ Client │ │
│ │ Data) │ │(Records) │ │(Uploads) │ │ │ │
│ └─────────┘ └──────────┘ └──────────┘ └────┬─────┘ │
│ │ │
└───────────────────────────────────────────────────────────────────┼──────┘
│
↓
┌──────────────────────────────────────────────────────────────────────────┐
│ HEDERA HASHGRAPH NETWORK │
│ (Testnet) │
│ │
│ ┌────────────────────┐ ┌────────────────────┐ ┌────────────────────┐ │
│ │ Consensus Service │ │ Token Service │ │ Mirror Node API │ │
│ │ (HCS) │ │ (HTS) │ │ │ │
│ │ │ │ │ │ │ │
│ │ ┌────────────────┐ │ │ ┌────────────────┐ │ │ ┌────────────────┐ │ │
│ │ │ Audit Log │ │ │ │ CARE Token │ │ │ │ Topic Messages │ │ │
│ │ │ Topic │ │ │ │ (Fungible) │ │ │ │ Indexing │ │ │
│ │ │ 0.0.XXXXXX │ │ │ │ │ │ │ │ │ │ │
│ │ └────────────────┘ │ │ └────────────────┘ │ │ └────────────────┘ │ │
│ │ │ │ │ │ │ │
│ │ ┌────────────────┐ │ │ ┌────────────────┐ │ │ ┌────────────────┐ │ │
│ │ │ DID Identity │ │ │ │ Vaccination │ │ │ │ Transaction │ │ │
│ │ │ Topics │ │ │ │ NFTs │ │ │ │ History Query │ │ │
│ │ │ │ │ │ │ 0.0.YYYYYY │ │ │ │ │ │ │
│ │ └────────────────┘ │ │ └────────────────┘ │ │ └────────────────┘ │ │
│ │ │ │ │ │ │ │
│ │ ┌────────────────┐ │ │ ┌────────────────┐ │ │ ┌────────────────┐ │ │
│ │ │ Data Sharing │ │ │ │ Campaign │ │ │ │ Account │ │ │
│ │ │ Consent Logs │ │ │ │ Reward Tokens │ │ │ │ Token Balances │ │ │
│ │ │ │ │ │ │ (Custom HTS) │ │ │ │ │ │ │
│ │ └────────────────┘ │ │ └────────────────┘ │ │ └────────────────┘ │ │
│ └────────────────────┘ └────────────────────┘ └────────────────────┘ │
│ │
│ ↓ Data Flow ↓ │
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ MediSphere Indexer Service │ │
│ │ (Polls Mirror Node → Stores Metadata in MongoDB → Powers Explorer)│ │
│ └────────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────────┘
↓
[Public Verification]
↓
https://hashscan.io/testnet
(Users verify records on hedera network)
DATA FLOW LEGEND:
─────────────────
1. User submits action via Frontend (e.g., create health record)
2. Frontend sends HTTP request to Backend API
3. Backend stores data in MongoDB + uploads to IPFS/Cloudinary
4. Backend submits audit log to Hedera (HCS) via TopicMessageSubmitTransaction
5. Hedera network reaches consensus and stores immutable log
6. Backend returns transaction ID to Frontend
7. Indexer polls Mirror Node for new HCS messages
8. Indexer stores searchable metadata in MongoDB
9. Users verify records on HashScan using transaction ID
10. BlockExplorer queries indexed data for public statistics
All Hedera resources are deployed on Hedera Testnet for development and demonstration.
- Account ID:
0.0.3742504 - Type: Main operator account for all platform transactions
- Purpose: Signs all HCS messages, HTS token operations, and DID transactions
- HashScan: View Account
- Main Audit Topic ID:
0.0.6898300 - Purpose: Logs all platform-wide audit events (records, claims, data sharing, campaigns)
- Submit Key: Controlled by operator account
- Message Format: JSON (action, actor, metadata, timestamp)
- HashScan: View Topic
. Vaccination NFT Collection
- Token ID:
0.0.7090788 - Symbol: MED-VAX Type: Non-Fungible Token (NFT)
- Max Supply: Unlimited
- Supply Key: Controlled by operator (allows minting)
- Purpose: Tamper-proof vaccination certificates
- Metadata: IPFS CID containing vaccination details
- HashScan: View NFT Collection
3. Campaign Reward Tokens (Created dynamically per campaign)
- Example Token ID:
0.0.7093910(Malaria Awareness Campaign) - Symbol: MPT
- Type: Fungible Token
- Purpose: Campaign-specific rewards distributed to participants
- Note: Each ImpactGrid campaign can create a unique HTS token
For hackathon judges to test the platform, the login credentials for users are provided in dorahacks documentation as we used account abstraction for users.
medisphere/
├── backend/
│ ├── bin/ # Server startup scripts
│ ├── controllers/ # API route controllers
│ │ ├── authController.js
│ │ ├── recordController.js
│ │ ├── databridgeController.js
│ │ ├── healthiqController.js
│ │ ├── impactgridController.js
│ │ ├── claimController.js
│ │ ├── paymentController.js
│ │ └── explorerController.js
│ ├── models/ # Mongoose schemas
│ │ ├── userModel.js
│ │ ├── recordModel.js
│ │ ├── dataRequestModel.js
│ │ ├── campaignModel.js
│ │ ├── insuranceClaimModel.js
│ │ ├── paymentModel.js
│ │ └── indexedRecordModel.js
│ ├── routes/ # Express routes
│ │ ├── authRoutes.js
│ │ ├── recordRoutes.js
│ │ ├── databridgeRoutes.js
│ │ ├── healthiqRoutes.js
│ │ └── explorerRoutes.js
│ ├── services/ # Business logic
│ │ ├── mirrorNodeService.js
│ │ ├── indexerEngine.js
│ │ └── statsAggregator.js
│ ├── utils/ # Utility functions
│ │ ├── hcsLogger.js # Hedera HCS logging
│ │ ├── ipfsClient.js # IPFS integration
│ │ ├── nft.js # NFT operations
│ │ ├── hederaTokenService.js # HTS operations
│ │ ├── cloudinaryConfig.js # File uploads
│ │ ├── carexpayService.js # Payment utilities
│ │ └── accessTokenUtil.js # Token management
│ ├── scripts/ # Utility scripts
│ │ ├── startIndexer.js
│ │ ├── checkHederaBalance.js
│ │ └── testNFTCreation.js
│ ├── app.js # Express app setup
│ ├── package.json
│ └── .env # Environment variables
│
├── frontend/
│ ├── app/ # Next.js app directory
│ │ ├── dashboard/ # User dashboards
│ │ │ ├── patient/
│ │ │ ├── doctor/
│ │ │ ├── hospital/
│ │ │ └── insurer/
│ │ ├── explorer/ # Block explorer
│ │ │ └── page.tsx
│ │ ├── layout.tsx
│ │ └── page.tsx # Landing page
│ ├── components/
│ │ ├── services/ # Service components
│ │ │ ├── lifechain.tsx
│ │ │ ├── databridge.tsx
│ │ │ ├── healthiq.tsx
│ │ │ ├── carexpay.tsx
│ │ │ ├── claimsphere.tsx
│ │ │ ├── impactgrid.tsx
│ │ │ ├── meditrace.tsx
│ │ │ └── medflow.tsx
│ │ └── ui/ # Reusable UI components
│ ├── lib/
│ │ ├── api.ts # API client
│ │ └── utils.ts
│ ├── public/ # Static assets
│ ├── styles/
│ ├── package.json
│ └── .env.local # Frontend environment
│
└── README.md # This file