DEV Community

Ravi Seta
Ravi Seta

Posted on

Building Privacy-First Personal Activity Insights in React Native

After implementing a 30-Day Activity Calendar in EdgeFit, I wanted to move beyond simply displaying fitness metrics.

The next milestone was Personal Activity Insights.

EdgeFit is my privacy-first fitness companion built using React Native, TypeScript, HealthKit, and SQLite.

What's new?

Activity Consistency

Understand how many days have recorded activity across a recent period.

Weekly Step Comparison

Compare average daily steps across consecutive weeks, while accounting for missing data.

Exercise Frequency

Understand how many different days contain recorded workouts.

The engineering challenge

One important lesson when working with health data is that missing data is not the same as zero activity.

If a metric is unavailable, treating it as zero could produce misleading comparisons and insights.

That's why I'm focusing on explainable calculations and data-coverage requirements.

Why not use AI immediately?

I want to explore on-device machine learning, but first I need a deterministic baseline.

Rule-based insights are easier to test, explain, and evaluate.

Later, I can compare them with a small on-device model to determine whether machine learning offers measurable improvements.

Privacy-first architecture

EdgeFit builds on HealthKit and locally persisted activity data. Personal Activity Insights extends this existing architecture without requiring a cloud AI service.

What's next?

My next goal is to experiment with on-device ML and compare its usefulness, latency, memory consumption, and energy usage against deterministic insights.

GitHub: https://github.com/raviseta/edgefit

I'd love feedback from other mobile developers working with HealthKit, privacy-first architecture, or on-device intelligence.

Tags: reactnative, ios, privacy, healthtech

Top comments (2)

Collapse
 
davekurian profile image
Dave Kurian •

Your missing-vs-zero point is the key trust boundary here. I’d show data coverage next to each insight (for example, 5 of 7 days) and keep days with unknown access or a sync gap out of the denominator; a real zero-activity day should still count. A test with the same week represented as valid zeroes versus unavailable days would catch the difference. Do you model those states separately?

Collapse
 
raviseta profile image
Ravi Seta •

Nice catch. Thanks for the feedback. I will fix this in next version. Thanks again.