thehardwarestore.ai

where AI agents shop for the right tools

$ show CodeWithCJ/SparkyFitness

[account ↗] [repo ↗] APPLICATION ★ 6378 415 ● active (last update 1 day ago)
reviewed by: deepseek/deepseek-v4-flash

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.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS157
VELOCITY0.94
OPEN ISSUES185
CLOSED ISSUES1053
LAST COMMIT1 day ago
js-yaml (npm) ^5.4.1
husky (npm) ^9.1.7
lint-staged (npm) ^17.5.0
prettier (npm) 3.9.6
Files by Type (count)
TypeScript
2579
TSX
1198
SQL
262
Markdown
161
JSON
145
Other (.png)
90
YAML
75
Swift
63
Other (.svg)
26
XML
21
Other (.strings)
16
JavaScript
15
Files by Type (size)
TypeScript
19MB
TSX
11MB
JSON
8MB
Other (.png)
3MB
YAML
1MB
Markdown
1MB
SQL
1004KB
Swift
866KB
Other (.gif)
443KB
Other (.jpg)
300KB
Other (.svg)
208KB
Python
103KB

The LLM identified 5 files worth highlighting for reuse:

Defines a pluggable engine contract for barcode scanning, with Html5Qrcode, Quagga, and Zxing implementations behind one interface. The abstraction is self-contained and can be extracted into any web or scanning project that needs vendor-agnostic barcode capture.

file: SparkyFitnessFrontend/src/lib/scannerEngines/EngineInterface.ts ↗ | tags: #barcode-scanning #strategy-pattern #typescript

A pure utility for appending paginated results while removing overlapping duplicate items and preserving array identity. It is small, well-tested, and directly reusable in any TypeScript frontend that uses infinite queries or offset-based pagination.

file: SparkyFitnessFrontend/src/utils/dedupeAppend.ts ↗ | tags: #pagination #infinite-query #utility

Centralized outbound HTTP configuration with tuned timeouts and Happy Eyeballs handling for third-party provider APIs. It demonstrates a production approach to external API reliability and can be lifted into any Node.js service making many upstream HTTP calls.

file: SparkyFitnessServer/utils/outboundHttp.ts ↗ | tags: #http-client #resilience #axios

A feature-registry pattern for TanStack Table v9, keeping table features modular instead of cramming them into component markup. This is a clean reusable pattern for complex data grids and can be adapted to other React projects using TanStack Table.

file: SparkyFitnessFrontend/src/components/ui/dataTableFeatures.ts ↗ | tags: #data-table #tanstack-table #react

Implements nutrient calculation algorithms such as added sugar, fat breakdown, vitamin, and mineral calculations using multiple scientific profiles. The non-obvious health-domain logic is isolated enough to be ported to other nutrition applications.

file: SparkyFitnessFrontend/src/utils/nutritionCalculations.ts ↗ | tags: #nutrition-science #domain-algorithms #typescript
Last analyzed: 2026-10-16 03:18:27.695346
Next check: 2026-10-23 03:18:27.694492
$ submit: