Prerequisites
Before you begin, make sure you have:- Node.js 18+ installed on your system
- npm or yarn package manager
- A modern web browser (Chrome, Firefox, or Safari)
- An Aleo private key (we’ll help you get one below)
Installation
Install Frontend Dependencies
Navigate to the Main APP directory and install dependencies:
The frontend uses React 18, TypeScript, and Vite for a fast development experience. Key dependencies include
@provablehq/sdk for Aleo blockchain integration.Configure Environment
The frontend connects directly to the Aleo blockchain. No additional backend configuration needed for basic usage.Create a
.env file in the Main APP directory (optional):Get Your Aleo Wallet
Salud Health requires an Aleo private key to encrypt your medical data before storing it on the blockchain. You have three options:Option 1: Export from Leo Wallet (Recommended)
Option 1: Export from Leo Wallet (Recommended)
If you already have Leo Wallet installed:
- Open the Leo Wallet browser extension
- Click on your account avatar
- Go to Settings → Security & Privacy
- Click “Export Private Key”
- Enter your password to authenticate
- Copy the private key (starts with
APrivateKey1...) - Paste it into Salud’s wallet connect screen
Option 2: Generate New Account (For Testing)
Option 2: Generate New Account (For Testing)
Don’t have a wallet yet? Generate one directly in Salud:
- Open Salud at
http://localhost:5173 - Click “Generate New” on the wallet connect screen
- Save the generated private key securely
- The app will automatically connect
You can later import this account into Leo Wallet or Shield Wallet using the same private key.
Option 3: Export from Shield Wallet
Option 3: Export from Shield Wallet
If you use Shield Wallet:
- Open the Shield Wallet extension
- Go to Account Settings
- Select “Export Private Key”
- Authenticate with your password
- Copy the private key
- Paste it into Salud
Create Your First Medical Record
Once connected, you’re ready to create your first encrypted medical record:Connect Your Wallet
On the Salud dashboard, paste your Aleo private key or generate a new account. The app will validate your key and establish a secure session.
Create a New Record
Click the “New Record” button on the dashboard. You’ll see a form with the following fields:
- Title: Brief description (e.g., “Annual Physical 2026”)
- Description: Detailed notes about the visit or condition
- Record Type: Select from:
- General (1)
- Lab Results (2)
- Prescription (3)
- Imaging (4)
- Vaccination (5)
- Medical Data: The actual health information (automatically encrypted)
Submit to Blockchain
Click “Create Record” to encrypt and store your data on the Aleo blockchain.Under the hood, Salud:
- Encrypts your medical data client-side using your private key
- Splits the data into 12 field elements (~360 bytes total capacity)
- Generates a unique record ID using
BHP256::hash_to_field - Creates a private
MedicalRecordon Aleo
On testnet, this transaction is free. Your record will appear in 10-15 seconds after blockchain confirmation.
Share with a Doctor
One of Salud’s most powerful features is time-limited access sharing:Configure Access
Enter the following details:
- Doctor’s Aleo Address: The healthcare provider’s wallet address (starts with
aleo1...) - Access Duration: Choose from:
- 1 hour (240 blocks) - Quick consultation
- 24 hours (5,760 blocks) - Standard access
- 7 days (40,320 blocks) - Extended care
Aleo produces approximately 1 block every 15 seconds, so durations are measured in block heights rather than timestamps.
Generate Access Token
Salud creates a cryptographic access token using:The token is stored on-chain in the
access_grants mapping:What Makes Salud Different?
Unlike typical blockchain dApps, Salud provides medical-grade privacy:| Feature | Standard dApp | Salud Health |
|---|---|---|
| Data Encryption | ❌ Not encrypted | ✅ Encrypted with your key |
| Medical Privacy | ❌ Visible to dApp | ✅ Only you can decrypt |
| Server Access | ❌ Can read data | ✅ Zero-knowledge |
| Sharing | ❌ Not possible | ✅ Time-limited tokens |
| Security Level | Standard | HIPAA-grade |
Your medical data is encrypted in your browser before it reaches any server or the blockchain. Even the Aleo network cannot decrypt your records.
Next Steps
Installation Guide
Detailed setup instructions including backend configuration and environment variables
Architecture
Learn how Salud integrates with Aleo blockchain for privacy-preserving healthcare
Smart Contract
Explore the Leo smart contract powering Salud’s medical records
Security Guide
Privacy model and security best practices
Troubleshooting
Invalid private key error
Invalid private key error
Ensure your private key:
- Starts with
APrivateKey1 - Is exactly 59 characters long
- Has no extra spaces or line breaks
Records not appearing
Records not appearing
Records are fetched from the blockchain on connect, which may take 10-15 seconds. Check:
- Browser console for sync status
- Network connection to Aleo testnet
- That you’re using the correct wallet address
Transaction failed
Transaction failed
On testnet, ensure you have:
- Testnet credits in your wallet (get from faucet)
- A valid network connection
- The correct
PROGRAM_IDin your environment variables
salud_health_records_v6.aleoGetting Help
Need assistance?- Check the FAQ for common questions
- Review the troubleshooting guide
- Join the Aleo community Discord
- Open an issue on GitHub