Part of the site-separation effort (#1246 / #1417).
Goal
Start gently relocating BRC-owned views into sites/brc-analytics/ under the existing single root build — no changes to build scripts, sync-api, next build, or site-config. This pre-positions BRC code for the eventual per-site apps without committing to independent builds yet.
Scope (pilot: CalendarView)
- Add a
sites/brc-analytics/* → @brc/* path alias to root tsconfig.json.
- Move
app/views/CalendarView/ → sites/brc-analytics/views/CalendarView/ (flattened — constants.ts at the view root).
- Repoint
pages/calendar to @brc/views/CalendarView/calendarView.
Why this works without build/config churn
@/* and @site-config/* are repo-root-relative, so the view's existing @/components/* imports resolve unchanged after the move.
- Views live only in the
tsc + Next/webpack graph, both of which honor tsconfig path aliases — so a plain alias suffices (no workspace-package needed).
Known boundary (not in scope)
routes/constants.ts (site page-routes) can not ride the @brc alias — it's imported by GA2's site-config and by Playwright e2e, neither of which resolve tsconfig aliases. It stays at root for now; relocating it later needs a Playwright-reachable home (workspace package or relative path), not the alias.
Acceptance
pages/calendar renders identically (verified via build:local + serve).
- tsc / eslint / prettier / unit tests / build green.
Part of the site-separation effort (#1246 / #1417).
Goal
Start gently relocating BRC-owned views into
sites/brc-analytics/under the existing single root build — no changes to build scripts,sync-api,next build, orsite-config. This pre-positions BRC code for the eventual per-site apps without committing to independent builds yet.Scope (pilot: CalendarView)
sites/brc-analytics/*→@brc/*path alias to roottsconfig.json.app/views/CalendarView/→sites/brc-analytics/views/CalendarView/(flattened —constants.tsat the view root).pages/calendarto@brc/views/CalendarView/calendarView.Why this works without build/config churn
@/*and@site-config/*are repo-root-relative, so the view's existing@/components/*imports resolve unchanged after the move.tsc+ Next/webpack graph, both of which honor tsconfig path aliases — so a plain alias suffices (no workspace-package needed).Known boundary (not in scope)
routes/constants.ts(site page-routes) can not ride the@brcalias — it's imported by GA2's site-config and by Playwright e2e, neither of which resolve tsconfig aliases. It stays at root for now; relocating it later needs a Playwright-reachable home (workspace package or relative path), not the alias.Acceptance
pages/calendarrenders identically (verified viabuild:local+serve).