Stack:
- React 18
- TypeScript 5
- Dart SASS \ SCSS
Toolset:
- Yarn + PNP, zero install ready
- Vite
- Storybook + Playwright tests
- ESlint
- Prettier
- Husky + lint-staged
- generate-react-cli configuration
- Clone repository
- cd DIR
- yarn
yarn gen component Name
— place new component files in src/components including CSS module and story.
yarn gen component Name --withLazy=true
— like first, but add index.ts file with default lazy export of component for federation, pages and etc.
yarn dev
— just execute build --watch for rebuild on changes, usefull when this repo used as dependency somewhere else.
yarn build
— required for publishing library or using in other packages as dependency.
yarn build-storybook
— used for publishing storybook build somewhere like chromatic.
yarn lint
— execute eslint
yarn format
— format code in src/
yarn test
— execute all tests, initial include only storybook tests
yarn storybook
— main development environment.
- generate new component
- define prop types
- write a story
- write a play function for key use cases
- develop component while looking to story preview
- add more use cases playbooks
Prefixed names:
Layout*
— global page Layout, top-level component of every page or screenSection*
— second level component under LayoutCard*
— box content wrapper for column based content presentation
Postfixed names:
*Page
— top level component for building page including Layout and all under*Screen
— middle level component for building large part of page, screen flow, modal content and etc. Don't include top-level Layouts.*Flow
— group of screens combined with internal routing logic.