DEV Community

Mandar Nilange
Mandar Nilange

Posted on

Open Sourcing Health Tracker Reports: A Privacy-First Health App Built with AI Assistance

TL;DR: I'm open-sourcing a complete Flutter health tracking app built primarily through AI-assisted development. This project serves as both a useful privacy-focused tool and a real-world exploration of AI's capabilities in production software development.


Table of Contents


What & Why

Health Tracker Reports is a privacy-first Flutter app for tracking medical reports and daily vitals. Upload PDFs for AI-powered biomarker extraction, log daily vitals, visualize trends, and generate shareable summaries - all while keeping your sensitive health data stored locally on your device.

Watch the demo

πŸ“Ί Watch the App in Action | ⭐ GitHub Repository

Why This Matters

This project was born from two key motivations:

1. Privacy-First Health Tracking: Most health apps either send your data to the cloud (privacy concerns), lack comprehensive features, or don't integrate lab reports with daily tracking. Health Tracker fills this gap with a privacy-first approach where sensitive health data never leaves your device.

2. Exploring AI-Assisted Development: The primary goal was to validate whether AI agents can handle production-ready software development - not just code snippets, but a complete, tested, architected application following best practices.

After experimenting with smaller projects (login screens, REST backends), I needed a real-world test case. A personal need to track medical reports and vitals at home provided the perfect opportunity.

Spoiler: AI agents can build production-ready software, with the right framework and human oversight.


The AI-Assisted Development Journey

This entire app was built primarily through AI-assisted development, following strict engineering principles.

The Approach: This is neither "vibe coding" nor the other extreme of rigid spec-driven development - I've been experimenting to get the best out of AI assistance while maintaining confidence in the generated code.

The Timeline: About 16 hours of active development time (spread across a week) - what would typically take weeks without AI assistance.

The Journey: I started experimenting with smaller apps, login screens, and REST backends. But a real need at home to track medical reports and vitals led to this comprehensive project.

By The Numbers

πŸ“Š Project Metrics:

  • 865+ passing tests (98.6% pass rate)
  • 69% overall code coverage (90%+ on core layers)
  • 100% TDD adherence on domain/data layers
  • ~15,000 lines of production code
  • ~10,000 lines of test code
  • 0 architecture violations
  • ~16 hours of active development vs. weeks traditionally

What I Learned

AI agents excel at:

  • βœ… Following strict TDD workflows when properly constrained
  • βœ… Implementing clean architecture patterns consistently
  • βœ… Generating comprehensive test suites
  • βœ… Maintaining documentation (CHANGELOG, commits, code comments)
  • βœ… Replicating patterns across the codebase

Humans remain essential for:

  • 🧠 Architecture decisions (which technologies to use)
  • 🎨 UX/UI design choices
  • βš–οΈ Trade-off analysis (privacy vs features)
  • πŸ” Strategic oversight and integration testing

The Framework

I developed a structured framework for AI-assisted development:

  • Context Documentation: 1,600+ line AGENTS.md with patterns and examples
  • Structured Specifications: Atomic task breakdowns in spec/ files
  • Clear Constraints: TDD-first, clean architecture, coverage minimums
  • Feedback Loops: The right checkpoints to maintain quality
  • Multiple AI Tools: Gemini Code Assist, GitHub Copilot, Claude, OpenAI Codex

This balanced approach avoids both extremes - it's neither "vibe coding" (hoping AI figures it out) nor rigid waterfall specs (over-constraining creativity).

I'll be sharing detailed insights on this framework in upcoming articles, covering:

  • How to structure projects for AI effectiveness
  • Prompt engineering for production code
  • The human-AI division of labor
  • Real examples of what worked and what didn't
  • Lessons learned from 15,000+ lines of AI-assisted code

Technical Highlights

Architecture: Built with Clean Architecture principles

  • Domain Layer: Pure Dart business logic, entities, and use cases
  • Data Layer: Repository implementations, Hive persistence, LLM integrations
  • Presentation Layer: Flutter UI with Riverpod state management

Tech Stack:

  • Flutter 3.x β€’ Riverpod β€’ Hive (100% offline) β€’ go_router
  • Multi-LLM support (Claude 3.5 Sonnet, GPT-4, Gemini)
  • fl_chart β€’ mocktail β€’ get_it + injectable

