Skip to content

Repository files navigation

@financica/registry

A shadcn-style component registry for the Financica suitefinancica.app and plan.financica.app. Components are copied into a consuming app (via the shadcn CLI), so each product owns the source; we share the technical foundation and one house style, not a locked runtime package.

Why copy-in, not a runtime package? The two apps ship independently and occasionally need to fork a primitive. A published library forces one version behind a prop wall; a registry hands each app a high-quality, identical starting point it can then diverge from deliberately. Both apps re-sync from here, so the shared surface stays in lockstep by default.

Registry endpoint: https://financica.github.io/registry (served from /r/*.json by GitHub Pages).

What's here

The ui kit both apps share — Base UI + Tailwind v4 primitives styled exclusively through the semantic token vocabulary (bg-primary, text-muted-foreground, …) — plus the theme that defines those tokens. Sources import cn from @/lib/utils (every app has it from shadcn init).

theme

Item What it is
financica-theme The shared src/styles/tailwind.css: neutral ramp, brand ramps (primary/accent/success/warning/danger 50–950) + semantic mappings, dark overrides, print-safe re-pin, and the @theme colour + radius scale. Apply once per app.

ui primitives (components/ui/*)

button · badge · alert · card · input · textarea · label · checkbox · radio-group · select · progress · separator · skeleton · avatar · collapsible · popover · tooltip · tabs · table · dropdown-menu · dialog · alert-dialog · sheet · pagination · sonner

dialog, alert-dialog, sheet and pagination pull in button as a registryDependency; the shadcn utils item brings cn into an app that doesn't have it.

Consuming it

Register the namespace once (in the app's components.json) and add by name:

npx shadcn@latest registry add @financica=https://financica.github.io/registry/r/{name}.json
npx shadcn@latest add @financica/button

Or add a single item by URL:

npx shadcn@latest add https://financica.github.io/registry/r/select.json

Files land in components/ui/ (and financica-theme overwrites src/styles/tailwind.css). They're yours now — but if the change belongs to both apps, make it here and re-sync so the two stay in lockstep.

Developing this registry

bun install
bun run test         # renders a representative slice of the kit (happy-dom)
bun run type-check
bun run check        # oxlint + oxfmt --check
bun run build        # shadcn build -> public/r/*.json

House style matches nextkit: tabs / width 4 / 88 columns (oxfmt), .tsx sources under registry/.

Adding or updating a component

  1. Edit the source under registry/ui/ (or registry/theme/).
  2. Keep it registered in registry.json with files targets and any dependencies / registryDependencies.
  3. Extend the render assertion in ui.test.tsx if you added a component.
  4. bun run check && bun run type-check && bun run test && bun run build — CI deploys to Pages on merge to main.
  5. Re-sync both consuming apps so the shared surface doesn't drift.

About

Financica suite's shadcn-style shared component registry (ui kit + theme)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages