This repository is a Turborepo managed monorepo powered by pnpm. The design system lives in packages/ui and can be built, tested, linted, and previewed through the shared workspace scripts.
- Node.js 18+
- pnpm 9.x (automatically installed via
corepack enableif needed)
pnpm installAll workspace tasks proxy to the package scripts through Turborepo:
| Command | Description |
|---|---|
pnpm dev |
Run all dev servers in parallel (as configured per package). |
pnpm build |
Build every package (@bako/ui compiles library bundles). |
pnpm test |
Execute unit tests in each package (Vitest in @bako/ui). |
pnpm lint |
Run Biome lint/format checks. |
pnpm storybook |
Launch Storybook from apps/docs against @bako/ui. |
pnpm typegen |
Generate Chakra theme typings. |
pnpm clean |
Clean build artifacts across the repo. |
pnpm changeset |
Start an interactive prompt to record version notes for affected packages. |
pnpm version-packages |
Apply pending changesets to package versions and changelogs. |
pnpm release |
Publish all packages with unreleased changesets to npm. |
To run a script for a single package, use the --filter flag:
pnpm build --filter @bako/uipackages/ui: Bako design system (React + Chakra UI)src/: Component source code and storiestsup.config.ts: Library bundler configuration (ESM + CJS)vitest.config.ts: Vitest runner configurationpackage.json: Library-specific scripts and dependencies
packages/ts-config: Shared TypeScript configuration presets used across the repoapps/docs: Storybook application that consumes@bako/ui.storybook/: Storybook configuration pointing at the UI packagepackage.json: Storybook scripts and Chromatic integration
This repository uses Changesets to coordinate versioning and releases for every workspace package.
- While implementing a change, run
pnpm changesetand choose the affected packages and semver bump. The command creates a markdown summary in.changeset/that should be committed alongside your code. - When you're ready to cut a release, run
pnpm version-packageson the default branch. This updates versions, generates changelog entries, and removes applied changeset files. - Commit the resulting version bumps and changelog updates (often via a release PR).
- Publish the new versions with
pnpm release. Ensure your npm authentication is configured (including OTP if required) before running the command.
You can still target a single package by combining these commands with --filter if necessary (for example, pnpm build --filter @bako/ui).
In CI environments, prefer running:
pnpm install --frozen-lockfile
pnpm lint
pnpm test
pnpm buildThese commands guarantee type safety, passing tests, and a production-ready build of the design system.