How cvanshu-dev/resilio works
RESILIO is an Expo app for personnel wellness and officer oversight, with a separate ML inference service. Its principal workflow is role-based access to personnel health, check-in and duty inputs, followed by baseline-aware risk and outcome analysis, interpretation and recommendations; officers have separate monitoring and support views. The sampled intelligence orchestrator explicitly wires the analysis stages. Route internals and health-data acquisition wiring were not sampled, so those connections are left out rather than inferred.
Main entry points: intelligenceEngine.ts Analysis orchestrator · index.tsx Role dispatch · login.tsx Public access · AuthProvider.tsx Auth and profile
Components 28
Role-based app
- Role dispatch
src/app/index.tsx - Public access
src/app/(public)/login.tsx - Personnel area
src/app/(personnel)/index.tsx - Officer area
src/app/(officer)/index.tsx - Officer alerts
src/app/(officer)/alerts.tsx - Officer analytics
src/app/(officer)/analytics.tsx - Personnel oversight
src/app/(officer)/personnel-list.tsx
Wellness inputs
- Wellness check-in
src/app/(personnel)/checkin.tsx - Duty tracking
src/app/(personnel)/duty.tsx - Health view
src/app/(personnel)/health.tsx - Support requests
src/app/(personnel)/support.tsx
Health intelligence
- Personal baseline
src/lib/baselineEngine.ts - Feature engineering
src/lib/featureEngine.ts - Risk assessment
src/lib/riskEngine.ts - Outcome inference
src/lib/outcomeEngine.ts - Interpretation
src/lib/interpretationEngine.ts - Recommendations
src/lib/recommendationEngine.ts - Analysis orchestrator
src/lib/intelligenceEngine.ts - ML feature payload
src/lib/mlFeatureEngine.ts - Trend analysis
src/lib/trendEngine.ts
Data and inference
- Auth and profile
src/providers/AuthProvider.tsx - Supabase client
src/lib/supabase.ts - HealthKit adapter
src/lib/healthkit.ts - ML client
src/lib/mlClient.ts
Other components
- Personnel user
- Officer user
- Supabase
- ML inference API
ml/app.py
Connections 18
- Personnel user → Public access: opens app
- Officer user → Public access: opens app
- Public access → Role dispatch: continues
- Role dispatch → Auth and profile: reads session
- Role dispatch → Personnel area: routes personnel
- Role dispatch → Officer area: routes officers
- Auth and profile → Supabase client: queries profile
- Supabase client → Supabase: reads auth and profiles
- Analysis orchestrator → Personal baseline: calculates baseline
- Analysis orchestrator → Feature engineering: builds features
- Analysis orchestrator → ML feature payload: builds ML payload
- Analysis orchestrator → Risk assessment: calculates risk
- Analysis orchestrator → Outcome inference: infers outcomes
- Analysis orchestrator → Interpretation: builds interpretation
- Analysis orchestrator → Recommendations: generates advice
- Analysis orchestrator → ML client: requests prediction
- ML client → ML inference API: sends features
- Health view → HealthKit adapter: uses health data