Refactor ProjectManager.tsx and create useProjectManager.ts to decouple business logic from JSX, improve state management, and increase testability.