refactor(structure): create feature directory structure#31
Conversation
Add feature-based directory structure with barrel exports: - admin: Admin dashboard, settings, analytics - auth: Authentication and authorization - chat: Chat sessions with agents - coach: Coaching functionality - dm: Direct messaging - forum: Community forum - marketing: Funnels and templates - subscriptions: Billing and plans - tenant: Multi-tenant infrastructure - training: Courses and lessons Also includes REFACTOR_PLAN.md with full refactoring strategy.
Split 572-line unifiedKnowledgeService.ts into focused modules: - knowledge/types.ts: Type definitions - knowledge/knowledgeMetricsService.ts: Counts and metrics - knowledge/knowledgeGapsService.ts: Gap detection and optimization - knowledge/knowledgeAnalysisService.ts: Content analysis and cross-agent insights - knowledge/knowledgeQualityService.ts: Quality assessment - knowledge/knowledgeSyncService.ts: Search, sync, and real-time updates Original file now serves as a facade for backward compatibility.
Split 491-line useDashboardData.tsx into focused hooks: - dashboard/types.ts: Shared type definitions - dashboard/useDashboardAnalytics.ts: User/subscription analytics - dashboard/useDashboardAgentUsage.ts: Agent usage and cost data - dashboard/useDashboardCosts.ts: Cost breakdown by tier - dashboard/index.ts: Barrel export Original file now serves as a composition hook for backward compatibility.
Comprehensive log of refactoring work including: - Baseline results - File splits with before/after line counts - Old path -> new path mappings - Rationale for unchanged files - Remaining work for future PRs - Verification results
📝 WalkthroughWalkthroughThis pull request reorganizes the codebase into a feature-based directory structure with modular domain services. It introduces feature entry points, splits the monolithic Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Free 📒 Files selected for processing (26)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Add feature-based directory structure with barrel exports:
Also includes REFACTOR_PLAN.md with full refactoring strategy.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.