From 3d06cb2353b79661cf3d86c635d26f5ec6c165d1 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Thu, 23 Jul 2026 05:12:24 +0200 Subject: [PATCH] Phase 0.5+0.6: consolidate store dirs and save frontend gap analysis - 0.5: Moved calendarStore.ts from stores/ to store/, removed stores/ dir, updated import - 0.6: Saved complete frontend gap analysis as frontend-gap-analysis.md (176 lines) - All stores now in src/store/ (5 stores: authStore, uiStore, commStore, pluginToolbarStore, calendarStore) --- frontend-gap-analysis.md | 176 ++++++++++++++++++ frontend/src/pages/Calendar.tsx | 2 +- .../src/{stores => store}/calendarStore.ts | 0 3 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 frontend-gap-analysis.md rename frontend/src/{stores => store}/calendarStore.ts (100%) diff --git a/frontend-gap-analysis.md b/frontend-gap-analysis.md new file mode 100644 index 0000000..566bb05 --- /dev/null +++ b/frontend-gap-analysis.md @@ -0,0 +1,176 @@ +# LeoCRM Frontend — Vollständige Bestandsanalyse + +**Verzeichnis:** `/a0/usr/workdir/leocrm-fix/frontend` +**Architektur-Referenz:** `architecture.md` Abschnitt 7 +**Datum:** 2026-07-23 + +--- + +## 1. Pages/Routes (27 Pages, 7.826 Zeilen) + +### Vorhandene Seiten + +| Seite | File | Lines | Status | +|-------|------|-------|--------| +| Login | src/pages/Login.tsx | 92 | ✅ | +| PasswordReset Request | src/pages/PasswordResetRequest.tsx | 91 | ✅ | +| PasswordReset Confirm | src/pages/PasswordResetConfirm.tsx | 106 | ✅ | +| Dashboard | src/pages/Dashboard.tsx | 79 | ✅ | +| ContactsList | src/pages/ContactsList.tsx | 445 | ✅ | +| Calendar | src/pages/Calendar.tsx | 717 | ✅ | +| CalendarKanban | src/pages/CalendarKanban.tsx | 123 | ✅ | +| DMS | src/pages/Dms.tsx | 731 | ✅ | +| DmsTrash | src/pages/DmsTrash.tsx | 155 | ✅ | +| Mail | src/pages/Mail.tsx | 978 | ✅ | +| MailSettings | src/pages/MailSettings.tsx | 449 | ✅ | +| AuditLog | src/pages/AuditLog.tsx | 167 | ✅ | +| GlobalSearchResults | src/pages/GlobalSearchResults.tsx | 228 | ✅ | +| Settings (Hub) | src/pages/Settings.tsx | 52 | ✅ | +| SettingsProfile | src/pages/SettingsProfile.tsx | 181 | ✅ | +| SettingsUsers | src/pages/SettingsUsers.tsx | 298 | ✅ | +| SettingsRoles | src/pages/SettingsRoles.tsx | 522 | ✅ | +| SettingsGroups | src/pages/SettingsGroups.tsx | 688 | ✅ | +| SettingsPlugins | src/pages/SettingsPlugins.tsx | 255 | ✅ | +| SettingsSystem | src/pages/SettingsSystem.tsx | 277 | ✅ | +| SettingsCurrencies | src/pages/SettingsCurrencies.tsx | 142 | ✅ | +| SettingsTaxes | src/pages/SettingsTaxes.tsx | 143 | ✅ | +| SettingsSequences | src/pages/SettingsSequences.tsx | 138 | ✅ | +| SettingsNotifications | src/pages/SettingsNotifications.tsx | 158 | ✅ | +| AIAssistant | src/pages/AIAssistant.tsx | 122 | ✅ | +| AISettings | src/pages/AISettings.tsx | 332 | ✅ | +| ProactiveAISettings | src/pages/ProactiveAISettings.tsx | 157 | ✅ | + +### Fehlende Seiten +| Seite | Status | Anmerkung | +|-------|--------|-----------| +| Companies List | ❌ MISSING | Keine Companies.tsx, API-Hooks existieren | +| Company Detail | ❌ MISSING | Keine CompanyDetail.tsx | +| Contact Detail Route | ❌ MISSING | ContactDetail.tsx existiert als Komponente (372 Zeilen), aber keine Route /contacts/:id | + +## 2. Component Library (12+2 Komponenten) + +Alle 12 geforderten UI-Komponenten vorhanden: Button, Input, Select, Modal, Toast, Table, Card, Badge, Avatar, Pagination, EmptyState, Skeleton. +Zusätzlich: ConfirmDialog, ResizablePanel. + +## 3. Layout +- AppShell ✅, Sidebar ✅ (237 Zeilen), TopBar ✅ (146 Zeilen) +- ContentArea ⚠️ Inline in AppShell +- PluginToolbar ✅, AISidebar ✅ (322 Zeilen), MessageSidebar ✅ (689 Zeilen) + +## 4. Plugin UI System +- PluginRegistry.tsx ❌ MISSING +- PluginLoader.tsx ❌ MISSING +- src/plugins/ Verzeichnis ❌ MISSING +- Plugin-Routes hartkodiert in routes/index.tsx + +## 5. State Management +- TanStack Query: 138 Aufrufe, 60+ Hooks ✅ +- Zustand: 5 Stores (authStore, uiStore, commStore, pluginToolbarStore, calendarStore) ✅ + +## 6. Code-Splitting +- React.lazy ❌ MISSING (0 Verwendungen) +- Suspense ❌ MISSING + +## 7. i18n +- de.json: 750 Keys ✅ +- en.json: 750 Keys ✅ +- Perfekt synchron + +## 8. Forms +- React Hook Form + Zod installiert ✅ +- Nur in 3 Pages aktiv genutzt ⚠️ + +## 9. Feature Modules (70 Components, 13.893 Zeilen) +- ai/ (5 Komponenten) ✅ +- calendar/ (12 Komponenten) ✅ +- comm/ (11 Block-Typen) ✅ +- contacts/ (4 Komponenten) ✅ +- dms/ (9 Komponenten) ✅ +- mail/ (13 Komponenten) ✅ +- tags/ (3 Komponenten) ✅ +- companies/ ❌ MISSING +- dashboard/ ❌ MISSING + +## 10. API Client (12 Module, 3.456 Zeilen) +- client.ts, hooks.ts (Re-Export-Hub), auth.ts, users.ts, contacts.ts, roles.ts, groups.ts, audit.ts, notifications.ts, plugins.ts, settings.ts, attachments.ts, unifiedContacts.ts ✅ +- workflows.ts ❌ MISSING + +## 11. Custom Hooks (5 Hooks) +useAuth, useTenant, usePermission, useAIContext, useCommWebSocket ✅ + +## 12. Accessibility +- ARIA roles ⚠️ Partial +- sr-only ⚠️ Partial +- prefers-reduced-motion ✅ +- 44px touch targets ✅ +- focus-ring ✅ + +## 13. Tests (38 Dateien, 3.045 Zeilen) +- UI Components: 13 Tests ✅ +- Shell/Layout: 4 Tests ✅ +- Auth: 2 Tests ✅ +- Dashboard: 1 Test ✅ +- Contacts: 1 Test ✅ +- Settings: 3 Tests ✅ +- Calendar: 3 Tests ✅ +- Mail: 3 Tests ✅ +- DMS: 2 Tests ✅ +- Search: 2 Tests ✅ +- Tags: 2 Tests ✅ +- Permissions: 1 Test ✅ +- AuditLog: 1 Test ✅ +- i18n: 1 Test ✅ +- AI Components ❌ MISSING +- SettingsGroups/System/Currencies/Taxes/Sequences/Notifications/Plugins ❌ MISSING +- Calendar Page ❌ MISSING +- DMS Sub-Components ❌ MISSING +- Contact Sub-Components ❌ MISSING +- Comm Blocks ❌ MISSING +- API Hooks ❌ MISSING +- Stores ❌ MISSING + +## 14. E2E Tests (Playwright) +- Playwright ❌ MISSING (komplett) + +## 15. Frontend Build +- vite.config.ts ✅ +- tsconfig.json ✅ +- package.json ✅ (26 deps, 15 devDeps) +- tailwind.config.js ✅ +- postcss.config.js ✅ + +## 16. Frontend Dockerfile +- ❌ MISSING (Multi-Stage Build im Haupt-Dockerfile) + +## 17. Nginx Config +- ❌ MISSING + +## 18. TipTap (Rich Text Editor) +- RichTextEditor.tsx (231 Zeilen) ✅ +- 8 TipTap-Extensions ✅ + +## 19. PDF.js +- Nicht nötig — FilePreviewModal nutzt iframe mit Browser-PDF-Viewer ✅ + +## 20. TanStack Table +- DataGrid.tsx (160 Zeilen) ✅ +- AuditLog ColumnDef ✅ +- Virtual Scrolling ❌ MISSING + +## Zusammenfassung + +| Kategorie | Dateien | Zeilen | +|-----------|---------|--------| +| Pages | 27 | 7.826 | +| Components | 70 | 13.893 | +| API Modules | 12+ | 3.456 | +| Stores | 5 | 461 | +| Hooks | 5 | 247 | +| Routes | 2 | ~100 | +| i18n | 3 | 1.749 | +| Tests | 38 | 3.045 | +| Config | 5 | ~200 | +| Utils | 1 | ~100 | +| **Total** | **~167** | **~30.000** | + +**Frontend ist zu ~70% vollständig.** Kritische Lücken: Plugin-UI-System, Code-Splitting, E2E Tests, Contact-Detail-Route. Alle im MASTER-PLAN.md eingeplant. diff --git a/frontend/src/pages/Calendar.tsx b/frontend/src/pages/Calendar.tsx index c65caa2..0ef06c0 100644 --- a/frontend/src/pages/Calendar.tsx +++ b/frontend/src/pages/Calendar.tsx @@ -23,7 +23,7 @@ import { CalendarDetail } from '@/components/calendar/CalendarDetail'; import { AppointmentModal } from '@/components/calendar/AppointmentModal'; import { IcsControls } from '@/components/calendar/IcsControls'; import { SharingSettings } from '@/components/calendar/SharingSettings'; -import { useCalendarStore, type CalendarViewMode } from '@/stores/calendarStore'; +import { useCalendarStore, type CalendarViewMode } from '@/store/calendarStore'; import { usePluginToolbarStore } from '@/store/pluginToolbarStore'; import { ChevronLeft, ChevronRight, Info, Plus } from 'lucide-react'; import { diff --git a/frontend/src/stores/calendarStore.ts b/frontend/src/store/calendarStore.ts similarity index 100% rename from frontend/src/stores/calendarStore.ts rename to frontend/src/store/calendarStore.ts