POC: Identify Changes Required for Unified Nx Workspace at Repo Root
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Research Question
The repo has four independent Node workloads (core-web, dotcms-postman, dotcms-e2e-node, dotcms-ui-e2e) each with isolated node_modules, separate yarn.lock, and no shared build intelligence. This spike investigates what changes are required to establish a single Nx workspace at the repo root, unifying all Node workloads under one package.json, one yarn.lock, and one Nx project graph — and whether the migration is feasible in a phased approach.
Additionally, some Node Maven modules use workingDirectory parameters referencing directories outside their own module boundary (e.g., workingDirectory: ./frontend in dotcms-e2e-node/pom.xml), violating Maven's module independence principle. Maven has no way to express source-level filesystem dependencies — these references are invisible to the build graph and silently break when directories change.
The goal of this POC is to identify the full scope of changes required before committing to the migration.
Timebox
8h
Acceptance Criteria
- Document all files that need to change (pom.xml files, tsconfig paths, project.json refs, CI working directories, .husky paths)
- Confirm whether
e2e/dotcms-e2e-nodeis superseded bydotcms-ui-e2e(coordinate with Arcadio/frontend team) — affects migration scope - Evaluate feasibility of adding Node to
.mise.tomlto retirenodejs-parentas a standalone quick win (independent of full migration) - Assess risk of moving
nx.jsonandtsconfig.base.jsonto repo root — identify which path aliases and project references break - Identify the lowest-risk stepping stone: root
package.json+ Yarn workspaces pointing at existing module directories (sharednode_moduleswithout movingnx.json) - Document the Husky v7→v9 upgrade path and confirm
.husky/can move to repo root as a standalone change - Produce a phased migration plan with clear go/no-go criteria per phase
Context
Current fragmentation — four isolated Node workloads:
| Module | Directory | Tool | Own node_modules? |
Issue |
|---|---|---|---|---|
core-web |
core-web/ |
Nx + Angular | ✅ yes | Is the Nx workspace root — forces cross-cutting projects inside it |
dotcms-postman |
dotcms-postman/ |
Newman (yarn) | ✅ yes | No shared cache or affected detection with other workloads |
dotcms-e2e-node |
e2e/dotcms-e2e-node/frontend/ |
Playwright (yarn) | ✅ yes | workingDirectory: ./frontend — pom.xml references a subdirectory |
dotcms-ui-e2e |
core-web/apps/dotcms-ui-e2e/ |
Playwright (Nx) | shares core-web's | Forced into core-web/ due to Nx workspace coupling |
Maven independence violation:
<!-- e2e/dotcms-e2e-node/pom.xml reaches into ./frontend -->
<workingDirectory>./frontend</workingDirectory> ← source not owned by this pom.xml ❌
Husky workaround (current core-web/package.json):
"prepare": "cd .. && node core-web/prepare.js"
Husky v7 requires hooks wired at git root — the prepare script explicitly navigates out of core-web/ to reach the repo root. Definition and registration locations disagree. Java developers using targeted builds (just build-quicker) never trigger this install and have no pre-commit hooks.
Target structure (post-migration):
repo-root/
├── nx.json ← moved from core-web/
├── tsconfig.base.json ← single shared TS path aliases
├── package.json ← single root package, workspaces config
├── yarn.lock ← single lockfile for all Node workloads
├── core-web/apps/dotcms-ui/ ← Angular app (unchanged internally)
├── e2e/dotcms-ui-e2e/ ← Playwright E2E (self-contained, own pom.xml)
└── postman/dotcms-postman/ ← Newman (self-contained, own pom.xml)
Proposed stepping stones:
- Deprecate
e2e/dotcms-e2e-nodeif superseded — reduces scope - Add
node = "22.15.0"to.mise.toml→ retirenodejs-parent(standalone, independent of migration) - Move
.husky/to repo root + upgrade to Husky v9 (standalone quick win) - Add root
package.json+ Yarn workspaces → sharednode_moduleswithout movingnx.json - Move
nx.json+tsconfig.base.jsonto repo root → full unified workspace
Links
- PR #33266 (dotcms-ui-e2e): https://github.com/dotCMS/core/pull/33266
- Issue #34753 (GHA caching): https://github.com/dotCMS/core/issues/34753
nodejs-parent/pom.xml— installs Node v22.15.0, Yarn v1.22.19.mise.tomlat repo root — already managesgh,python,actionlint,shellcheck; Node not yet declared- Context owners: Steve Bolton (Enablement), Arcadio Quintero (dotcms-ui-e2e author), Frontend platform team
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying the named pom.xml files, .mise.toml, core-web/package.json, nx.json, tsconfig.base.json, project.json references, CI working directories, and .husky paths. Trace the existing module boundaries and path aliases, then document the affected files, migration risks, stepping stones, and go/no-go criteria, including whether dotcms-e2e-node is superseded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, java, node.js, playwright, typescript
- Domain
- build-system, ci-cd, devops, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100