docs/react-v9/contributing/rfcs/shared/repo-organization.md
Contributors: @hotell
We propose a new repository structure to better scope domains and support consistent branching for projects entering EOL/Maintenance mode. This structure will simplify navigation, improve scalability, and ensure clear separation of concerns.
NOTE: follows https://github.com/microsoft/fluentui/pull/30552
The current repository structure has grown organically, leading to challenges in maintaining clear boundaries between domains and frameworks. As some projects transition to EOL/Maintenance mode, a more structured organization is required to ensure long-term maintainability and ease of contribution.
The current monorepo structure lacks clear separation between domains and frameworks, making it harder to:
Organize the repository by "framework" or "domain" to ensure clear separation:
shared/ # Shared tools, infrastructure, and domain-agnostic projects (e.g., tokens)
react-v0/ # React Northstar (v0)
react-v8/ # React v8
react-components/ # React v9
web-components/ # Web Components (v3)
charts/ # Charting libraries (v8, v9, wc)
NOTE:
After branching out react-8/ and react-v0/, the top-level structure will contain only four primary folders:
shared/ # Shared tools, infrastructure, and domain-agnostic projects (e.g., tokens)
react-components/ # React v9
web-components/ # Web Components (v3)
charts/ # Charting libraries (v8, v9, wc)
This structure allows for future expansion if additional frameworks are introduced.
Contains 4 folders:
/apps/packages/tools/sharedExample: react-components Folder
charting/ # Charting
web-components/ # Web Components
react-components/ # React v9
apps/ # applications
docsite/ # current: public-docsite-v9
react-18-tests/ # current: react-18-tests-v9
ts-minbar-tests/ # current: ts-minbar-test-react-components
ssr-tests/ # current: ssr-test-v9
vr-tests/ # current: vr-tests-react-components
packages/ # React/UI specific libraries
react-text/
react-card/
react-dialog/
react-components/ # Suite package
tools/ # any non UI specific tools ( storybook plugin, eslint plugins, nx react-components plugin etc)
eslint-plugin-react-components/
react-storybook-addon/
shared/ # any shared logic used in more than 2 sub-domains
some-shared-logic-lib/
Shared domain folder organizationWill contain anything with shared scope
Current repo structure contains additional folders at the root:
/docs
/specs
/starter-templates
/typings
These will be moved to appropriate domains based on structure outlined in previous paragraphs, like following:
/docs
💡NOTE: we can consider keeping this as is.
/docs/react-wiki-archive -> /react-v8/docs
/docs/react-v9 -> /react-components/docs
/starter-templates
/starter-templates -> /react-components/apps/starter-templates
/specs
💡NOTE: this contains only v8 related specs. to align with existing pattern we will move those under package /docs folder
/specs -> /react-v8/packages/react/docs
/typings
💡NOTE: we can consider keeping this as is as it affects global TypeScript types and aligns to single version policy.
/typings -> /shared/typings
Projects with generic names will mirror folder structure within its name to avoid project name clashes
Example (application):
/react-components/apps/docsite -> react-components-docsite/react-components/apps/ssr-tests -> react-components-ssr-testsDefault Branch
The default branch will contain only actively developed frameworks/domains.
Branching for Maintenance/EOL
When a framework/domain transitions to maintenance or EOL, it will be branched out from the default branch.
Branch Naming Convention:
{framework/domain-type}-{major-version}
Examples:
react-northstar → react-v0react → react-v8react-components → react-v9web-components → web-components-v3Pros
Cons