npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-rook-sdk

v5.1.0

Published

Extract health data from health connect, apple health and samsung health to transform to a RookScore

Readme

react-native-rook-sdk

Purpose

This repo exposes the ROOK mobile SDKs to React Native APPs so they can configure ROOK, request permissions, read on-device health data, trigger sync flows, and manage API data_source connections on iOS and Android.

The same paragraph lives in foundations/purpose.md. Foundations is the source of truth.

Context

Read these before changing anything:

  • foundations/, the purpose, requirements, glossary, user stories, and AGENTS.md that govern this repo.
  • service-manifest.yaml, the machine-readable inventory of components, dependencies, and public documentation links.
  • docs/CONTEXT.md, the architecture diagram and data flow narrative for the SDK.

If you are an AI agent, read foundations/AGENTS.md first.

Top related repos:

  • Upstream: none verified in this repo today; owner confirmation pending.
  • Downstream: host React Native APP repos that integrate this package.
  • Sibling: the underlying ROOK native SDK repos or package sources; exact repo mapping pending owner confirmation.
  • Shared infra: docs.tryrook.io for public React Native SDK documentation.

If you change an exported API, permission flow, or native dependency, update the manifest and the example APP in the same PR.

Architecture

The SDK has three main layers:

  • A TypeScript surface that exports RookSdk, RookSyncGate, and useRook* hooks from src/.
  • An iOS bridge in ios/ backed by the RookSDK pod.
  • An Android bridge in android/ backed by ROOK Health Connect, Samsung Health, and API Sources libraries.

See docs/CONTEXT.md for the Mermaid diagram and flow details.

Tech stack

  • TypeScript, React Native, Turbo Modules, and npm workspaces.
  • Kotlin for the Android bridge and Swift or Objective-C++ for the iOS bridge.
  • Jest for unit tests.
  • GitHub Actions for CI.
  • react-native-builder-bob for package builds.
  • Public package distribution through npm.

Setup

Prerequisites:

  • Node.js v22.20.0 from .nvmrc.
  • npm and the Node.js version from .nvmrc (v22.20.0).
  • JDK 17 for Android builds.
  • Xcode 16.3 and CocoaPods for iOS builds.

Local install:

npm install
cd example
bundle install
bundle exec pod install --project-directory=ios
cd ..

Run

Use the example APP for manual validation:

npm run example -- start
npm run example -- android
npm run example -- ios

The example APP currently mounts AndroidStep in example/src/App.tsx. To validate a different hook or flow, switch the mounted screen first.

Test

npm run lint
npm run typecheck
npm test -- --coverage
npm run prepare

CI also builds the example APP for Android and iOS through Turbo tasks defined in the repo workflow.

Coverage threshold for this repo: 60 percent on new code per the current SonarCloud Stage A target in the playbook. Current repo reality is lower because only src/__tests__/index.test.tsx exists today as a placeholder, so meaningful test work is still pending.

Endpoints

This repo does not expose an HTTP API or an OpenAPI contract. It is an SDK package.

Configuration

The main runtime inputs come from RookSyncGate and NativeRookSdk:

  • environment: sandbox or production.
  • clientUUID: ROOK client identifier.
  • secret: ROOK client secret.
  • bundleId: iOS host APP bundle identifier.
  • packageName: Android host APP package name.
  • enableLogs: opt-in local logging.
  • enableBackgroundSync: background sync toggle for supported flows.

Do not commit real credentials. Keep secrets in local development tooling only.

Deployment

This repo is published as a versioned npm package. Release automation is configured through release-it, and CI in .github/workflows/ci.yml validates lint, typecheck, Jest coverage, package build, and example APP builds before merge.

Operational notes

  • README.md was previously a generated placeholder and did not describe the real exported API.
  • The test command is wired in CI, but the current suite is not representative of the SDK surface yet.
  • The repo still contains Yarn workspace metadata, but this documentation now uses npm commands by convention.
  • Android initRook maps environment=production to production for Health Connect and API Sources, but Samsung still uses sandbox in android/src/main/java/com/rooksdk/RookSdkModule.kt; owner confirmation is still needed before that behavior is treated as intentional.
  • Public docs are referenced from code at docs.tryrook.io, but the full page inventory still needs owner confirmation.

Owners

Current inferred owner from package metadata:

Tech lead and CODEOWNERS still need explicit confirmation in repo-profile.yaml and service-manifest.yaml.

Related

  • CONTRIBUTING.md
  • foundations/
  • docs/CONTEXT.md
  • service-manifest.yaml
  • https://docs.tryrook.io/docs/category/reactnative

License

MIT