learning_ai_notes/docs/roadmaps/10_WEB_REUSE_ALIGNMENT_ROADMAP.md

4.2 KiB

Web Reuse Alignment Roadmap

Historical reuse roadmap. This draft is superseded by ../PRODUCTION_READINESS_HANDOFF_ROADMAP.md for active production-readiness execution. Current web design-system, accessibility, auth, E2E, and production UX work is tracked there.

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

  • web/ follows the intended web-app direction for this product repo
  • web/package.json already consumes several shared @bytelyst/* packages
  • shared design-token usage is already part of the current web architecture

Phase W0 — Identity and Config Alignment

  • Align web/src/lib/product-config.ts with shared/product.json
  • Standardize auth storage prefix with backend/mobile identity
  • Standardize telemetry product tagging
  • Standardize diagnostics product tagging
  • Remove conflicting default productId values

Phase W1 — Auth and Platform Reuse

Checkpoint:

  • Shared diagnostics/telemetry config alignment completed in 2fac1ba

  • Keep @bytelyst/react-auth as the auth provider foundation

  • Keep @bytelyst/platform-client as the platform-service client foundation

  • Keep @bytelyst/telemetry-client as telemetry foundation

  • 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 Mocks

Checkpoint:

  • Web backend-backed runtime alignment completed in 8340b1d

  • Web review runtime alignment completed in 8bf0bb5

  • Replace mock-data.ts as a primary runtime source

  • Replace review-data.ts as a primary runtime source

  • Remove demo auth fallback and demo token behavior from the default runtime path

  • Use product-backend-backed note/workspace/search/detail loading

  • Keep only isolated test/prototype fixtures if still needed

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

Checkpoint:

  • Integrated web runtime verification completed in 5f3b32b

  • 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