Getting started
The SDK includes hooks and connected components. Start with working finance experiences, or use its hooks with your own markup. UI components are the pure presentation layer: your application supplies their values, state and callbacks. Use either layer independently or combine them.
Choose SDK or UI
Both component layers are editable source installed through the same private shadcn registry. The SDK's hooks and server helpers are an npm package.
SDK: ready-made experiences
Add working finance experiences to your product quickly. Customise their appearance and behaviour.
- Pick this if
- you want connected components with Dolfin's hooks and finance logic built in.
- Example install
shadcn add @dolfin/ap-bills-table- Use
<ApBillsTable />- You get
- Connected screens plus independently usable hooks. Editable component source, loading states and workflow actions.
- Requires
- DolfinProvider; registry token for components
UI: your integration, your control
Build a tailored interface with Dolfin's presentation components. Supply their values, state and callbacks.
- Pick this if
- your application owns the data flow and interaction behaviour, through GraphQL, SDK hooks or your controller.
- Example install
shadcn add @dolfin/ui-base-stat-card- Use
<StatCard label="Outstanding" value="£12,400" />- You get
- Editable tables, forms, dialogs and page layouts without data fetching or a provider requirement.
- Requires
- Registry token + your component props
DolfinProvider.- Your appYour routes, layout and design system
- Connected SDK components
@dolfin/*via the shadcn registry. Source lives in your repo.Standalone UI or your own markupYour controller supplies props and callbacks; SDK hooks are optional. @dolfinai/reactnpm package. DolfinProvider, hooks, caching, permissions- Your serverIssues a short-lived Dolfin token for the signed-in user
- Dolfin APIBills, invoices, expenses, approvals, payments
From an empty app to your first component
- Prepare your React app and initialise shadcn/ui.
- Configure the private registry once for both SDK and UI components.
- Follow the connected SDK example to add a Bills table and connect Dolfin, or the standalone UI example to render a card with your own props.
Only need data access with your own markup? Start with SDK hooks. You can skip shadcn/ui and the registry entirely.
Quick decision
| If you | Use |
|---|---|
| Want a bills, invoices or expenses screen working today | SDK connected components |
| Want Dolfin UI with application-owned state and data flow | Standalone UI components |
| Have your own design system and want full control of markup | SDK hooks |
| Do not use shadcn/ui, or cannot get a registry token yet | SDK hooks |
| Want a ready-made table but a custom detail view | Both, side by side |
SDK hooks and connected components use DolfinProviderand your server authentication route. Standalone UI takes explicit props and requires no SDK provider. Your application can still supply Dolfin data through SDK hooks or GraphQL.