Inspiration
In the wake of natural disasters, conflict zones, or infrastructure collapse, the first thing to fail is connectivity. Yet, this is exactly when medical history becomes a matter of life and death. We found that modern health tech systems are fragile as they rely on centralized clouds that vanish when the internet is cut, so we set out to fix that.
What it does
Relay is a decentralised, distributed database designed for the extreme environments where charities like MSF and UNHCR operate. It enables aid workers to securely access and share vital patient health records without central servers or internet access.
Medical records are automatically shared between devices as soon as they come within range of one another, by leveraging a custom network protocol we created and TCP based gossip syncing.
The system ensures consistency across the network by using Conflict-free Replicated Data Types (CRDTs) to sync offline edits. Security is enforced by implementing a zero-trust database where all patient data is encrypted at initialisation, and only decrypted when queried by the frontend, meaning if a device was stolen it would only yield encrypted blobs. Doctors register and authenticate using facial recognition, which maintains high security over who has access to the vital medical records
How we built it
Network Layer- We built a custom protocol for device communication. UDP Discovery -> TCP Handshake -> Continuous Epidemic Protocol -> Synced Data.
Database Layer - We used SQLite as a local CRDT store for each device on the network, to enforce last write-ins using timestamps, ensuring consistency across the network.
Security Layer - We implemented SHA-256 hashing for immutable patient IDs and integrated facial recognition for doctor registration and logins. Nodes are updated by passing a Bloom Filter, enforcing a zero knowledge proof by hiding search queries and preventing intercepted data being readable.
Frontend - We used React and Typescript to build the user dashboards that the doctors and patients interact with, providing a smooth user interface
Challenges we ran into
We ran into difficulties early on while setting up the initial TCP connections across the network, and working with new technologies across the tech stack
Accomplishments that we're proud of
Inventing our own custom network protocol that is offline based and allows for updates when going back online.
Integrating the backend to the frontend seamlessly to allow a doctor user to see the updated medical records in real time.
Working together coherently as a unit
What we learned
The importance of designing a good database schema.
The importance of security and encryption when handling sensitive data such as medical records, and considering all possible cases where these records are handled.
The complexity of handling data in such a hectic environment and the difficulties that entails
What's next for Relay
Hopefully provide it as a service to charities like UNHCR and MSF, and help save lives

Log in or sign up for Devpost to join the conversation.