Skip to content

and3rn3t/health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

802 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VitalSense

Health monitoring platform: Apple Health insights, fall risk detection, emergency alerts, caregiver dashboards.

iOS Swift TypeScript React License CI codecov iOS CI

Features

  • Health Data Visualization — Import and display Apple Health metrics with trend analysis
  • Fall Risk Assessment — Real-time gait, balance, and mobility scoring
  • Emergency Detection & Response — Automatic fall detection with caregiver alerts
  • Caregiver Dashboard — Remote monitoring for family and healthcare providers
  • Real-time Sync — WebSocket-based live data streaming between iOS and web

Tech Stack

Layer Tech
Frontend React 19, TypeScript, Vite, Tailwind v4, Radix UI, TanStack Query
Backend Cloudflare Workers (Hono), Durable Objects, KV/R2
iOS Swift, SwiftUI, HealthKit, CoreML
Auth Auth0 with JWT (JWKS + HS256 fallback)
Testing Vitest, Playwright, XCTest

Quick Start

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Start Cloudflare Worker locally
pnpm cf:dev

iOS (Mac required)

open ios/Andernet-Posture/Andernet\ Posture.xcodeproj

Docker (optional)

docker compose up --build -d
# Worker: http://localhost:8789

Key Commands

pnpm dev              # Vite dev server
pnpm build            # Build web app
pnpm build:worker     # Build Cloudflare Worker
pnpm test             # Run Vitest
pnpm lint             # ESLint
pnpm type-check       # TypeScript validation
pnpm validate         # lint + type-check + test
pnpm cf:dev           # Local Workers preview
pnpm deploy:prod      # Deploy to production

Architecture

iOS App (HealthKit) ──► Cloudflare Worker (Hono) ◄── React Web App
                              │
                    ┌─────────┴──────────┐
                    │                    │
              Cloudflare KV        Cloudflare R2
              (health data)        (files/audit)
  • React app builds to dist/, served as Worker static assets
  • Worker handles /api/* routes, /ws WebSocket upgrade, and static serving
  • Durable Objects manage HealthWebSocket sessions and RateLimiter enforcement
  • iOS app syncs health data via WebSocket bridge

Project Structure

src/
├── components/        # React components (ui/, health/, gamification/)
├── hooks/             # Custom hooks (useAuth, useLiveHealthData, useWebSocket)
├── lib/               # Utilities, config, health processors
├── schemas/           # Zod schemas for health data validation
└── worker/            # Cloudflare Worker (routes/, middleware, Durable Objects)
ios/                   # Native iOS app (Andernet Posture)
docs/                  # Documentation hub
scripts/               # Build, CI, config sync
e2e/                   # Playwright E2E tests

Documentation

Contributing

See CONTRIBUTING.md for setup, code style, and PR checklist.

License

MIT

About

Tinkering with Apple HealthKit and the LiDAR sensors in Apple iPhones.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Generated from github/spark-template