Building with the Turtini SDK

The @turtini/sdk package gives your module access to org context, user data, and design tokens — automatically injected by the Turtini shell at runtime.

Install:
npm install @turtini/sdk

Available hooks:
• useActiveOrg() — returns the active org: { id, name, plan, modules, logoUrl, … }
• useCurrentUser() — returns the signed-in user: { uid, email, displayName, photoURL }
• useOrgRole() — returns the viewer's role: 'owner' | 'admin' | 'member' | 'viewer'
• useOrgModules() — returns the org's enabled modules map
• useModuleEnabled('key') — returns true if the given module key is active for this org

Example:
import { useActiveOrg, useCurrentUser, useModuleEnabled } from '@turtini/sdk'

export default function MyModule() {
const org = useActiveOrg()
const user = useCurrentUser()
const hasCRM = useModuleEnabled('reef')
return <h1>Hello {user.displayName} from {org.name}</h1>
}

Design tokens:
import { token } from '@turtini/sdk/tokens'

const style = {
background: token('bgCard'),
color: token('fgPrimary'),
borderRadius: token('radiusMd'),
}

Using tokens ensures your module looks correct in both light and dark mode without any extra CSS work.