Restructure the repo into npm workspaces so the component kit publishes as
its own package, like MUI and shadcn/ui:
- packages/ui: @openkhalix/tansy-ui (published), with components, stories,
tests, tokens and the library build
- packages/brand: private logo and catalogue data shared by both apps
- apps/site: the landing page
- apps/docs: Storybook
The package:
- MIT licence (copyright OpenKhalix)
- per-component ES modules and type declarations
- "use client" on component modules so they import into Next.js Server
Components; helpers stay server-safe
- tokens.css for Tailwind v4 apps, and a prebuilt styles.css for apps
without Tailwind
- lucide-react 1.x, whose types compile against current React 19 types
The apps resolve the package through a "source" export condition, so they
hot-reload component edits, while outside users get dist/.
scripts/test-package.mjs packs the package and installs the tarball into
Vite + Tailwind (strict types), plain React and Next.js apps; each must
build and render correctly. Gitea workflows run CI on push and publish to
npm when a vX.Y.Z tag matching the package version is pushed.
Versioning:
- package.json is the single source of the version (0.2.0); the build
injects it into the landing page and Storybook via src/version.ts
- Add CHANGELOG.md and a release section in the README
Deploy:
- Refuse to deploy uncommitted work unless --allow-dirty is passed
- Stamp each deploy with version.json and verify the live stamp
- Serve HTML and JSON with Cache-Control: no-cache and cache only the
content-hashed assets/ folders long-term
- Return 404 for missing assets instead of index.html, which blanked
the Storybook canvas for browsers holding a stale page
- Always restore the hardened .htaccess, even when a step fails
- Make the post-deploy PHP-off check real, build Storybook before
checking for its index, and stop logging the session token
Tansy UI is a React component kit by OpenKhalix, named after the tansy
flower ("golden buttons"). It has two surfaces:
- A landing page built entirely from the kit's own components, with
five featured parts, a palette-switching playground form, and links
into Storybook
- A Storybook workshop with Tansy branding, a Welcome page, palette
toolbar and accessibility checks
Includes 15 components with colocated tokens and stories, seven brand
palettes, a palette-aware logo, a Docker/nginx image, a scripted
cPanel deploy, and a generator that keeps the landing page catalogue
in sync with Storybook.