Architecture Migration Plan

Target: Product-Separated File Structure

Status: Planned - To be executed during refactoring sprint Created: 2026-01-08 Estimated Effort: 2-4 hours Risk Level: Medium (requires careful import updates)


Current vs Target Structure

Current Structure (Working)

robo-hub/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ shared/              # Ecosystem-level
β”‚   β”œβ”€β”€ fleetos/             # Legacy FleetOS
β”‚   β”œβ”€β”€ fleetos-clean/       # Current FleetOS
β”‚   └── robo-hub/            # Robo-Hub
β”œβ”€β”€ services/                # Mixed (ecosystem + product)
β”œβ”€β”€ lib/                     # Ecosystem-level
β”œβ”€β”€ types/                   # Mixed
β”œβ”€β”€ database/                # Mixed
β”œβ”€β”€ docs/                    # All docs
└── Robo-Dapp/              # Separate Next.js app

Target Structure (Planned)


Benefits

  1. Clear Product Boundaries

    • FleetOS team: work in fleetos/ only

    • Robo-Hub team: work in robo-hub/ only

    • Ecosystem team: work in ecosystem/ for shared code

  2. Matches Documentation Structure

    • Physical structure mirrors logical structure

    • Easier to find related files

  3. Better Imports

  4. Scalable

    • Add new products easily

    • Clear for new developers

    • Easier to split repos later if needed


Migration Steps (When Ready)

Phase 1: Setup (No Breaking Changes)

  1. Create directory structure

  2. Update build configuration

    vite.config.ts:

    tsconfig.json:

Phase 2: Move Ecosystem Files

Phase 3: Update Imports for Ecosystem

Find and replace:

Test:

Commit:

Phase 4: Move FleetOS Files

Phase 5: Update FleetOS Imports

Phase 6: Move Robo-Hub Files

Phase 7: Update Robo-Hub Imports

Phase 8: Move Robo-Dapp Docs

Phase 9: Clean Up Root


Testing Checklist

After each phase, verify:


Rollback Plan

If migration causes issues:


Decision Criteria

Do this migration when:

Don't do this migration if:


Current Status

Status: βœ… Documented, ready for execution when appropriate Created: 2026-01-08 Last Updated: 2026-01-08 Assigned: Future refactoring sprint


Alternative: Gradual Migration

Instead of all-at-once, migrate one product at a time as you work on it:

  1. Next time working on FleetOS: Move fleetos/ files

  2. Next time working on Robo-Hub: Move robo-hub/ files

  3. Last: Move ecosystem/ files

This spreads the work over time and reduces risk.


Note: This is a plan document. The current structure is working well. Execute this migration when the time is right, not urgently.

Last updated

Was this helpful?