A modern, scalable design system built with React and TypeScript. This design system is powered by:
- 🏎 Turborepo — High-performance build system for Monorepos
- 🚀 React — JavaScript library for user interfaces
- 🛠 Tsup — TypeScript bundler powered by esbuild
- 📖 Storybook — UI component environment powered by Vite
pnpm install
To start the development environment and preview components in Storybook:
pnpm dev
This will start Storybook at localhost:6006
with hot reloading enabled.
To build all packages and the Storybook site:
pnpm build
pnpm lint
- Lint all packagespnpm changeset
- Generate a changeset for versioningpnpm clean
- Clean up allnode_modules
anddist
folders
This monorepo includes:
apps/docs
: Component documentation site with Storybookpackages/ui
: Core React componentspackages/typescript-config
: Sharedtsconfig.json
spackages/eslint-config
: ESLint preset
Components are located in packages/ui/src
. Each component is built with TypeScript and compiled using tsup
to support both ES Modules and CommonJS formats.
Example component structure:
import * as React from 'react';
export interface ButtonProps {
children: React.ReactNode;
}
export function Button(props: ButtonProps) {
return <button>{props.children}</button>;
}
Button.displayName = 'Button';
Documentation is built using Storybook and supports MDX for rich documentation pages. Each component should have its own story file in apps/docs/stories/
.
Example story structure:
import { Button } from '@secrecy/ui/button';
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
<Meta title="Components/Button" component={Button} />
# Button
Button component description and usage guidelines.
## Props
<Props of={Button} />
## Examples
<Preview>
<Story name="Default">
<Button>Hello</Button>
</Story>
</Preview>
This project uses Changesets for version management and publishing. To publish a new version:
- Run
pnpm changeset
to create a new changeset - Select the packages to include in the changeset
- Choose version bump type (major, minor, patch)
- Write a summary of changes
- Push to GitHub
The GitHub Action will automatically handle the publishing process when changes are pushed to the main branch.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
[Add your license information here]