Skip to content
crewletPublic

About

Crewlet design system: tokens, icons and React components

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Uilet

Crewlet design system. One repository, four published packages, and a Storybook showroom.

Packages

Package Purpose
@crewlethq/tokens Design tokens (color, spacing, typography, radius, shadow, blur, breakpoint, motion, z-index) and fonts
@crewlethq/icons The Lucide glyph set, vendor marks and the signature illustrations as React components
@crewlethq/ui Cross-app React components built on tokens and icons
@crewlethq/artifact-kit The tokens, every theme, the fonts, the theme bootstrap, an opt-in stylesheet for a page's plain HTML and the sheet as custom elements, as a framework-free browser bundle for artifact pages

Install

The packages are public on registry.npmjs.org, so no registry configuration or token is needed:

npm install --save-exact @crewlethq/tokens @crewlethq/icons @crewlethq/ui

All four are released together under one version, and @crewlethq/ui depends on the tokens and icons of exactly its own version. Upgrade the three an application installs together and keep them at the same version, or the app installs a second copy of the tokens and icons for @crewlethq/ui to use. @crewlethq/artifact-kit is not installed into an application: the engine serves its built files to artifact pages.

Stack

  • npm workspaces
  • Turborepo for caching and task orchestration
  • TypeScript 6 (strict, ES2022, Bundler resolution)
  • ESLint flat config with typescript-eslint
  • Vite 8, Storybook 10 for the showroom
  • Vitest 5 and Testing Library for the jsdom component suite; node --test for the tokens, icons, Storybook and release suites
  • Style Dictionary 5 for token transforms
  • SVGR for the icon pipeline
  • tsup for package bundling
  • GitHub Actions CI on the exact Node release in .nvmrc

Local development

nvm use                        # the Node release in .nvmrc
npm ci --ignore-scripts
npm run build                  # build all packages once
npm run storybook              # open the Storybook at http://localhost:3006
npm run dev                    # watch mode across all packages
npm run lint && npm run typecheck

Layout

.
├── apps/
│   ├── storybook/             # @crewlethq/storybook (private)
│   ├── ui-tests/              # @crewlethq/ui-tests (private): the jsdom suite for @crewlethq/ui
│   └── ui-layout-tests/       # @crewlethq/ui-layout-tests (private): the real-browser layout suite
├── packages/
│   ├── tokens/                # @crewlethq/tokens
│   ├── icons/                 # @crewlethq/icons
│   ├── ui/                    # @crewlethq/ui
│   └── artifact-kit/          # @crewlethq/artifact-kit: the browser bundle for artifact pages
├── scripts/
│   ├── release.mjs            # release version, consistency check, build, pack and registry comparison
│   ├── check-signoff.mjs      # Signed-off-by gate for pull requests
│   └── check-storybook-static.mjs  # static-site, license and page-icon check for the Storybook build
└── .github/
    ├── actions/               # composite actions the workflows share
    └── workflows/             # ci, release, dependabot-merge

Adding a new package

  1. Create packages/<name>/ with a package.json named @crewlethq/<name>.
  2. Extend tsconfig.base.json from the new package's tsconfig.json.
  3. Re-run npm install at the repo root to wire the workspace link.
  4. Reference it from another workspace with the exact version the published manifests carry, never a range. npm run release:check enforces this, and every release writes its own version into the pin.
  5. A package that is not "private": true is published with the others. It needs the manifest metadata npm run release:check asks for, and the one-time setup in RELEASING.md before its first release.

Releasing

Every merge to main that changes what the packages publish is released to npm automatically, through npm trusted publishing with provenance, and tagged v<version>. Dependabot's updates are approved and queued to merge by a workflow, and are released with the next merge that brings any other commit. The version is computed from the Conventional Commits types merged since the previous release; npm run release:version prints the version the current commit would be released as. See RELEASING.md for the full runbook.

Contributing

See CONTRIBUTING.md for the development setup, the checks a pull request has to pass, and the commit conventions, including the sign-off every commit carries under the Developer Certificate of Origin. Everyone taking part follows the Code of Conduct.

Security

Report vulnerabilities privately, as described in SECURITY.md. Do not open a public issue for them.

License

The code and assets in this repository are licensed under the MIT License; each published package carries the same LICENSE file. The Geist and Geist Mono font files in @crewlethq/tokens are licensed under the SIL Open Font License 1.1 (see packages/tokens/fonts/OFL.txt). The Lucide glyph drawings in @crewlethq/icons are licensed under the ISC License, and those Lucide derives from Feather under the MIT License as well (see packages/icons/glyphs/LICENSE).

The Crewlet name, logo and character are trademarks and are not licensed under the MIT License. See TRADEMARKS.md.

About

Crewlet design system: tokens, icons and React components

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages