WP Manifestindependent plugin directory
manifest / integrations / 4wp-health

4WP Health

Connect health data providers (Google Health / Fitness API first). OAuth per user, REST API, charts and trainer sharing planned.

by 4wpdev · github.com/4wpdev/4wp-health · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/4wpdev/4wp-health/archive/refs/heads/main.zip

Connect Google Health / Fitness data to WordPress — per-user OAuth, dashboard charts, Gutenberg blocks, and REST API.

Description

4WP Health lets logged-in users connect personal health data sources. Phase 1: Google Health via Google OAuth and the Fitness API (activity, steps, distance, calories, exercise days).

A plugin by 4wp.dev. 4WP is our project brand; the letters "WP" appear only as part of that brand name, not as a reference to WordPress. This plugin is not affiliated with, endorsed, or sponsored by WordPress.

Source code: github.com/4wpdev/4wp-health

Key features

  • Google Health OAuth — per-user connect; tokens stored server-side
  • Admin dashboard — steps, distance, calories, exercise days charts with period controls
  • Gutenberg blocks — metric charts and customer picker for trainers (LMS planned)
  • REST API — settings, sync, metrics, dashboard aggregates
  • Provider registry — pluggable architecture (Apple Health, Strava planned)

Privacy

Health samples are stored in your WordPress database and shown only to the connected user (or admins with explicit capability). No data is sent to 4wp.dev.

Development

Human-readable PHP in src/; blocks and dashboard widgets require npm run build (output in build/). GitHub repository above.

Run tests: composer install && composer test && npm run build

Blocks

This plugin provides 5 blocks.

  • Health Steps (forwp/health-steps) — daily steps vs goal
  • Health Distance (forwp/health-distance) — distance bar chart
  • Health Calories (forwp/health-calories) — active calories bar chart
  • Health Exercise Days (forwp/health-exercise-days) — exercise ring
  • Health Customer Picker (forwp/health-customer-picker) — trainer view of a user's metrics

External services

This plugin connects to Google OAuth and the Google Fitness API when a logged-in user clicks Connect.

  • What data is sent: OAuth authorization request; after consent, server-side API calls to read fitness datasets the user granted.
  • When: Only when an administrator saves OAuth credentials and a user initiates Connect or Sync.
  • Terms: Google API Terms of Service
  • Privacy: Google Privacy Policy

Installation

  1. Upload the plugin to /wp-content/plugins/4wp-health/ or install from the Plugins screen.
  2. Activate 4WP Health.
  3. Run npm install && npm run build if build/ is missing (development checkout).
  4. Open 4WP Health in wp-admin → save Google OAuth Client ID and Secret; enable Fitness API in Google Cloud.
  5. As user: click Connect Google Health and sync.

Frequently Asked Questions

Does Apple Health work in the browser?

Not yet. Apple Health has no web OAuth; a future release may use an iOS bridge or aggregator.

Who can see health data?

Each user's synced data is tied to their WordPress account. Trainers/admins need appropriate capabilities for customer picker and health data admin screens.

Screenshots

  1. Admin — Google Health settings and OAuth connect.
  2. Dashboard — steps, distance, calories, exercise days charts.
  3. Block editor — Health Steps block preview.
  4. Health data admin — sample browser.

Changelog

0.4.0

  • Dashboard charts (steps, distance, calories, exercise days) with period controls.
  • Gutenberg blocks for metrics and customer picker.
  • Google Fitness sync service, hourly metrics, goal settings.
  • REST dashboard and metrics endpoints.
  • wp-admin dashboard widgets bundle.

0.1.0

  • Initial scaffold: provider registry, Google Health OAuth, admin UI, REST settings.

Upgrade Notice

0.4.0

Dashboard charts, Gutenberg blocks, Fitness sync, and REST metrics API.

0.1.0

First public scaffold.