The UI kit for the new BotSpace dashboard. It is stock shadcn/ui (base-nova style, Base UI, Tailwind 4) with a small BotSpace theme and a set of blocks. Apps install it as one npm package, @botspace/kit. The OS apps keep their own kit for now. This repo holds four things:
-
The package.
npm run build:libwrites@botspace/kittodist/: the primitives, the kit blocks,styles.cssand types. -
The registry.
registry.jsonlists 10 items.npm run build:registrywrites them topublic/r/*.json. Apps install them with the shadcn CLI. -
The reference site.
src/docs(Foundations, Components, Patterns).npm run buildwrites one self-containedsite/index.htmlplussite/r/. kit.bot.space serves this folder. -
The design-system export.
npm run build:dswritesds-out/project/, the files of the BotSpace Kit Design System artifact (tokens, brand book, live previews on a bundle that runs on React 18 globals).
| Path | What |
|---|---|
src/styles/botspace-tokens.css |
Colour tokens, light and dark. One token on each line, with its usage note. The one source for values. |
src/styles/botspace-kit.css |
The theme map, layout sizes, the four shape rules, the base layer. |
src/components/ui/ |
Stock shadcn parts. Do not edit them. |
src/components/kit/ |
The kit blocks. These are the registry sources. |
src/docs/ |
The reference site, and the data the design-system export reads (component-docs.ts, pattern-docs.ts, type-scale.ts). |
src/examples/ |
The four pattern pages (Inbox, Broadcasts, Reports, Settings) with sample data. |
ds/ |
Design-system bundle entry, cover and brand book source. |
src/index.ts |
The package entry. build-lib.ts writes it. Do not edit. |
scripts/ |
build-lib.ts (npm package), consumer-test.ts (install test), sync-theme.ts (CSS to registry theme item), build-ds.ts (design-system export), tokens.ts. |
test/consumer/ |
A clean Vite app. consumer-test.ts installs the packed package into a copy of it and builds it. |
.github/workflows/ |
ci.yml builds on every push. release.yml publishes and deploys on a v* tag. |
npm run devnpm run buildnpm run build runs, in order: the TypeScript check, build:registry, the site build, build:ds and build:lib.
node scripts/consumer-test.ts-
Install the package:
npm install @botspace/kit. It needs React 19 and Tailwind 4. -
In the app's CSS file, import the styles after Tailwind. Add one
@sourceline for the package, so Tailwind sees the classes the kit uses. The path is relative to the CSS file.@import "tailwindcss"; @import "@botspace/kit/styles.css"; @source "../node_modules/@botspace/kit/dist";
-
Wrap the app in
ThemeProviderandTooltipProvider. -
Import every part from the package:
import { Page, DataTable, Button } from "@botspace/kit". -
Load Inter on the page (Google Fonts or
@fontsource-variable/inter).
- Set up shadcn with the base-nova style:
npx shadcn@latest init. - Add the registry to
components.json:"registries": { "@botspace": "https://kit.bot.space/r/{name}.json" }. - Add the theme:
npx shadcn@latest add @botspace/theme. - Add parts:
npx shadcn@latest add @botspace/frame @botspace/data-table.
For a local test of registry changes, serve public/ on a local port and point the registry URL at it.
- Change a value in
botspace-tokens.cssor a block insrc/components/kit/. - Update its entry in
src/docs/component-docs.ts(props, do, don't). - Raise
meta.versionof the item inregistry.jsonand theversioninpackage.json. - Add an entry to
CHANGELOG.md. - Run
npm run buildand check the change in light and dark on the reference site.
- Merge the change to
main. CI must pass. - Tag the commit with the version in
package.json:git tag v0.1.1. - Push the tag:
git push origin v0.1.1.
The release workflow builds, runs the install test, publishes @botspace/kit to npm and deploys site/ to kit.bot.space. It skips the npm step when that version is already on npm.
- npm: the package uses npm trusted publishing. GitHub Actions signs in with OIDC, so there is no npm token. The trusted publisher on npmjs.com is
botspaceHQ/kit, workflowrelease.yml. The npm account isbotspace. - Vercel: three repo secrets,
VERCEL_TOKEN,VERCEL_ORG_IDandVERCEL_PROJECT_ID.