-
Notifications
You must be signed in to change notification settings - Fork 449
ADR: Monorepo Conversion #5199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADR: Monorepo Conversion #5199
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # 2. Restructure ComfyUI_frontend as a monorepo | ||
|
|
||
| Date: 2025-08-25 | ||
|
|
||
| ## Status | ||
|
|
||
| Proposed | ||
|
|
||
| <!-- [Proposed | Accepted | Rejected | Deprecated | Superseded by [ADR-NNNN](NNNN-title.md)] --> | ||
|
|
||
| ## Context | ||
|
|
||
| [Most of the context is in here](https://github.com/Comfy-Org/ComfyUI_frontend/issues/4661) | ||
|
|
||
| TL;DR: As we're merging more subprojects like litegraph, devtools, and soon a fork of PrimeVue, | ||
| a monorepo structure will help a lot with code sharing and organization. | ||
|
|
||
| For more information on Monorepos, check out [monorepo.tools](https://monorepo.tools/) | ||
|
|
||
| ## Decision | ||
|
|
||
| - Swap out NPM for PNPM | ||
| - Add a workspace for the PrimeVue fork | ||
| - Move the frontend code into its own app workspace | ||
| - Longer term: Extract and reorganize common infrastructure to take advantage of the new monorepo tooling | ||
|
|
||
| ### Tools proposed | ||
|
|
||
| [PNPM](https://pnpm.io/) and [PNPM workspaces](https://pnpm.io/workspaces) | ||
|
|
||
| For monorepo management, I'd probably go with [Nx](https://nx.dev/), but I could be conviced otherwise. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've had good experiences with NX. I've heard good things lately about Turborepo. Anecdotally what I have heard from friends that have used both is that NX is a little harder to setup and maintain than Turborepo. But it's got way faster performance.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I've heard decent things about both of them. A few folks I tend to trust settled on Nx, but if it does end up being too painful, we can try Turbo. |
||
| There's a [whole list here](https://monorepo.tools/#tools-review) if you're interested. | ||
|
|
||
| ## Consequences | ||
|
|
||
| ### Positive | ||
|
|
||
| - Adding new projects with shared dependencies becomes really easy | ||
| - Makes the process of forking and customizing projects more structured, if not strictly easier | ||
| - It *could* speed up the build and development process (not guaranteed) | ||
| - It would let us cleanly organize and release packages like `comfyui-frontend-types` | ||
|
|
||
| ### Negative | ||
|
|
||
| - Monorepos take some getting used to | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main trade off I've experienced:
|
||
| - Reviews and code contribution management has to account for the different projects' situations and constraints | ||
|
|
||
| <!-- ## Notes | ||
|
|
||
| Optional section for additional information, references, or clarifications. --> | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, I'm for this. PNPM + NX. (And in hindsight should have just done a full code review 😂)