Packages
All shared packages live under packages/ and use the @loop/* namespace. This section provides reference documentation for each package.
Package Index
Foundational
| Package | Purpose |
|---|---|
| @loop/core | Result monad, error types, logging, distributed locks, rate limiting, circuit breaker, caching |
| @loop/shared | Zod schemas, Drizzle ORM, RBAC, SSO, types, constants, config |
| @loop/database | Supabase client, repositories, knowledge base |
Infrastructure
| Package | Purpose |
|---|---|
| @loop/cms | Payload CMS collections, access rules, hooks, Clerk auth |
| @loop/hono | Hono middleware, response helpers, checkout tokens |
| @loop/auth | Clerk authentication for Next.js apps |
| @loop/events | Trigger.dev event definitions and emitter |
Health & Clinical
| Package | Purpose |
|---|---|
| @loop/health-data | Biomarker ranges, peptide catalog, panels, synonyms |
| @loop/protocol-engine | Peptide dosing, reconstitution, cycle management |
| @loop/contraindications | Peptide safety validation |
Commerce & Payments
| Package | Purpose |
|---|---|
| @loop/commerce | Cart, checkout, payment engine, subscription lifecycle, dunning |
| @loop/bigcommerce | BigCommerce API client, webhooks, product catalog mapping |
| @loop/notifications | Email templates (React Email), Resend + Klaviyo clients |
AI & Integrations
| Package | Purpose |
|---|---|
| @loop/ai | AI provider abstraction (OpenAI, Anthropic) |
| @loop/stream | GetStream activity feeds and chat |
| @loop/rimo | Rimo Health SSO and webhook integration |
Apps Using These Packages
Loop apps consume these packages to build customer-facing applications, admin tools, and backend services. See the Applications section for detailed app documentation and architecture guides.
Quick links:
- @loop/admin — Uses @loop/cms, @loop/core, @loop/database, @loop/shared
- @loop/my-loop-health — Uses @loop/commerce, @loop/patient-graph, @loop/biomarker-parser
- @loop/loop-health — Uses @loop/core, @loop/shared, @loop/auth
- @loop/loop-health-mobile — Uses @loop/core, @loop/shared, @loop/auth
- @loop/call-booking — Uses @loop/core, @loop/auth, @loop/database, @loop/hono
- @loop/embeddings-api — Uses @loop/ai, @loop/core, @loop/hono, @loop/database
See Also
These packages are documented in their own sections:
@loop/biomarker-parser→ Health Data: Biomarker Parser@loop/health-engine→ Health Data: Health Engine@loop/health-score→ Health Data: Health Score@loop/guardrails→ Luna AI: Guardrails@loop/patient-graph→ Patient Graph: Repositories@loop/patient-graph-client→ Patient Graph: API