refactor(structure): restructure repo to role-based layout (JDWLABS-20)#7
refactor(structure): restructure repo to role-based layout (JDWLABS-20)#7jdwillmsen wants to merge 8 commits into
Conversation
Move from framework-based to role-based directory grouping: - apps/angular/ -> apps/frontend/ - apps/go/ + apps/springboot/ -> apps/backend/ - apps/angular/platform-e2e -> apps/e2e/ - libs/angular/ -> libs/frontend/ - libs/go/ -> libs/backend/ Update all relative paths (tsconfig, jest, eslint, module-federation), import aliases (@jdw/angular-* -> @jdw/frontend-*), project names (angular-* -> frontend-*, go-* -> backend-*), go.work workspace paths, and nx.json include patterns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit c9fcf32
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Cypress dirs were deleted during Playwright migration (JDWLABS-18) but tsconfig.json project references were not updated, causing ng-packagr to crash with 'Cannot destructure property pos' on frontend-shared-ui build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
actions/checkout@v4, nrwl/nx-set-shas@v4, and pnpm/action-setup@v4 will be forced to Node 24 on June 2 2026. Set env var to opt in now and avoid breakage at the cutover. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pnpm hard links fail across NTFS volumes. Worktrees must be on same drive as repo (F:) or node_modules will be empty and git hooks fail. Documents the workaround and correct WT_BASE config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code reviewFound 4 issues:
apps/apps/frontend/authui/Dockerfile Lines 4 to 9 in 0ad3cf7
apps/libs/frontend/shared/ui/package.json Lines 1 to 3 in 0ad3cf7
apps/libs/backend/shared/util/go.mod Line 1 in 0ad3cf7
Lines 27 to 41 in 0ad3cf7 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- Dockerfiles (authui, rolesui, usersui, container): update COPY paths from apps/angular/<app>/<app>/ to apps/frontend/<app>/ and dist paths - servicediscovery Dockerfiles: update dist path from apps/go/ to apps/backend/ - go.mod module declarations: apps/go/servicediscovery -> apps/backend/servicediscovery, libs/go/shared/util -> libs/backend/shared/util - main.go: update import to libs/backend/shared/util - package.json: rename @jdw/angular-shared-ui/util to @jdw/frontend-shared-ui/util - README: update directory structure and lib examples to role-based names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve conflicts from main diverging while this branch renamed the repo
to a role-based layout (apps/angular -> apps/frontend, libs/angular ->
libs/frontend):
- CLAUDE.md: take main's newer version
- project.json (authui/container/rolesui/usersui): keep frontend paths,
adopt main's tools/ -> scripts/ directory rename
- roles.component{,.spec}.ts: import date comparators from
@jdw/frontend-shared-util (main moved them from usersui-util into the
shared-util lib); date.util.ts relocated into libs/frontend/shared/util
- nx format:write for main's updated prettier (scss)
Verified locally: format:check, build (9 projects), lint+test (21) pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The merge left .github/pull_request_template.md at this branch's older "## Summary" template; restore main's newer "## What" version (added in JDWLABS-21) so merging PR #7 does not revert it. Note: repo tracks both PULL_REQUEST_TEMPLATE.md and pull_request_template.md (case collision predating this PR) - flagged for separate cleanup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Nx Cloud is proposing a fix for your failed CI:
We updated the @use import paths in all four Angular app styles.scss files from the old libs/angular/shared/ui/... to the new libs/frontend/shared/ui/..., resolving the "Can't find stylesheet to import" build errors. These stale relative paths were missed during the role-based directory restructuring and caused all four production builds to fail.
Tip
✅ We verified this fix by re-running authui:build:production.
Suggested Fix changes
diff --git a/apps/frontend/authui/src/styles.scss b/apps/frontend/authui/src/styles.scss
index c8cf39f..752439c 100644
--- a/apps/frontend/authui/src/styles.scss
+++ b/apps/frontend/authui/src/styles.scss
@@ -1,5 +1,5 @@
@use '@angular/material' as mat;
-@use '../../../../../libs/angular/shared/ui/src/lib/styles/themes/black-white';
+@use '../../../../libs/frontend/shared/ui/src/lib/styles/themes/black-white';
@include mat.elevation-classes();
@include mat.app-background();
diff --git a/apps/frontend/container/src/styles.scss b/apps/frontend/container/src/styles.scss
index e37b572..8cf1485 100644
--- a/apps/frontend/container/src/styles.scss
+++ b/apps/frontend/container/src/styles.scss
@@ -1,5 +1,5 @@
@use '@angular/material' as mat;
-@use '../../../../../libs/angular/shared/ui/src/lib/styles/themes/red-teal';
+@use '../../../../libs/frontend/shared/ui/src/lib/styles/themes/red-teal';
@include mat.elevation-classes();
@include mat.app-background();
diff --git a/apps/frontend/rolesui/src/styles.scss b/apps/frontend/rolesui/src/styles.scss
index c8cf39f..752439c 100644
--- a/apps/frontend/rolesui/src/styles.scss
+++ b/apps/frontend/rolesui/src/styles.scss
@@ -1,5 +1,5 @@
@use '@angular/material' as mat;
-@use '../../../../../libs/angular/shared/ui/src/lib/styles/themes/black-white';
+@use '../../../../libs/frontend/shared/ui/src/lib/styles/themes/black-white';
@include mat.elevation-classes();
@include mat.app-background();
diff --git a/apps/frontend/usersui/src/styles.scss b/apps/frontend/usersui/src/styles.scss
index c8cf39f..752439c 100644
--- a/apps/frontend/usersui/src/styles.scss
+++ b/apps/frontend/usersui/src/styles.scss
@@ -1,5 +1,5 @@
@use '@angular/material' as mat;
-@use '../../../../../libs/angular/shared/ui/src/lib/styles/themes/black-white';
+@use '../../../../libs/frontend/shared/ui/src/lib/styles/themes/black-white';
@include mat.elevation-classes();
@include mat.app-background();
Or Apply changes locally with:
npx nx-cloud apply-locally bm6V-9Wcb
Apply fix locally with your editor ↗ View interactive diff ↗
🎓 Learn more about Self-Healing CI on nx.dev
…BS-20) The 4 frontend apps' styles.scss still imported the shared theme via a deep relative path into the old libs/angular/shared layout, which no longer exists after the role-based restructure, breaking build:production. Add stylePreprocessorOptions.includePaths pointing at the shared styles root and switch the imports to shallow '@use "themes/<name>"'. This both fixes the broken path and removes the brittle ../../../../../ traversal so future app moves won't re-break these imports. Verified: nx run-many -t build -p authui container rolesui usersui -c production --skip-nx-cache passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Restructures the monorepo from framework-based to role-based directory grouping.
Directory Changes
apps/angular/apps/frontend/apps/go/apps/backend/apps/springboot/apps/backend/apps/angular/platform-e2eapps/e2e/libs/angular/libs/frontend/libs/go/libs/backend/Path / Alias Updates
@jdw/angular-*→@jdw/frontend-*(130 import sites in 73 TS files)tsconfig.base.jsonpath aliases updatedgo.workworkspace paths updatednx.jsoninclude patterns updatedProject Name Changes
angular-*→frontend-*in allproject.jsonname fields and jestdisplayNamego-*→backend-*Verification
nx format:checkpassesgo.workresolves correctlyCloses JDWLABS-20
🤖 Generated with Claude Code