Navora is a browser-based safety app for families caring for someone with dementia. It turns two devices a family already owns into a shared safety system to monitor.
- The patient device securely streams its browser-provided location.
- The caregiver device answers three questions immediately: Are they safe? Where are they? Do I need to act?
Navora does not claim room-level precision. The caregiver map always displays the GPS accuracy radius reported by the patient device.
npm install
npm run devOpen / → Try Navora → finish onboarding → you land on the real caregiver dashboard.
npm ci
npm run build
npm startThe Express process serves the production frontend, REST API, WebSocket endpoint, push service, and health endpoint from one port.
Copy .env.example into your deployment platform’s environment configuration. Do not commit real VAPID keys.
Generate VAPID keys once:
npm run vapid:generateSet:
VAPID_PUBLIC_KEYVAPID_PRIVATE_KEYVAPID_SUBJECTPUBLIC_URLto the deployed HTTPS origin used by patient pairing QR codesDATA_FILEto a path on persistent storage
Browser geolocation, service workers, and Web Push require HTTPS outside localhost.
Scanning a QR code from a separate patient phone therefore requires an HTTPS deployment; a localhost pairing URL works only on the same machine.
- App: https://safe-zone-app.vercel.app
- Supabase project:
rjlvxopxrfljhcftuqpw→ https://rjlvxopxrfljhcftuqpw.supabase.co - GitHub: https://github.com/Coder-13-11/Navora-App
Vercel build env vars are configured in vercel.json. Pushing to main redeploys automatically.
- SQL Editor → run all of
supabase/schema.sql - Authentication → URL Configuration
- Site URL:
https://safe-zone-app.vercel.app - Redirect URLs (add all of these):
https://safe-zone-app.vercel.app/onboardinghttps://safe-zone-app.vercel.app/caregiverhttp://localhost:5173/onboardinghttp://localhost:5173/caregiver
- Site URL:
- SQL Editor → also run
supabase/rpc_patient_tracking.sql
This enables real QR pairing + patient location tracking even when Edge Functions are not deployed.
Re-run it after pulling updates: it now also addsclaim_pairing_code, which powers the manual 6-digit pairing code fallback on the patient phone. - Authentication → Email Templates → Magic Link (optional)
Include{{ .Token }}if you want email OTP codes in addition to magic links.
Optional: under Authentication → Providers → Anonymous, enable Anonymous Sign-Ins so Continue without email works when email rate limits are hit. - Edge Functions → Secrets (never commit
service_roleorVAPID_PRIVATE_KEY):
supabase secrets set \
SUPABASE_URL=https://rjlvxopxrfljhcftuqpw.supabase.co \
SUPABASE_SERVICE_ROLE_KEY=<from Supabase Settings → API> \
PUBLIC_URL=https://safe-zone-app.vercel.app \
VAPID_PUBLIC_KEY=BJJlOSiaWxLqMIPJIHzqVfODNyMlcejedSZ-Gq_ddt3ksflZXrmH9joVQHEgOJKgIRgfmd3eMew1cXCdZoFe_m0 \
VAPID_PRIVATE_KEY=<from npm run vapid:generate> \
VAPID_SUBJECT=mailto:you@example.com- Deploy edge functions:
supabase link --project-ref rjlvxopxrfljhcftuqpw
npm run supabase:functionsUse this path for public PWA reliability. Vercel serves the React app; Supabase stores accounts, households, zones, pairing sessions, patient-device tokens, location history, push subscriptions, care responses, and realtime updates.
- Create a Supabase project.
- Run the SQL in
supabase/schema.sqlin the Supabase SQL editor, or install the Supabase CLI and run:
supabase link --project-ref <your-project-ref>
npm run supabase:schema- Generate VAPID keys once:
npm run vapid:generate- Set Supabase Edge Function secrets:
supabase secrets set \
SUPABASE_URL=https://<project-ref>.supabase.co \
SUPABASE_SERVICE_ROLE_KEY=<service-role-key> \
PUBLIC_URL=https://<your-vercel-domain> \
VAPID_PUBLIC_KEY=<generated-public-key> \
VAPID_PRIVATE_KEY=<generated-private-key> \
VAPID_SUBJECT=mailto:you@example.com- Deploy the functions:
npm run supabase:functions- In Vercel, set:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_PUBLIC_URLVITE_VAPID_PUBLIC_KEY
- Deploy the app to Vercel with:
npm run buildvercel.json is included for SPA routing and service-worker cache headers.
When these Vercel variables exist, Navora automatically uses Supabase Auth, Postgres, Edge Functions, and Realtime instead of the local Express JSON prototype.
Navora can make a PWA reliable for accounts, pairing, storage, realtime dashboards, history, and notifications. A PWA cannot continuously collect GPS after iOS or Android suspends or closes the browser/web app. The patient phone must keep Navora open and location permission allowed for continuous web location updates.
For closed-app background location, build a native patient tracker with iOS Core Location / Android foreground location service and keep the caregiver dashboard as the PWA.
docker build -t safezone .
docker run --rm \
-p 4173:4173 \
--env-file .env \
-v safezone-data:/data \
safezoneDeploy the same container to any host that supports:
- HTTPS
- WebSocket upgrades
- A persistent volume mounted at
/data - The environment variables above
Health check: GET /api/health
- Open the landing page and click Try Navora.
- Complete real onboarding (names → Home Zone → QR pair → alerts).
- Share the care-circle invite link; open a second browser as another caregiver and show I can’t / Take over.
- Pair a patient phone and walk a real exit → alert → family response → return home.
- The included JSON persistence is suitable for a single-container hackathon deployment.
- Run only one backend instance against a given data file.
- For horizontal scaling, replace the file persistence and in-memory WebSocket presence with a shared database/pub-sub layer.
- iOS background Web Push requires installing the PWA to the Home Screen first.
- Browser background geolocation remains constrained by the operating system; Navora does not imply native-app background guarantees.