Step 5 · Run it on the ward

Self-host Supabase, deploy the function and the kiosk, lock the tablet to the app, and protect the register that re-identifies every reading.

The same stack as your laptop, on servers you control: Supabase for the register, the kiosk served over HTTPS, and tablets locked to the kiosk.

Before you begin

  • The kiosk working end to end from step 4.
  • A server or cluster for Supabase, and a host for the kiosk's static files.

Self-host SupabaseTerminal

Follow Supabase's self-hosting with Docker guide, then:

  1. Apply the migration in supabase/migrations to the new database.
  2. Put supabase/functions/patients in the functions volume, and set OVOK_BASE_URL, OVOK_PROJECT_ID and PATIENT_IDENTIFIER_SYSTEM on the functions service.
  3. Turn off the gateway's Supabase token check for the function, as verify_jwt = false does locally: the kiosk sends an Ovok token, which the function checks itself.
  4. Keep Studio and the database port off the public network.

OVOK_BASE_URL points at the Ovok environment your nurses sign in to. Use the sandbox until the project goes live.

Serve the kioskTerminal

npm run build

Serve dist/ over HTTPS from any static host, with VITE_SUPABASE_URL set to your Supabase API URL at build time. The kiosk carries no secret, so a public static host is fine.

Set up the tabletsConsole

  • Lock each tablet to the kiosk with the platform's single-app mode (screen pinning or guided access).
  • Pair a barcode scanner as a keyboard. It types the card code and presses Enter.
  • Each nurse signs in at the start of the shift and taps End shift at the end. Closing the browser tab also ends the session.

Protect the registerServer-side

The register is the only thing that turns a pseudonym back into a person.

  • Back it up on the same schedule as your other clinical records. If it is lost, the readings in Ovok can no longer be tied to anyone.
  • Grant access to the database and Studio to the people who administer it, and log that access.
  • Keep the identifier system unchanged for the life of the project; Patients are found by system and pseudonym together.

Verify your integration

  1. Sign in on a tablet, scan a test card and save a reading.
  2. Read the Patient in Ovok: it carries only the pseudonym.
  3. Restore the register from a backup into a test database and look the card up again.

Troubleshooting

  • Every request answers 401: the gateway still checks for a Supabase token. Turn the check off for this function.
  • The kiosk cannot reach the function: check VITE_SUPABASE_URL in the build and that the function is served under /functions/v1/patients.
  • Readings save but lookups fail: the function cannot reach Ovok. Check OVOK_BASE_URL from inside the functions service.

See also

Last updated on

On this page