Dividing the work
Split a big product into small parts with clear borders. Then many people can work at the same time without getting in each other's way.
One repository, split into packages that each have one job:
packages/ colors/ the colour palette themes/ tokens built from the colours type/ grid/ layout/ motion/ icons/ styles/ the CSS for every component react/ React components web-components/ the same components as Web Components
Even one Button is split by job. The CSS lives in styles/scss/components/button/ and the React part in react/src/components/Button/, next to Button.stories.js (Storybook), Button.mdx (docs) and a __tests__ folder.
Every component is one folder in packages/mui-material/src/:
- Button/Button.jsthe component and its styles
- Button/Button.d.tsthe TypeScript types
- Button/buttonClasses.tsthe readable class names
- Button/Button.test.jstests
Here the styles sit in the same file as the component. Splitting by component, with everything for one component in one place, is the same idea as Ísland.is.
github.com/mui/material-ui ↗In your project: both systems give every component an owner and a home. The same rule works for a team of four: one owner per component, and everything for that component in one folder.