Product Architecture

How PulseFit works

System overview

Mobile-first with realtime sync, AI personalization, and a deterministic rules engine for safety.

Mobile

API

Data

AI

Rules

Push

Core data flow

iOS / Android
Edge API
REST + WS
Edge API
Postgres + Redis
ACID writes
Wearables
Ingest worker
OAuth · webhooks
Ingest worker
Feature store
stream
Feature store
AI planner
vector + ctx
AI planner
Mobile
personalized plan

AI recommendation pipeline

  1. 1

    Collect

    Workouts, HRV, sleep, nutrition, wearable streams

  2. 2

    Featurize

    Rolling windows: 7/30/90d load, ACWR, fatigue

  3. 3

    Score

    Per-user readiness 0–100 (LightGBM)

  4. 4

    Generate

    GPT-4o produces a candidate plan with rationale

  5. 5

    Validate

    Rules engine blocks unsafe volume/intensity

  6. 6

    Deliver

    Push + in-app card with explainability

Rules engine

Declarative safety guardrails — every AI plan passes through them.

rule "max-weekly-volume"
  when load_next > 1.4 * avg_4w
  then cap_load_to(1.3 * avg_4w)

rule "readiness-floor"
  when readiness < 35
  then swap_to("Mobility 30m")

rule "novice-progression"
  when level == "Beginner" and weeks < 4
  then deload_every(7)

Realtime sync

Optimistic writes< 50ms perceived
Conflict resolutionCRDT (last-write-wins per field)
Push fanoutAPNs + FCM, p95 1.2s
At-rest encryptionAES-256 + per-tenant keys

Stack at a glance

MobileReact Native
BackendNode + Fastify
DBPostgres 16
CacheRedis 7
AIOpenAI + LightGBM
AuthFirebase Auth
StorageS3-compatible
ObservabilityOTel + Grafana