HealthCam engineering

Engineering decisions behind a local-first AI health platform.

HealthCam is not only a webcam health-monitoring app. It is a modular platform for running computer vision analyzers locally, orchestrating services, ingesting telemetry, processing raw data, and generating dashboard-ready insights.

Local-first AIMicroservicesPlugin architectureTelemetry pipelinesDockerized analyzers

Current implementation

Working platform boundaries, with distribution still in progress.

HealthCam is an active developer preview. The local service pipeline, authenticated ingestion, BPM aggregation, and dashboard are working. The extension model has an implemented foundation, while end-user installation and automatic plugin-specific data and UI integration remain roadmap work.

Implemented

  • Manifest-driven installation and booting of services in the checkout.
  • Capability registry and parallel analyzer orchestration.
  • Authenticated telemetry ingestion and PostgreSQL storage.
  • Five-minute BPM aggregation with daily reconciliation.

In progress

  • Packaged installer and remote Store-to-device distribution.
  • Automatic plugin-specific SQL and dashboard integration.
  • Complete blink dashboards, alerts, and broader hardware validation.
  • Full automatic execution of manifest HTTP health checks.

Local machine

  • Webcam capture
  • AI inference
  • Analyzer services
  • Local orchestration

Cloud platform

  • Authentication
  • Telemetry storage
  • SQL transformations
  • Dashboards

Extension model

  • Service manifests
  • Capability discovery
  • Shared telemetry envelope
  • Planned distribution

The main architectural idea is simple: sensitive and expensive computation stays close to the user’s hardware, while the cloud provides the product layer around it. Stable service and telemetry boundaries make analyzers replaceable; new metrics still require analyzer-specific validation, data transformations, and product UI.

What this demonstrates

From prototype to platform architecture.

These decisions show how HealthCam evolved from a thesis prototype into a modular platform architecture. The project required product thinking, backend architecture, local service orchestration, data pipeline design, AI integration, and a developer-facing extension model.

Designed local-first AI processing for sensitive webcam data.
Built a service architecture around independent local components.
Created the foundation for plugin-based analyzer installation.
Separated raw telemetry from dashboard-optimized insight tables.
Used scheduled aggregation to balance performance and flexibility.
Combined native execution with Dockerized AI services.

Architecture choices

Five decisions that shaped the platform

These decisions explain why HealthCam is structured as a platform instead of a single-purpose application. Each one solved a concrete engineering problem that appeared while moving from thesis prototype to a more extensible product architecture.

01

Engineering decision

Implemented

Capture and inference run locally; installation and hardware setup remain developer-oriented.

Local-first AI architecture

HealthCam keeps sensitive video capture and AI inference on the user’s machine, while the cloud handles authentication, dashboards, configuration, telemetry storage, and product experience.

Context

HealthCam processes sensitive webcam data and runs computer vision analyzers that may require significant compute. Sending raw video to the cloud would increase privacy risk, infrastructure cost, and latency.

Decision

I designed the platform so video capture and AI inference run locally on the user’s machine. The cloud is responsible for user accounts, dashboards, configuration, telemetry storage, and the overall product experience.

Why

  • Privacy: raw webcam and video data does not need to leave the user’s machine.
  • Scalability: inference compute is distributed across user devices instead of centralized on the server.
  • Cost: the cloud does not need to continuously process expensive video workloads.
  • Flexibility: different analyzers can run close to the hardware and use local resources.

Trade-offs

  • The local agent must handle different operating systems, hardware, dependencies, and device permissions.
  • Users need to install and run a local agent instead of using a fully cloud-based app.
  • Not every analyzer works on every device. For example, CUDA-dependent modules cannot run on a Mac without NVIDIA GPU support.

Result

This architecture makes HealthCam more privacy-preserving and economically scalable, while turning the local agent into a core part of the product rather than a simple helper script.

02

Engineering decision

Foundation implemented

Manifests, configured booting, capability discovery, and a shared ingestion contract are implemented. Remote distribution and automatic SQL/UI integration are still in progress.

Plugin-based platform architecture

Analyzer services follow shared manifest and API conventions, reducing the changes needed to replace or add compatible implementations.

Context

Traditional software often requires modifying the core application whenever a new feature is introduced. In HealthCam, every new computer vision analyzer would otherwise require changes across service installation, orchestration, telemetry ingestion, cloud data processing, dashboard integration, and user interfaces.

Decision

I designed HealthCam around manifest-driven services rather than embedding every analyzer in the core agent. Current manifests declare runtime, capabilities, ports, lifecycle commands, hardware requirements, and shared mounts. A common analyzer API and ingestion envelope let compatible implementations reuse the capture and transport path.

Today, the booter installs and starts enabled services already present in the local checkout, then writes a runtime registry used for capability discovery. Remote Store-to-device installation, plugin-owned SQL transformations, and automatic dashboard registration are planned rather than complete.

Why

  • Extensibility: compatible analyzer implementations can reuse capture, orchestration, and telemetry transport.
  • Modularity: service-specific dependencies and lifecycle commands stay with the service.
  • Separation of responsibilities: analyzers own inference while the agent owns capture, orchestration, and transport.
  • Developer experience: manifests provide one consistent place to describe how a service runs.
  • Scalability: independent services keep analyzer complexity outside the core agent.
  • Consistency: every analyzer integrates through the same platform contract regardless of its internal implementation.
  • Marketplace path: the same boundaries provide a foundation for future distribution work.

Trade-offs

  • Plugin discovery, lifecycle management, and manifest validation introduce additional infrastructure complexity.
  • Every analyzer must conform to the platform contract and manifest conventions.
  • Compatibility between plugins and platform versions must be maintained over time.
  • Designing stable extension points requires more upfront architectural work than directly implementing features inside the core application.

Result

HealthCam now has the service boundaries and runtime conventions needed for an extensible analyzer platform. Distribution, automatic data transformations, and automatic dashboard integration remain product work.

03

Engineering decision

Implemented

Incremental aggregation is scheduled every five minutes; a daily job rebuilds a recent window for reconciliation.

Raw telemetry storage with pre-aggregated dashboard data

Raw telemetry is preserved as the source of truth, while pre-computed insight tables keep dashboards fast and scalable.

Context

HealthCam continuously generates telemetry from multiple analyzers, including heart rate measurements, application usage, eye strain metrics, and future computer vision outputs. Dashboards need fast access to historical trends, while future analyzers may need the original measurements to compute new metrics or validate algorithms.

Decision

I separated the storage layer into two complementary datasets. Raw telemetry is preserved as the source of truth, while dashboard-specific insight tables store pre-computed statistics optimized for visualization.

The dashboard reads from aggregated insight tables, while raw telemetry remains available for future processing, validation, and new analytics pipelines. Aggregation runs asynchronously through scheduled GitHub Actions: an incremental job is scheduled every five minutes, while a daily reconciliation job recomputes a recent window beginning two days before the latest summary date.

Why

  • Single source of truth: original telemetry is preserved and never lost through aggregation.
  • Dashboard performance: charts and statistics can be served without repeatedly scanning large telemetry datasets.
  • Near real-time user experience: frequent aggregation keeps dashboards responsive while avoiding expensive queries.
  • Future flexibility: historical raw telemetry can be reprocessed to generate new metrics without requiring users to collect new data.
  • Separation of concerns: telemetry ingestion and dashboard visualization evolve independently.
  • Reliability: the daily reconciliation job helps recover from missed scheduled executions, delayed uploads, or temporary processing failures.
  • Scalability: expensive aggregation work is performed once during ingestion instead of every time a dashboard is opened.

Trade-offs

  • Raw telemetry and aggregated insights intentionally duplicate part of the same information.
  • The ingestion pipeline becomes responsible for maintaining synchronization between datasets.
  • Scheduled aggregation introduces eventual consistency rather than immediate updates.

Result

HealthCam can support growing amounts of telemetry without increasing dashboard query complexity or cloud compute costs proportionally. Dashboards remain responsive, while raw telemetry keeps the platform open to future analytics and AI features.

04

Engineering decision

Implemented with operational gaps

Independent services and process monitoring are implemented; the full manifest HTTP-healthcheck sequence is not yet executed automatically.

Microservices instead of a monolithic architecture

HealthCam is split into independent services for capture, tracking, inference, notifications, orchestration, and cloud synchronization.

Context

HealthCam combines components with very different responsibilities, including webcam capture, application tracking, AI inference, notifications, orchestration, and cloud synchronization. These components require different technologies, release cycles, dependencies, and runtime requirements.

Decision

I separated the platform into independent services communicating through lightweight HTTP APIs. Each service owns a focused responsibility and has its own runtime and lifecycle commands.

Why

  • Separation of concerns: each service focuses on a single responsibility.
  • Independent evolution: services can be modified and deployed without affecting unrelated components.
  • Extensibility: new analyzers and platform services can be introduced without restructuring the existing architecture.
  • Fault isolation: service boundaries make failures easier to identify and allow affected processes to be restarted separately.
  • Technology flexibility: each service can adopt the tools and runtime most appropriate for its purpose.
  • Scalability: computationally intensive services can evolve independently from lightweight platform components.

Trade-offs

  • The architecture is more complex than a monolithic application.
  • Services communicate over the network rather than through direct function calls.
  • Additional infrastructure is required for lifecycle management, orchestration, monitoring, and discovery.
  • More moving parts make debugging and deployment more operationally demanding.

Result

The platform evolved from a single application into a modular ecosystem of services. This architecture became the foundation for HealthCam’s plugin system, service orchestration, and future extensibility.

05

Engineering decision

Implemented

Capture and operating-system integrations run natively; the BPM and blink analyzers use Docker-based runtimes.

Hybrid native and containerized execution

Platform services run natively when they need OS and hardware access, while computation-heavy analyzers can run in Docker for isolation and reproducibility.

Context

HealthCam combines two very different categories of software. Some services need direct access to the operating system and hardware, such as webcam capture, application tracking, desktop notifications, and system integrations. Other components are research-grade computer vision analyzers with complex Python dependencies, GPU requirements, and changing machine learning environments.

Decision

I adopted a hybrid execution model. Platform services execute natively on the host machine, while computation-heavy analyzers are containerized with Docker whenever appropriate.

Why

  • Dependency isolation: AI analyzers bundle their own Python environments without affecting the rest of the platform.
  • Reproducibility: containerized analyzers execute consistently across different development and deployment environments.
  • Native hardware integration: platform services retain direct access to webcams, desktop APIs, notifications, and operating-system features.
  • Easier maintenance: dependency conflicts and “works on my machine” issues are significantly reduced.
  • Future analyzers can be added without introducing additional dependency conflicts into the host system.

Trade-offs

  • Docker becomes a platform dependency for containerized services.
  • The platform manages two execution environments instead of one.
  • Deployment and troubleshooting become more operationally complex.
  • Different execution models require additional lifecycle management and deployment logic.

Result

HealthCam combines the advantages of native operating-system integration with reproducible containerized AI execution. Infrastructure services stay lightweight, while AI analyzers can evolve independently with their own runtime environments.