Key Technical Achievements:

  1. Multi-LLM Vision API Integration: Supports Claude, OpenAI, and Gemini for 95%+ extraction accuracy
  2. Dynamic Biomarker Normalization: LLM intelligently maps variations ("Hb" β†’ "Hemoglobin") using your historical data
  3. Unified Timeline: Seamlessly combines lab reports and daily vitals chronologically
  4. Medical-Grade Reference Ranges: Smart defaults for all vital types with status indicators
  5. Dual-Line Charts: Advanced charting for blood pressure trends (systolic + diastolic)

Key Features

  • πŸ“„ PDF Report Upload: Upload medical reports and extract biomarkers automatically using AI
  • πŸ’‰ Comprehensive Vital Tracking: Log blood pressure, SpO2, heart rate, temperature, weight, glucose, and more
  • πŸ“Š Interactive Trend Analysis: Visualize health metrics over time with beautiful charts
  • πŸ“‹ Unified Timeline: See lab reports and daily vitals in one chronological view
  • πŸ”’ 100% Privacy: All data stored locally on your device using Hive - no cloud uploads
  • πŸ”‘ Bring Your Own LLM: Use your own API keys (Claude, GPT-4, or Gemini) for data extraction
  • πŸ“€ Export & Share: Generate professional PDF summaries for doctors or export raw CSV data
  • 🎨 Modern UI: Material Design 3 with light/dark mode support

Platforms: iOS βœ… | Android βœ… | Web 🚧


Get Involved

I'm open-sourcing this project to:

  1. Help others who want privacy-focused health tracking
  2. Share learnings about AI-assisted development
  3. Collaborate on improving both the app and the AI development framework

Try It Yourself

πŸ’» Get started: Full setup instructions in the GitHub README

πŸ“– Explore the AI framework: Read AGENTS.md for the complete context documentation and patterns

How You Can Contribute

🀝 We Welcome Contributions In:

App Development:

  • Android platform testing and optimization
  • OpenAI/Anthropic LLM integration testing
  • PDF export format improvements
  • Accessibility enhancements
  • Localization support

AI Development Framework:

  • Share your AI-assisted development experiences
  • Suggest improvements to AGENTS.md patterns
  • Document what works/doesn't in your projects

Infrastructure:

  • CI/CD pipeline setup (GitHub Actions)
  • Automated testing and releases
  • App store deployment

Ways to Engage:

  • ⭐ Star the Repo: Help others discover this project
  • πŸ› Report Issues: Open an issue for bugs or suggestions
  • πŸ”€ Fork & Experiment: Use this as a template for your own AI-assisted projects
  • πŸ’¬ Discuss: Share your thoughts on AI-assisted development
  • πŸ“– Read the Code: Check out the clean architecture implementation
  • 🀝 Connect: Reach out on LinkedIn for discussions on AI-assisted development

Roadmap

Technical Enhancements:

  • πŸ“± Publish to App Store and Play Store
  • πŸ”¬ Local LLM support for enhanced privacy
  • 🌐 Web platform support
  • πŸ“ˆ Advanced analytics and insights
  • πŸ₯ Integration with health data standards (HL7, FHIR)

Functional Features:

  • The sky's the limit! Your creativity determines what's next :)
  • Open to suggestions and contributions from the community

Show Your Support

If you find this project valuable - whether as a health tracking tool or as an example of AI-assisted development:

  • ⭐ Star the repository on GitHub
  • πŸ“’ Share with others who might benefit
  • πŸ’¬ Join the discussion in issues and discussions
  • 🀝 Contribute to the codebase or documentation

Every star, issue, and contribution helps validate this approach and improve the framework.


⭐ Star on GitHub | πŸ“Ί Watch Demo | πŸ“– Read the Docs


Interested in AI-assisted development? Have experiences to share? Let's discuss in the comments, open an issue on GitHub, or connect on LinkedIn. Stay tuned for upcoming articles diving deep into the framework and lessons learned.


Built with ❀️ using Flutter and AI assistance

PS: Article written by AI assistant and reviewed by me :)

Top comments (0)