A Git wrapper for secure, decentralized medical data exchange
MGit enables patients to take control of their medical data through a decentralized, cryptographically secure system built on Git and authenticated with Nostr public keys. No more fragmented records, data silos, or loss of medical history when switching providers.
MGit is a specialized Git wrapper built on top of git that extends Git's capabilities with Nostr public key integration. MGit is designed specifically for secure, decentralized medical record management and transmission, giving patients and healthcare providers a verifiable way to store, share, and track medical data.
By using Git's robust version control features combined with Nostr's cryptographic identity system, MGit provides:
Every medical record change is cryptographically signed with your Nostr public key, ensuring data integrity and establishing clear ownership.
Full audit trail of all medical record updates, enabling historical views of patient data and accountability for all changes.
No single point of failure. Your medical data can be stored across multiple locations while maintaining your control.
Granular permission controls allow you to share specific portions of your medical history with different providers as needed.
Traditional Electronic Medical Record (EMR) systems face significant challenges that directly impact patient care and data ownership:
Medical records are fragmented across different providers and systems, making it difficult for patients to access their complete health history or for new providers to get a full picture of patient care.
Different EMR systems often cannot communicate effectively, leading to repeated tests, treatment delays, potential medical errors, and unnecessary costs.
Centralized databases create attractive targets for data breaches and single points of failure, putting sensitive medical information at risk.
Patients often cannot easily transfer their complete medical history when switching providers, losing years of valuable health data.
Patients have limited visibility into who has accessed their data, when changes were made, and by whom, reducing trust and accountability.
Healthcare providers are locked into specific EMR vendors, limiting innovation and creating dependencies on proprietary systems.
MGit Server is a self-hosted service that stores a user's Medical Data. It authenticates users via Nostr and serves the MGit Repo back to the authenticated client. MGit Server = MGit + Nostr
The server provides secure repository hosting with role-based access control, ensuring that only authorized healthcare providers can access specific portions of your medical records based on permissions you set.
The MGit repo is—you guessed it—a git repo, but its contents are a user's medical data. Together with a client App that understands how to render such data, the user essentially has a digital Medical Binder on their smartphone.
This creates a paradigm where patients maintain self-custody of their medical records while still enabling seamless sharing with healthcare providers. Think of it as having your complete medical history in your pocket, with the ability to grant access to specific providers as needed.
MGit supports these operations with enhanced security and authentication:
mgit init
- Initialize a new medical record repositorymgit clone <url> [path]
- Clone a repository with Nostr authenticationmgit add <files...>
- Add medical files to stagingmgit commit -m <message>
- Commit staged changes with Nostr public key attributionmgit push
- Push commits to remote repositorymgit pull
- Pull changes from remotemgit status
- Show repository statusmgit show [commit]
- Show commit details and changes with medical data contextmgit config
- Get and set configuration values including Nostr keysMGit uses a robust challenge-response authentication system based on Nostr cryptographic keys:
This approach ensures that only authorized individuals can access medical repositories while maintaining the decentralized nature of the system.
MGit provides a familiar command-line interface for those who already know Git, with enhanced security features for medical data:
$ mgit config --global user.name "Dr. Jane Smith"
$ mgit config --global user.email "[email protected]"
$ mgit config --global user.pubkey "npub19jlhl9twyjajarvrjeeh75a5ylzngv4tj8y9wgffsgu..."
After setup, MGit operates with the same basic commands as Git, but with enhanced security, verification, and medical data management capabilities.
The primary goal of MGit is to enable patients to maintain self-custody of their medical records. This means:
This server is running a proof of concept implementation of the MGit system. It demonstrates:
Click the "Login / Access Repository" button above to test the authentication system with your Nostr keys.
Welcome! Your medical repositories will appear here.
Create a secure, self-custodial medical history repository linked to your Nostr identity.
Your medical repository is ready! Choose how to get started:
Enter your medical information directly in your browser
Coming soon - comprehensive web forms
Scan this QR code with your Medical Binder iOS app
Use your phone's camera and document scanning features