# Web Reuse Alignment Roadmap Status: Draft Parent: `docs/ARCHITECTURE_REVIEW_AND_REUSE_ROADMAP.md` Scope: `web/` # Goal Make the web app the strongest notes authoring/operator surface while ensuring that shared platform concerns come from common ByteLyst packages and services rather than repo-local duplication or long-term scaffold behavior. # Baseline Already Confirmed - [x] `web/` follows the intended web-app direction for this product repo - [x] `web/package.json` already consumes several shared `@bytelyst/*` packages - [x] shared design-token usage is already part of the current web architecture # Phase W0 — Identity and Config Alignment - [x] Align `web/src/lib/product-config.ts` with `shared/product.json` - [x] Standardize auth storage prefix with backend/mobile identity - [x] Standardize telemetry product tagging - [x] Standardize diagnostics product tagging - [x] Remove conflicting default `productId` values # Phase W1 — Auth and Platform Reuse - [x] Keep `@bytelyst/react-auth` as the auth provider foundation - [x] Keep `@bytelyst/platform-client` as the platform-service client foundation - [x] Keep `@bytelyst/telemetry-client` as telemetry foundation - [x] Keep `@bytelyst/diagnostics-client` as diagnostics foundation - [ ] Remove demo-first auth behavior once real auth integration is stable # Dependency Notes - [ ] Complete W0 before removing demo-first auth behavior - [ ] Use backend route contracts as the source of truth for W2 and W4 - [ ] Coordinate shared component reuse decisions with the platform/shared-services roadmap # Phase W2 — Replace Runtime Mock Paths - [ ] Replace dashboard runtime mock data with backend-backed data - [ ] Replace workspaces runtime mock data with backend-backed data - [ ] Replace note detail runtime mock data with backend-backed data - [ ] Replace search runtime mock data with backend-backed data - [ ] Replace reviews runtime mock data with backend-backed data - [ ] Restrict `mock-data.ts` and `review-data.ts` to tests/prototyping only # Phase W3 — Shared UI and Component Reuse - [ ] Audit current web components for possible `@bytelyst/dashboard-components` reuse - [ ] Keep notes-specific editor and review UX local - [ ] Reuse shared list/filter/empty-state/operator primitives where sensible - [ ] Avoid copying shared dashboard patterns into product-local components unnecessarily # Phase W4 — Contract and DTO Hygiene - [ ] Align route data shapes with backend response contracts - [ ] Reduce duplicate type definitions that restate backend objects differently - [ ] Introduce a repo-local shared contracts layer only if duplication becomes significant # Phase W5 — Integrated Verification - [ ] Add tests for integrated note list/detail/search flows - [ ] Add tests for integrated review/approval surfaces once backend-backed - [ ] Verify telemetry and diagnostics initialization against real shared service endpoints - [ ] Verify no long-term runtime dependence on mock tokens or mock auth state # High-Collision Areas - [ ] `web/src/lib/product-config.ts` - [ ] `web/src/lib/auth.ts` - [ ] `web/src/lib/mock-data.ts` - [ ] `web/src/lib/review-data.ts` - [ ] route files under `web/src/app/(app)/` - [ ] shared type definitions # Done When - [ ] web uses real backend integrations for core notes workflows - [ ] web uses shared platform packages for platform concerns - [ ] notes-specific UX remains local without unnecessary duplication - [ ] auth/config/telemetry/diagnostics are identity-consistent