Skip to content

Mirror Canonical Migration (Oct 8 2025)

This document establishes the mirror repository at /Users/work-station/company/cloudalt-frontend as the canonical monorepo going forward and records rationale, source-of-truth decisions, and the operational migration process from the “active” snapshot at /Users/work-station/company/cloudalt/cloudalt-frontend.

  • Unify two local filesystem Git repositories containing overlapping Nx/Expo/React Native multi-brand application scaffolding.
  • Preserve forward-looking tooling and dependency upgrades from the mirror repo.
  • Salvage only purposeful, non-ephemeral artifacts from the active snapshot (config orchestration, unique types, brand assets, docs).
  • Maintain forensic traceability: every file altered or added during migration will be logged in MIRROR_CHANGE_LOG.md with timestamp.
DimensionActive SnapshotMirror RepoDecision
Dependency FreshnessLean baseline onlyUpgrades (Storybook 8.6.14, Yarn 4.10.3, RN ecosystem libs)Favor mirror
Tooling AutomationMinimalRich scripts (verify, generation, audit)Favor mirror
Path AliasesEmptyNamespaced packages + brandsFavor mirror
Native App StructureGeneric + Pods noiseNamed Xcode projectsFavor mirror
Experimental CapabilityNoneNavigation, forms, data, theming libsFavor mirror
Technical DebtCommitted PodsNested node_modules (cleanable)Clean mirror; adopt

Conclusion: Mirror contains more strategic scaffolding with lower net future effort after a one-time hygiene pass.

CategorySource PathTarget ActionNotes
Config packagepackages/config/Copy (evaluate merge into existing services/theme)Validate no secret leakage
Universal typespackages/universal-types/Merge into packages/types/ or keep separate; add tsconfig pathDe-duplicate shared interfaces
Assets (unique)apps/stay_match/pinkguest/mobile/assets/splash-icon.png (if not in mirror)Copy if missingNon-generated branding
Documentationdocs/*.md (diff)Append or integratePreserve provenance

Exclude ephemeral content: Pods/, .expo/, any node_modules/, build outputs, caches.

  1. Remove nested node_modules under individual mobile app directories (pinkguest, staymatch_app) — rely on root Yarn PnP/workspaces.
  2. Ensure .gitignore effectively blocks reappearance; confirm with git ls-files | grep node_modules.
  3. Normalize Metro configuration (centralize via shared factory; remove per-app duplicates unless overrides exist).
  4. Add TypeScript path aliases for migrated packages.
  5. Run ./scripts/verify-repo.sh; address any reported gaps (targets, lint, typecheck, test placeholders).
  6. Introduce a shared Hero component in packages/ui (future step) to replace inline temp UI elements.
  • Compressed backups created on external T7 drive (timestamped). Filenames: cloudalt-active-<timestamp>.tgz, cloudalt-mirror-<timestamp>.tgz.
  • Each migrated or changed file: a .bak.<YYYYMMDD-HHMMSS> sibling created prior to modification.
  • MIRROR_CHANGE_LOG.md accumulates structured entries: timestamp, operation type (ADD / COPY / MODIFY / BAK), source, destination, hash (if feasible).

Two local repos currently distinct:

  • Active: HEAD detached at tag basic-react-native-scaffolding-restore (commit 54ed2ec).
  • Mirror: Branch development-oct7-2025 (commit ed10395). Approach:
  1. Treat mirror remote (if configured) as origin canonical. If active repo remote is same origin, avoid pushing from active.
  2. Create a convergence branch in mirror: converge-active-import for migration commits.
  3. After successful verification & copy, fast-forward or merge into mainline branch (e.g., master or development-oct7-2025). Tag convergence: post-convergence-20251008.
  4. Optionally archive the active snapshot tar in long-term storage; remove duplicate working tree to prevent future drift.
StepCommandSuccess Criteria
Installyarn installZero peer resolution failures
Lint sweepnx run-many --target=lint --allAll succeed or only intentional TODO warnings
Typechecknx run-many --target=typecheck --allNo blocking TS errors
Mobile start (pinkguest)nx run stay_match-pinkguest-mobile:start (placeholder)Metro boots & loads splash
Mobile start (orangeguest)Same patternMetro + navigation libs resolve
Verify script./scripts/verify-repo.shPass or enumerated actionable items

8. Future Improvements (After Convergence)

Section titled “8. Future Improvements (After Convergence)”
  • Introduce design tokens & theme contract package.
  • Implement brand registry generation script integration into CI.
  • Replace any redundant brand app boilerplate with templated generation.
  • Add minimal unit test per package to enforce test target viability.
  • If a migration commit breaks builds: checkout prior commit (pre-convergence) and re-apply subsets incrementally.
  • .bak.* files allow single-file rollback; delete new file and restore from most recent backup sibling.
  • Are config environment values secret-bound? If yes, consider extracting to .env + vault before commit.
  • Is Module Federation experiment production-bound? If uncertain, quarantine config behind feature flag.

Generated: 2025-10-08T02:17:58Z