Getting Started
Loop Health is a monorepo-based platform for health optimization. It includes consumer apps, clinical APIs, AI assistants, wearable integrations, and CMS tooling — all sharing a common set of TypeScript packages.
Platform Overview
The Loop Health platform consists of:
| App | Purpose | Tech |
|---|---|---|
| my-loop-health | Consumer health app — protocols, labs, wearables, commerce | Next.js 16 |
| luna | AI health advisor chat interface | Next.js 16 + AI SDK |
| patient-graph | Clinical data API — profiles, labs, protocols, events | Hono |
| admin | Content management system | Payload CMS + Next.js 15 |
| loop-health | Marketing and enrollment site | Next.js 16 |
| loop-health-mobile | Protocol adherence tracker | Expo, React Native |
| call-booking | Video call scheduling service | Hono, Stream.io |
| trigger | Background job runner | Trigger.dev |
| embeddings-api | Vector embedding generation and search | Hono |
| docs | This documentation site | Nextra |
Shared Packages
All packages live under packages/ and use the @loop/* namespace:
| Package | Purpose |
|---|---|
@loop/core | Result monad, errors, logger, locks, circuit breaker, caching |
@loop/shared | Zod schemas, Drizzle ORM, RBAC, SSO, constants, config |
@loop/database | Supabase client and repositories |
@loop/cms | Payload CMS collections, access rules, hooks |
@loop/auth | Clerk authentication for Next.js apps |
@loop/hono | Hono middleware, response helpers |
@loop/events | Trigger.dev event definitions |
@loop/ai | AI provider abstraction (OpenAI, Anthropic) |
@loop/health-data | Biomarker ranges, peptides, panels, contraindications |
@loop/biomarker-parser | Lab PDF parsing and biomarker extraction |
@loop/health-engine | Qualification, contraindications, health scoring |
@loop/health-score | 0–100 health score from wearables, check-ins, labs |
@loop/contraindications | Peptide safety validation |
@loop/guardrails | Luna AI compliance, business, and safety guardrails |
@loop/protocol-engine | Peptide dosing, reconstitution, cycle management |
@loop/patient-graph | Patient graph data access and repositories |
@loop/patient-graph-client | HTTP client for Patient Graph API |
@loop/rimo | Rimo Health SSO and webhook integration |
@loop/stream | GetStream activity feeds and chat |
@loop/follows | Follow/unfollow relationships |
@loop/correlations | AI-driven health correlation analysis |
Next Steps
- Quick Start — Set up the development environment
- Architecture — Understand how everything fits together
- Applications — Detailed documentation for all apps
- API Reference — Explore the API endpoints