# Migration Roadmap

The standalone system should be built in layers. Keep the existing WordPress plugins unchanged until each module has a complete importer and verification report.

## Phase 1: Core Foundation

- App shell and routing
- Database schema
- Household and member model
- File vault
- Encryption
- Audit logging
- Shared settings

## Phase 2: Documents

Migrate `policy-document-manager` first because it has a clear domain boundary and already models private storage, encrypted fields, file hashes, and access logs.

Target tables:

- `hh_files`
- `hh_documents`
- `hh_document_categories`
- `hh_document_field_definitions`
- `hh_document_field_values`
- `hh_document_access_log`

## Phase 3: Home Keeper

Migrate `home-keeper-manager` next. It is small and should link neatly into Finance once payments are created as expense transactions.

Target tables:

- `hh_workers`
- `hh_worker_months`
- `hh_worker_work_days`
- `hh_worker_payments`
- `hh_files`
- `hh_file_links`

## Phase 4: Games

Migrate `game-owed-tracker` after the smaller administrative modules are stable.

Target tables:

- `hh_game_platforms`
- `hh_game_series`
- `hh_games`
- `hh_game_play_sessions`

## Phase 5: Health

Migrate Health once member profiles are stable because health records should be member-scoped.

Target tables:

- `hh_health_weight_logs`
- `hh_health_vitals_logs`
- `hh_health_exercises`
- `hh_health_workout_*`
- `hh_health_foods`
- `hh_health_meal_*`
- `hh_health_food_logs`

## Phase 6: Finance and Groceries

Migrate budget and groceries last. This is the largest module and should become the system ledger.

Target tables:

- `hh_finance_accounts`
- `hh_budget_months`
- `hh_budget_categories`
- `hh_income_*`
- `hh_budget_items`
- `hh_expense_transactions`
- `hh_recurring_items`
- `hh_bank_imports`
- `hh_bank_transactions`
- `hh_grocery_*`
- `hh_shopping_*`
