System Requirements
Node.js
Version 18 or higherRequired for running the frontend and development tools.
Package Manager
npm or yarnFor managing dependencies.
Browser
Modern BrowserChrome, Firefox, Safari, or Edge (latest versions)
Aleo Wallet
Private KeyFrom Leo Wallet, Shield Wallet, or generated fresh
Project Structure
Understanding the Salud Health project structure:Frontend Installation
Install Dependencies
Install all required npm packages:This will install key dependencies including:
The
@provablehq/sdk package provides the core functionality for interacting with the Aleo blockchain.Configure Environment Variables
Create a Edit the
.env file in the Main APP directory:.env file with your configuration:Aleo Wallet Setup
Salud Health requires an Aleo private key for encrypting medical data. Here’s a detailed explanation and setup guide:Why Does Salud Require a Private Key?
Unlike typical dApps that use browser wallet extensions, Salud requires direct access to your private key because:End-to-End Encryption
End-to-End Encryption
Your medical records are encrypted client-side using your private key before they leave your browser. This ensures:
- Data is encrypted before reaching any server
- Only you can decrypt your medical information
- Zero-knowledge: even the blockchain can’t read your data
- HIPAA-grade privacy protection
Cryptographic Proof Generation
Cryptographic Proof Generation
When sharing records with doctors, Salud generates cryptographic access tokens using:This requires direct cryptographic operations not available through standard wallet APIs.
Session-Based Record Management
Session-Based Record Management
The application maintains a secure session with the Aleo network to:
- Fetch your encrypted records from the blockchain
- Monitor access grants and expirations
- Track record creation and sharing history
Getting Your Private Key
- Leo Wallet
- Shield Wallet
- Generate New
- Aleo SDK
Export from Leo Wallet (Recommended for existing users)
- Install Leo Wallet browser extension if you haven’t already
- Create or access your existing account
- Click your account avatar in the extension
- Navigate to Settings → Security & Privacy
- Click “Export Private Key”
- Enter your wallet password to authenticate
- Copy the private key (format:
APrivateKey1zkp...) - Store it securely in a password manager
Private Key Security Best Practices
Use a Password Manager
Store your private key in a secure password manager like:
- 1Password
- Bitwarden
- LastPass
- KeePass
- Plain text files
- Cloud notes (Google Docs, Notion, etc.)
- Screenshots
Separate Testing and Production
Use different accounts for:
- Testing: Fresh generated account with no real value
- Production: Your main Aleo wallet with actual credits
Smart Contract Deployment (Optional)
If you want to deploy your own instance of the Salud Health contract:Deploy to Testnet
Deploy the contract to Aleo testnet:You’ll need:
- An Aleo private key with testnet credits
- Network connectivity to Aleo testnet
Deployment costs testnet credits. Get free testnet credits from the Aleo Faucet.
Backend Setup (Optional - Deprecated)
The deprecated backend is optional and not required for core functionality:Legacy Backend Installation
Legacy Backend Installation
If you need the backend for API-based operations:Create Start the backend:Backend Dependencies:
backend/.env:Production Build
To build Salud Health for production deployment:Build Frontend
Create an optimized production build:This creates a
dist/ directory with optimized static files.Preview Production Build
Test the production build locally:This serves the
dist/ folder at http://localhost:4173Environment Variables Reference
Aleo network to connect to. Options:
testnet, mainnetAleo API endpoint URL for blockchain queries
Deployed smart contract program identifier
Optional: Pre-fill private key for testing (59 characters, starts with
APrivateKey1)Optional: View key for read-only blockchain queries
Optional: Wallet address (starts with
aleo1)Enable demo mode for testing without blockchain transactions
Verification
Verify your installation is working correctly:Wallet Connection
✅ Can paste or generate a private key✅ Wallet connects successfully✅ Address displays correctly (format:
aleo1...)Troubleshooting
Module not found errors
Module not found errors
Clear node_modules and reinstall:
Vite build fails
Vite build fails
Ensure you’re using Node.js 18+:Update if necessary:
Cannot connect to Aleo network
Cannot connect to Aleo network
Check network connectivity:If this fails, verify:
- Your internet connection
- Firewall settings
- VPN isn’t blocking Aleo endpoints
Private key validation fails
Private key validation fails
Ensure your private key:
- Starts with
APrivateKey1 - Is exactly 59 characters
- Contains no spaces or line breaks
- Is from Aleo network (not Bitcoin, Ethereum, etc.)
TypeScript errors during build
TypeScript errors during build
Run type checking:Fix any TypeScript errors reported. Common issues:
- Missing type definitions
- Incorrect import paths
- Version mismatches in
@types/*packages
Next Steps
Quick Start
Create your first medical record in 5 minutes
Architecture
Understand how Salud integrates with Aleo
Smart Contract
Explore the Leo contract source code
User Guides
Patient and doctor usage guides
Getting Help
If you encounter issues:- Check the troubleshooting guide
- Review the FAQ
- Open an issue on GitHub
- Join the Aleo Discord