A monorepo for the Navi healthcare activities SDK, following a Stripe-like architecture for maximum security, performance, and developer experience.
π§ Development Status: Currently in v0.x.x development phase - building toward v1.0.0 production release.
Complete development and architecture documentation:
- .cursorrules - AI agent guidelines and development rules
- API-CONTRACTS.md - Interface compatibility tracking and breaking change management
- RELEASE-PIPELINE.md - Coordinated release procedures and deployment automation
- PACKAGE-GUIDELINES.md - Package-specific development rules and standards
- REPOSITORY-STRATEGY.md - High-level implementation strategy
- DEPLOYMENT-STRATEGY.md - High level deployment strategy
For Developers: Read
.cursor/rules
for critical development guidelines and patterns. For Architecture: ReviewAPI-CONTRACTS.md
andREPOSITORY-STRATEGY.md
for system design. For Releases: FollowRELEASE-PIPELINE.md
for deployment coordination.
This monorepo implements a CDN + NPM package distribution model similar to Stripe.js:
packages/navi.js/
β Built and deployed to CDN (Google Cloud/Cloudflare/Vercel)- Global distribution for optimal performance and caching
- Version pinning for predictable behavior
apps/navi-portal/
β Deployed to Vercel as embed-only content- Cross-origin iframes for security and compliance
- Isolated rendering of healthcare activities
packages/navi-js/
β Wrapper package that loads CDN script (like@stripe/stripe-js
)packages/navi-react/
β React components and hooks for direct integrationpackages/navi-core/
β Shared utilities, types, and services
examples/test-integration/
β Integration testing app for both SDK patterns- Cross-origin testing between localhost:3001 (customer) and localhost:3000 (embed)
π CDN: https://cdn.awellhealth.com
βββ /v1/navi.js β JavaScript SDK
π Embed: https://navi-portal.awellhealth.com
βββ /[pathway_id] β Iframe content
π¦ NPM: @awell-health/navi-js
βββ Loads CDN script securely
π’ Portal: localhost:3000
βββ /navi.js β Development SDK
βββ /embed/[pathway_id] β Iframe content
π§ͺ Test App: localhost:3001
βββ Tests both SDK integration patterns
NPM wrapper package that securely loads the Navi SDK from CDN. Provides TypeScript types and a clean loading interface, similar to how @stripe/stripe-js
works.
React components for customers who want to embed Navi activities directly into their React applications instead of using iframes.
Shared utilities, TypeScript types, authentication services, and common functionality used across the SDK packages.
The main JavaScript SDK that gets distributed via CDN. Creates secure cross-origin iframes and handles all communication with the Navi embed portal.
Vercel-deployed application that renders healthcare activities inside secure iframes. Handles JWT authentication, branding, and activity rendering.
- Node.js 22+
- pnpm package manager
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Start development servers
pnpm dev
This starts both the portal (localhost:3000) and test integration app (localhost:3001) to test cross-origin iframe functionality.
# Build packages only
pnpm build:packages
# Test specific package
pnpm --filter navi-react test
# Lint all code
pnpm lint
- CDN: Google Cloud CDN, Cloudflare, or Vercel Edge Network
- Portal: Vercel (navi-portal.awellhealth.com)
- NPM: Public registry for customer installation
navi/
βββ apps/
β βββ navi-portal/ # Embed portal (Vercel deployment)
βββ packages/
β βββ navi-js/ # NPM wrapper (loads CDN)
β βββ navi.js/ # JavaScript SDK (CDN bundle)
β βββ navi-react/ # React components (NPM)
β βββ navi-core/ # Shared utilities (NPM)
βββ examples/
β βββ simple-embed/ # Cross-origin testing app
βββ requirements/ # Architecture & API documentation
graph TD
A["Customer Website<br/>localhost:3001"] --> B["Install @awell-health/navi-js"]
B --> C["loadNavi('pk_test_...')"]
C --> D["CDN Request<br/>localhost:3000/v1/navi.js"]
D --> E["navi.js SDK<br/>(15KB bundle)"]
E --> F["Creates iframe<br/>β localhost:3000/embed/pathway"]
F --> G["Navi Portal<br/>Activities & Forms"]
H["@awell-health/navi-js-react"] --> I["React Components"]
I --> J["Direct Components<br/>(No iframe)"]
J --> G
K["navi-core"] --> L["Shared Types<br/>& Utilities"]
L --> E
L --> G
L --> I
Uses Changesets for coordinated package versioning:
pnpm changeset # Add changeset
pnpm changeset:version # Update versions
pnpm changeset:publish # Publish to NPM
CDN deployment happens automatically via GitHub Actions when tags are pushed.
- Security: Cannot bundle or self-host (like Stripe's PCI compliance model)
- Performance: Global CDN distribution with aggressive caching
- Developer Experience: Clean APIs with full TypeScript support
- Reliability: Version pinning and backward compatibility
- Compliance: HIPAA-aligned architecture for healthcare data
MIT
- Fork the repository
- Create feature branch (
git checkout -b feature/name
) - Commit changes (
git commit -m 'Description'
) - Push branch (
git push origin feature/name
) - Open Pull Request
For questions or issues, please open a GitHub issue or contact the Awell Health team.