HealthNote Labs/Npub.Health
Built by Metorial, the integration platform for agentic AI.
HealthNote Labs/Npub.Health
Server Summary
Store health records
Share health data selectively
Verify healthcare providers
Access health records across multiple platforms
Encrypt sensitive health data
A decentralized health records platform built on Nostr protocol.
Npub.Health provides a secure, user-controlled platform for managing health data using the Nostr protocol. This application gives individuals ownership over their health information while enabling selective sharing with healthcare providers.
Clone the repository
git clone https://github.com/HealthNoteLabs/Npub.Health.git
cd Npub.Health
Install dependencies
npm install
Set up environment variables
cp .env.example .env
# Edit .env with your configuration
Start the development server
npm run dev
Npub.Health/
├── client/ # Frontend React application
├── server/ # Backend Node.js server
├── shared/ # Shared utilities and types
├── scripts/ # Utility scripts
└── ...
npm run dev
npm run build
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or feedback, please open an issue on this repository.
This project includes AWS integration to automatically deploy Blossom servers for users. The implementation allows users to create their own private Blossom servers on AWS EC2 instances.
Install AWS SDK:
npm install @aws-sdk/client-ec2
Create Security Groups:
The scripts/create_aws_security_groups.js
script will create the necessary security groups in each AWS region:
node scripts/create_aws_security_groups.js
Make sure to update the VPC ID in the script for each region.
Configure AWS Credentials:
Create a .env
file with the following variables:
AWS_ACCESS_KEY_ID=your_access_key_id
AWS_SECRET_ACCESS_KEY=your_secret_access_key
# Security Groups for each region (output from the script)
SECURITY_GROUP_US_EAST=sg-xxxxxxxxxxxxxxxx
SECURITY_GROUP_US_WEST=sg-xxxxxxxxxxxxxxxx
SECURITY_GROUP_EU_CENTRAL=sg-xxxxxxxxxxxxxxxx
SECURITY_GROUP_AP_SOUTHEAST=sg-xxxxxxxxxxxxxxxx
# Database URL
DATABASE_URL=postgres://postgres:postgres@localhost:5432/npubhealth
Set up PostgreSQL database: Follow these steps to set up the database:
npubhealth
npm run db:push
Test the integration:
npm run dev
The AWS integration consists of:
server/aws/ec2Manager.ts
): Handles creating and checking EC2 instances.server/aws/serverMonitor.ts
): Periodically checks and updates server status.server/routes.ts
): Provides REST endpoints for server management.server/db
): Persists server information and status.If you encounter issues:
For more information about the AWS SDK, refer to the official documentation.