Research infrastructure that lives in the real world
EdgeCare is an end-to-end research platform designed to help behavioral-health researchers study how everyday routines, environments, and device-use patterns relate to participant well-being. The system combines an Android application, a serverless AWS backend, and a researcher-facing web dashboard.
Participants use the mobile app to complete scheduled assessments while approved contextual signals are recorded in the background. Researchers use the dashboard to configure surveys, monitor collection health, explore data, and investigate device-level problems without relying on participants to manually report every technical issue.
The difficult part was not simply reading phone sensors. EdgeCare needed to collect heterogeneous data over long periods while handling Android background-execution limits, changing permissions, unreliable connectivity, device restarts, and delayed uploads. It also needed to treat event-driven signals, such as a screen turning off, differently from periodic signals, such as a Wi-Fi scan.
End-to-end platform architecture
Two experiences, one research system
The participant side provides authentication, guided permission setup, scheduled surveys, and clear study-participation states. The researcher side provides participant and device management, survey configuration, sensor-data exploration, export, diagnostics, and collection-health monitoring.
Depending on the study protocol and permissions granted by the participant, the mobile application can collect:
- Physical activity states, transitions, and step counts.
- Periodic and activity-triggered location fixes.
- Nearby Wi-Fi and Bluetooth context using pseudonymous identifiers.
- Screen state, app usage, notification metadata, battery, and charging events.
- Call and SMS metadata without retaining message or call content.
- Sleep classifications and Health Connect summaries.
- Calendar context represented through hashes or derived categories.
- Ambient-light context and on-device audio-scene classifications.
- Scheduled survey responses and cloud-synchronized survey state.
Cadence follows the source
EdgeCare does not force every data source into one collection model. Physical activity and screen changes are callback-driven. Bluetooth, Wi-Fi, location, battery, and service-health snapshots run on an approximately 15-minute native cycle. Other sources are collected daily or when Android produces a relevant event.
Location can also be captured after a moving participant remains stationary for a dwell period. This produces a meaningful place observation without treating every activity callback as a new visit or creating unnecessary duplicate records.
Android beyond the JavaScript lifecycle
The participant application uses React Native, Expo, TypeScript, and custom Kotlin modules. React Native owns the interface, authentication, surveys, and shared application logic. Kotlin handles work that must survive beyond the JavaScript UI lifecycle: a persistent foreground service, activity recognition, screen and charging callbacks, periodic native collectors, boot recovery, local database access, and background uploads.
Each collector maintains its own permission checks and checkpoint. Bluetooth failure does not stop Wi-Fi, and denied location access does not prevent battery or survey collection. This limits cascading failures and makes later missing-data analysis more precise.
Reliable collection and synchronization
Offline first, cloud durable
Collected records are written to SQLite before they leave the phone. SQLite acts as a durable offline queue, allowing data captured while the network is unavailable or the app interface is closed to remain recoverable until synchronization succeeds.
Uploads are grouped by source, batched, authenticated, compressed, and retried later when the network or account state is unavailable. UUIDs and synchronization state support idempotent processing and safe retries. Collection time and upload time remain separate by design.
A serverless backend for research operations
The backend is a Python service deployed through AWS Lambda. It validates requests with Pydantic, authenticates mobile and administrative traffic with Amazon Cognito, and stores participant, sensor, survey, device, and diagnostic records in DynamoDB.
The API supports sensor ingestion, participant and device administration, survey configuration and state, exports, collection-health summaries, and time-limited diagnostic logging. This lets operational tools share the same authenticated data model as the participant application.
The researcher dashboard
The dashboard is built with React, TypeScript, Vite, TanStack Query, Tailwind CSS, and Recharts. It provides cohort summaries, participant and device views, a filterable data explorer, CSV export, survey configuration, user administration, location visualization, and diagnostic-log inspection.
Data-quality alerts appear in the dashboard and can generate browser notifications when a new actionable gap is detected. Existing alerts are initialized without producing a burst of old notifications, and dismissed occurrences are tracked so the researcher is alerted to new problems rather than repeatedly warned about the same one.
Data-quality monitoring and diagnostics
A participant can be flagged when no upload has arrived for 24 hours or when selected periodic sources contain a one-hour gap in captured timestamps. That distinction matters: a delayed upload does not necessarily mean the phone failed to collect data.
Survey state that follows the participant
Survey windows, completion states, and missing states are stored in the cloud so they remain consistent across devices. A survey completed on one phone should not reappear as open on another, and an expired incomplete window should be represented as missing rather than silently disappearing.
Privacy by collection design
Privacy decisions are part of the collection architecture, not a cleanup step after ingestion. EdgeCare minimizes sensitive content before it becomes a cloud record.
- Raw ambient audio is classified on the phone and discarded.
- Notification text is not read or retained.
- Nearby device and access-point identifiers are pseudonymized.
- Communication and calendar identifiers are hashed where collected.
- Permissions are requested explicitly and unavailable collectors remain inactive.
- Diagnostic sessions are configurable and time-limited.
Operational observability
Service heartbeats, collection checkpoints, permission reporting, diagnostic sessions, cloud-side gap detection, and browser alerts provide evidence about what happened on a participant device. Researchers can distinguish a stopped service, denied permission, empty observation, delayed upload, and genuine collection gap.
That observability is especially important in longitudinal work. A dashboard that only shows missing rows cannot explain whether the phone failed, the network was unavailable, or the source legitimately produced no observation.
My contribution
Turning sensing features into a reliable system
I contributed across the React Native application, native Kotlin services, SQLite persistence, Python backend, and React dashboard as part of a collaborative development team. My work focused on integrating individual sensing features into a collection system that could recover, synchronize, and explain its own failures.
I helped repair the physical-activity-to-location flow, added stationary dwell and deduplication behavior, fixed environmental-context persistence and upload paths, and organized periodic collectors around independent 15-minute checkpoints. I also improved the permission flow so newly granted access could restart blocked collectors without requiring a manual app restart.
On the survey side, I worked on survey windows, missing and completed states, and cloud synchronization across devices. On the researcher dashboard, I added location visualization and collection-health alerts for 24-hour upload inactivity and one-hour gaps in selected periodic data. I later extended those alerts to browser notifications and hardened them against stale or duplicate notifications.
The work required debugging across React Native, Kotlin, SQLite, AWS Lambda, DynamoDB, Cognito, and React. It also meant testing the difference between USB development behavior and production Android behavior, tracing failures across captured and uploaded timestamps, reviewing schema migrations, and preserving teammates' work while integrating fixes across several repositories.
What EdgeCare demonstrates
EdgeCare is more than a sensor demo or a prototype dashboard. It connects on-device background collection to local durability, authenticated ingestion, cross-device survey state, privacy controls, operational diagnostics, and actionable monitoring.
The project demonstrates full-stack ownership where correctness depends on time, operating-system behavior, permissions, local persistence, cloud state, and researcher usability. Its strongest engineering themes are mobile systems, offline-first architecture, Android background execution, serverless design, privacy-conscious data handling, observability, and research-tool UX.
Technology
- Mobile
- React Native, Expo, TypeScript, Kotlin, Android foreground services, Activity Recognition, Health Connect, SQLite, Firebase Cloud Messaging
- Backend
- Python, Pydantic, AWS Lambda, DynamoDB, Amazon Cognito, GitHub Actions
- Web
- React, TypeScript, Vite, TanStack Query, Tailwind CSS, Recharts, Web Notifications API