# Phase 22 - Data Import, Export & Migration Centre

Adds a professional System Administration workspace for controlled CSV imports and exports.

## Import controls
- Customer and loan CSV templates
- 5 MB CSV limit
- SHA-256 file hashes
- Secure storage outside `public/`
- Staged validation before processing
- Duplicate Ghana Card checks
- Branch, customer and loan product validation
- Imported loans enter the existing maker-checker queue
- Per-row processing outcomes and audit logging

## Export controls
- Customers, loans, repayments, savings and audit log extracts
- Branch and date-range filters
- Secure CSV generation
- Requester, timestamp and row-count history

## Upgrade
Import `sql/migration_022_data_exchange.sql`, ensure PHP can write to `storage/data-imports/` and `storage/data-exports/`, then open `/data-exchange`.
