How betolix/blix-health-tracker works
Blix is a health-tracking dashboard with an MCP interface for authenticated health-data access. The user-facing workflow displays and edits food, weight, blood-pressure, and target data; the React app reads and writes Amplify models, while the documented v2 also describes browser-local persistence and preloaded history. Separately, MCP requests pass through OAuth scope and identity checks before tool dispatch to health-data readers or writers. The excerpts show the schema, client calls, and key dispatches; some runtime wiring and dashboard details are unsampled.
Main entry points: identity-probe-server.ts Health tool server · cognito-owner.ts Owner resolution · identity-probe-handler.ts MCP request handler · main.tsx Health dashboard
Components 17
Dashboard
- Health dashboard
src/main.tsx - Sign-in UI
src/main.tsx
Health Data
- Health models
amplify/data/resource.ts - Amplify data store
amplify/backend.ts - Food entry reads
amplify/functions/blix-mcp/food-entry-reader.ts - Food entry writes
amplify/functions/blix-mcp/food-entry-writer.ts - Vital reads
amplify/functions/blix-mcp/vital-reader.ts - Vital writes
amplify/functions/blix-mcp/vital-writer.ts - Target reads
amplify/functions/blix-mcp/daily-target-reader.ts - Target writes
amplify/functions/blix-mcp/daily-target-writer.ts
MCP Access
- MCP request handler
amplify/functions/blix-mcp/identity-probe-handler.ts - Health tool server
amplify/functions/blix-mcp/identity-probe-server.ts
Identity
- OAuth scopes
amplify/functions/blix-mcp/oauth-scope.ts - Auth0 token checks
amplify/functions/blix-mcp/auth0-probe.ts - Owner resolution
amplify/functions/blix-mcp/cognito-owner.ts
Other components
- Dashboard user
- MCP client
Connections 22
- Dashboard user → Sign-in UI: signs in
src/main.tsx - Sign-in UI → Health dashboard: renders
src/main.tsx - Dashboard user → Health dashboard: tracks health
README.md - Health dashboard → Health models: uses schema
src/main.tsx - Health dashboard → Amplify data store: reads and writes
src/main.tsx - Health models → Amplify data store: defines models
amplify/backend.ts - MCP client → MCP request handler: sends requests
- MCP request handler → Auth0 token checks: verifies tokens
amplify/functions/blix-mcp/identity-probe-handler.ts - MCP request handler → OAuth scopes: checks scopes
amplify/functions/blix-mcp/identity-probe-handler.ts - MCP request handler → Health tool server: dispatches tools
amplify/functions/blix-mcp/identity-probe-handler.ts - Health tool server → Food entry reads: reads entries
amplify/functions/blix-mcp/identity-probe-server.ts - Health tool server → Food entry writes: writes entries
amplify/functions/blix-mcp/identity-probe-server.ts - Health tool server → Vital reads: reads vitals
amplify/functions/blix-mcp/identity-probe-server.ts - Health tool server → Vital writes: writes vitals
amplify/functions/blix-mcp/identity-probe-server.ts - Health tool server → Target reads: reads targets
amplify/functions/blix-mcp/identity-probe-handler.ts - Health tool server → Target writes: writes targets
amplify/functions/blix-mcp/identity-probe-handler.ts - Food entry reads → Owner resolution: resolves owner
amplify/functions/blix-mcp/food-entry-reader.ts - Food entry writes → Owner resolution: resolves owner
amplify/functions/blix-mcp/food-entry-writer.ts - Vital reads → Owner resolution: resolves owner
amplify/functions/blix-mcp/vital-reader.ts - Vital writes → Owner resolution: resolves owner
amplify/functions/blix-mcp/vital-writer.ts - Target reads → Owner resolution: resolves owner
amplify/functions/blix-mcp/daily-target-reader.ts - Target writes → Owner resolution: resolves owner
amplify/functions/blix-mcp/daily-target-writer.ts