SparkyFitness is a large, self-hosted fitness and health tracking platform. It is primarily an application: a full-stack monorepo with an Express + PostgreSQL backend, a React web frontend, a React Native/Expo mobile app, and a Python FastAPI Garmin microservice, all coordinated by a shared TypeScript package containing Zod schemas, constants, and domain algorithms. The product covers nutrition, workouts, sleep, fasting, mood, cycle/pregnancy, medications, symptoms, water intake, mindfulness, and health-provider data from Garmin, Fitbit, Withings, Oura, Polar, Strava, Google Health, and others. It also includes an AI chatbot with tool calling, barcode scanning, CSV/FIT imports, and native HealthKit/Health Connect sync. The dominant data flow is client hooks calling typed API service layers, which hit Express routes backed by PostgreSQL with row-level security. External wearable integrations refresh OAuth tokens under row locks and use provider sync claims to avoid duplicate imports. The mobile clients also directly read/write platform health stores, and a large migration set evolves the schema with careful backfills and deduplication. The repository is not a data-research repo; there are no analytical notebooks or dbt-style pipelines. Its character is clearly a production application with an unusually wide feature surface. The codebase shows strong engineering discipline: shared Zod schema triples, consistent TanStack Query key factories, central cache invalidation hubs, provider sync concurrency controls, and extensive Vitest/Jest tests, including regression tests pinned to GitHub issue numbers. The main risks are breadth-driven complexity: many external integrations, native iOS/Android/watch targets, manual patches to generated schemas, and some duplicated logic across web and mobile. Overall it is actively maintained, well-tested, and offers several genuinely reusable patterns.
HealthGPT is an iOS application that enables users to interact with their Apple Health data using large language models (LLMs) in a conversational interface. Built on the Stanford Spezi modular framework, the app supports three LLM execution modes: remote OpenAI (GPT-3.5/4), on-device local models (Llama3 via MLX), and privacy-preserving fog nodes within the local network. The architecture follows a monolith application pattern with clear separation of concerns: HealthDataFetcher queries HealthKit for steps, sleep, heart rate, etc.; HealthDataInterpreter prepares the LLM context with a system prompt generated from the fetched data; and the SwiftUI ChatView manages the conversation flow. External dependencies include Spezi modules (HealthKit, LLM, Onboarding, Storage) and OpenAI API. The codebase is well-structured with SwiftLint enforcement, comprehensive UI and unit tests, CI/CD pipelines via GitHub Actions and Fastlane, and an automated TestFlight deployment workflow. While the app is tightly coupled to the iOS ecosystem and Apple HealthKit, the data fetching, prompt generation, and LLM orchestration patterns are cleanly abstracted and potentially reusable in other health-related Swift applications.