|
| 1 | +# Storybook - Project Overview |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Storybook is an open-source UI development tool for building, testing, and documenting UI components in isolation. |
| 5 | +It supports multiple frontend frameworks (React, Vue, Angular, Svelte, Web Components, Preact, Ember, HTML, etc.) |
| 6 | +and integrates with various build tools (Vite, Webpack5). |
| 7 | + |
| 8 | +## Version |
| 9 | +Current version: 10.2.x (as of March 2026) |
| 10 | + |
| 11 | +## Tech Stack |
| 12 | +- **Language**: TypeScript (strict mode), targeting ES2020 |
| 13 | +- **Package Manager**: Yarn 4.10.3 (with workspaces) |
| 14 | +- **Node.js**: 22.21.1 (specified in `.nvmrc`) |
| 15 | +- **Monorepo Tool**: NX (with `--no-cloud` flag required to avoid NX Cloud login issues) |
| 16 | +- **Test Runner**: Vitest (primary), Playwright (E2E) |
| 17 | +- **Linting**: ESLint 8 |
| 18 | +- **Formatting**: Prettier 3.7+ |
| 19 | +- **Bundlers**: Vite 7, Webpack 5, esbuild |
| 20 | +- **UI Libraries**: React 18, react-aria (use specific submodules, not root imports) |
| 21 | +- **Build System**: Custom build via `jiti ./scripts/build/build-package.ts` |
| 22 | + |
| 23 | +## Repository Structure |
| 24 | +``` |
| 25 | +storybook/ |
| 26 | +├── code/ # Main codebase |
| 27 | +│ ├── core/ # Core package (UI, API, manager, preview, server, etc.) |
| 28 | +│ ├── addons/ # Official addons (docs, controls, a11y, interactions, vitest, etc.) |
| 29 | +│ ├── builders/ # Build integrations (vite, webpack5, manager) |
| 30 | +│ ├── frameworks/ # Framework integrations (react-vite, nextjs, angular, vue3-vite, etc.) |
| 31 | +│ ├── renderers/ # Framework renderers (react, vue3, svelte, html, etc.) |
| 32 | +│ ├── lib/ # Shared libraries (cli, codemod, csf-tools, etc.) |
| 33 | +│ ├── presets/ # Preset packages |
| 34 | +│ ├── e2e-tests/ # Playwright E2E tests |
| 35 | +│ └── .storybook/ # Internal Storybook config (dogfooding) |
| 36 | +├── scripts/ # Build/CI/task scripts |
| 37 | +├── docs/ # Documentation |
| 38 | +├── sandbox/ # Generated sandbox environments for testing |
| 39 | +└── test-storybooks/ # Test storybook configurations |
| 40 | +``` |
| 41 | + |
| 42 | +## Key Packages |
| 43 | +- `@storybook/core` - Core functionality (UI, API, server, preview, channels, etc.) |
| 44 | +- `@storybook/react`, `@storybook/vue3`, etc. - Framework renderers |
| 45 | +- `@storybook/react-vite`, `@storybook/nextjs`, etc. - Framework integrations |
| 46 | +- `@storybook/addon-docs`, `@storybook/addon-a11y`, etc. - Official addons |
| 47 | +- `storybook` - CLI package |
| 48 | +- `create-storybook` - Project scaffolding |
0 commit comments