The Demo
demo.hats.health runs the HATS app against a real spaces PDS, signed in as a synthetic patient. Each visitor gets a sandbox of their own, and nothing in it is kept.
1.1 What you're looking at
- A synthetic patient. One of twelve from Synthea's published sample data, chosen for an inclusive roster, with a full record: visits, results, medications, procedures. No real person's data is anywhere in the demo
- Their record, by section. Records sit in spaces by IPS section and protection level. Restricted ones are labelled: sensitive records the patient keeps out of routine access
- Locations are the places the patient has had care, from their visits. Synthea names real Massachusetts facilities, so the demo shows a made-up place of the same kind in each one's stead, and no real clinic is said to have seen a synthetic patient
To be someone else, open the account menu at the top right: everyone in your sandbox is there, each with a line on who they are. Patients come first, then Professionals: the doctor, and Micaela RendΓ³n, a patient who is also the administrator at Haberdasher General, the demo's hospital, under the same DID. Each sandbox also has its own families: the three children each have one or two parents among the adults, who act for them, shown in the menu and on the Circle tab. The tabs are Record, Locations, Home, Circle, and More. Home opens first: what's waiting on you, and who read your record.
1.2 Demo actions
The blue bar at the bottom makes things happen to you, and takes you to where each one shows. More opens the rest, in rows by who acts.
- Clinic asks β your sandbox's clinician asks to see four sections for treatment, for real. A panel shows each step as it happens: the calls made, how long they took, and what came back. The clinic works out what it may ask for from the published policy, and its request lands in your ledger and inbox, with your record locked to it until you approve. You approve on the one approval sheet HATS uses everywhere (who, why, what, how long) with your HATS card; the demo simulates the card, and its PIN is
123456. Your app writes your yes to your ledger and puts the clinic on the four sections' member lists; the clinic reads them and records the read in your audit space, and who read your record reads it back. Ask again and the clinic reads under the yes you already gave, with no new approval, and records that read too. The clinic also shows under Locations, with each of its reads. From there or from a read's entry you can revoke it, which takes the clinic off the lists. Disputing a read or filing a complaint opens a stub that says where it would go, and sends nothing - ER visit β an emergency physician opens your record without asking, as HATS allows when you can't answer. It shows up under who read your record, marked Emergency
- Clinic updates β a clinician changes one of their records: resolves a problem, confirms an allergy, or finishes a medication. It waits on Home for your review, as a diff you approve with your card or disagree with
- Doctor leaves (under More) β your sandbox's doctor leaves Haberdasher General, for real. The same panel steps through each call: they leave through the hospital's institution node, your app finds their role ended and takes them off your lists, and reads where requests for them go from the hospital's own records. Their role then shows as ended wherever they appear. Doctor returns puts them back, as a sandbox's reset does (When someone leaves)
- Reset (under More) β clears them all
Playing the doctor. Switch to the sandbox's doctor in the account menu. They practice emergency medicine at Haberdasher General, whose account publishes their role in its own repo, which their app reads to work out their menu. They already have a history with most of the sandbox's patients: some open, one ending tomorrow, one waiting on the patient, one declined, one revoked, one ended. Pick where you are from the place chip over their patients: that place's patients come first, or only them with Only. Search finds a patient by name or birth year. Open a patient to read what you hold, every read recorded in their audit space, or tap a ? to ask for a section; switch back to that patient and the request is waiting on Home. From a ? the doctor can also break the glass, with a stated reason: the claim goes in the patient's ledger first, and the demo's gate, standing in for a managing app, admits them on it. The patient sees that read as an emergency, in the doctor's words. Tap a HATS card opens a patient they've never met, with emergency access by their role; the demo's card is simulated. Add a visit note writes into the patient's Visits, where it waits on their Home for review. Requests from patients wait under Asked of you: verify, send a correction as a new version, or decline with a reason. The doctor can also leave Haberdasher General from More.
Playing the administrator. Switch to Micaela as administrator, signed in as herself. She sees the hospital's people with their roles, read from its own records, and who ended each and when. She can end a role, or record a doctor's leaving by revoking their credential, which points requests for them at the hospital.
Above the tabs, each screen has its own actions. On your record you can add to any section, edit what you added, ask the doctor who wrote a record to correct it, and ask a doctor you've shared with to verify one you wrote. The request goes to that doctor alone, and opens that section to them until they answer. A clinic that isn't on HATS gets it from you: the app links its email and phone and prints a letter, with made-up contact details in the demo. Every change is a new version, with its diff against the last (Who stands behind a record). What you add is written to your sandbox's PDS, as it would be to yours.
1.3 Real and simulated
1.4 Time and limits
- A few sandboxes at a time. When they're all in use, a waiting room shows how many are ahead and the longest you could wait
- When someone is waiting, everyone already inside gets 10 minutes to wrap up, and a sandbox entered while others wait lasts 15
- After 8 minutes without activity, the app asks if you're still there; at 10 it returns you to the lobby
- Leaving resets your sandbox for the next person: Leave the demo is under More. Closing the page does the same after 90 seconds
Synthetic data only. Don't type anything real into it.
1.5 What's next
The roadmap has what's built and what comes next. Tell us what you think in the Atmosphere: @hats.health.
Getting Started
Caution
Draft. Not for real health data. HATS is an unreleased draft built on atproto spaces, which is itself an alpha. Both will change without notice or migrations, and anything you set up today will need rebuilding.
For people who want to run the pieces and poke at them: self-hosters, developers, anyone with a spare server and a domain. It assumes Docker and a terminal.
2.1 Before you start
- Synthetic data only. Never load your own or anyone else's real records, even to try it out. The prototype's data rules apply
- The host can read everything. Spaces control access; they don't encrypt. Whoever runs a PDS, and every app it syncs to, sees plaintext, and encryption at rest only protects a stolen disk (Data Security)
- Hosting real health data is regulated. Hosting other people's records for a provider makes you a HIPAA business associate; hosting them for consumers puts you under the FTC Health Breach Notification Rule. Both carry breach-notification duties (Regulatory Model)
- Test DIDs are public and permanent. A
did:plcgoes into the public PLC directory and can be deactivated but never removed. Prefix test handles withsynthetic-and keep to a handful - The hosted sandbox is temporary. Bluesky's spaces-alpha PDS is invite-only and is deleted after the alpha
2.2 What runs today
To see HATS without running anything, try the demo. The roadmap's status lists every piece. Running your own is the upstream half plus HATS's loader: a spaces PDS holding synthetic HATS records.
2.3 Build the spec
Needs Node 22 or later.
The site's links are root-relative, so open it through a server rather than as a file.
2.4 Get a spaces PDS
Two options. The prototype self-hosts, because the sandbox goes away:
- Hosted β get an invite code for Bluesky's sandbox from your BPS account, as the alpha announcement describes
- Self-hosted β run the
pds-spaces-alphaimage behind a public hostname, since adid:plcnames its PDS by URL. A Cloudflare Tunnel avoids opening ports. Setup follows upstream's alpha updates thread, which tracks each release and its migrations
2.5 Create synthetic patients
Download Synthea's published FHIR R4 sample data rather than generating your own. The demo's loader checks that zip against a pinned SHA-256 and refuses any other (Seed data). Create one account per patient, each handle prefixed synthetic-. The prototype's roster picks twelve for coverage.
2.6 Hold your own rotation key
Every account's DID should list a key you hold above the PDS's keys, the way a HATS card's key ranks above a custodian's (DID rotation keys). Without one, the host controls the identity.
Generate a P-256 key on a security key's PIV applet. On a YubiKey:
Then add its public key as a rotation key ranked first. PDS MOOver (source) takes the public key as a P-256 did:key (convert pubkey.pem first), sets the order, and signs through your PDS's emailed confirmation.
2.7 Create the spaces
For each patient, create the full space set with com.atproto.space.createSpace.
The demo's record spaces are memberspaces, and a yes puts the asker on their lists; in HATS, each patient's spaces name their own managing app instead. For your own test clinician, a memberspace with them on its list (com.atproto.memberspace.putMember) stands in, as in the demo.
2.8 Load records
Split each Synthea bundle by IPS section and write each resource into the matching space. Lexicon Namespaces maps sections to collections. The demo's loader does this: pnpm --filter @hats/demo seed writes the roster's records by space, and demo/src/slots/seed.ts writes them into a PDS.
2.9 Help build it
The build order is the plan. Issues and merge requests go to the GitLab project.