Your First Health Universe App
Step 1: Install the SDK
npm install @health-universe/react @tanstack/react-query reactStep 2: How it works with your Health Universe account
Step 3: Set up HealthUniverseProvider
HealthUniverseProviderimport { HealthUniverseProvider } from '@health-universe/react'
// API origin WITHOUT the /api/v1 suffix (the SDK adds it). On Health Universe the
// API is served same-origin with your app, so there's no CORS. `??` (not `||`) so
// an explicit '' is respected — '' means same-origin (the dev proxy; see Typical Setup).
const API_URL = import.meta.env.VITE_HU_API_URL ?? 'https://api.healthuniverse.com'
export function Providers({ children }: { children: React.ReactNode }) {
return (
<HealthUniverseProvider
baseUrl={API_URL}
// The SDK self-loads Clerk with this key. On Health Universe it's injected
// automatically; passing it from your env makes the same code work locally too.
publishableKey={import.meta.env.VITE_CLERK_PUBLISHABLE_KEY}
>
{children}
</HealthUniverseProvider>
)
}Prop
Required
Purpose
Step 4: Render a patient list
Step 5: Workspaces — one shared, or each visitor's
Step 6: Deploy
Last updated
Was this helpful?