php-admin/TODO.md

244 lines
9.1 KiB
Markdown
Raw Permalink Normal View History

2026-01-26 20:56:28 +00:00
# Core-Admin TODO
## Testing & Quality Assurance
### High Priority
- [x] **Test Coverage: Search System** - Test global search functionality
- [x] Test SearchProviderRegistry with multiple providers
- [x] Test search execution and result aggregation
- [x] Test fuzzy matching and relevance scoring
- [x] Test SearchResult creation, conversion, and immutability
- [x] Test workspace-scoped search results
- **Completed:** January 2026
- **File:** `tests/Feature/Search/SearchProviderRegistryTest.php`
2026-01-26 20:56:28 +00:00
- [x] **Test Coverage: Form Components** - Test authorization props
- [x] Test Button component with :can/:cannot props
- [x] Test Input component with authorization
- [x] Test Select/Checkbox/Toggle with permissions
- [x] Test workspace context in form components
- **Completed:** January 2026
- **File:** `tests/Feature/Forms/AuthorizationTest.php`
2026-01-26 20:56:28 +00:00
- [x] **Test Coverage: Livewire Modals** - Test modal system
- [x] Test modal opening/closing
- [x] Test validation in modals
- [x] Test nested modals
- [x] Test modal events and lifecycle
- [x] Test modal data passing
- **Completed:** January 2026
- **File:** `tests/Feature/Modal/LivewireModalTest.php`
2026-01-26 20:56:28 +00:00
### Medium Priority
- [x] **Test Coverage: Admin Menu System** - Test menu building
- [x] Test AdminMenuRegistry with multiple providers
- [x] Test MenuItemBuilder with badges
- [x] Test menu authorization (can/canAny)
- [x] Test menu active state detection
- [x] Test IconValidator
- **Completed:** January 2026
- **File:** `tests/Feature/Menu/AdminMenuSystemTest.php`
2026-01-26 20:56:28 +00:00
- [x] **Test Coverage: HLCRF Components** - Test layout system
- [x] Test HierarchicalLayoutBuilder parsing
- [x] Test nested layout rendering
- [x] Test self-documenting IDs (H-0, C-R-2, etc.)
- [x] Test responsive breakpoints
- **Completed:** January 2026
- **File:** `tests/Feature/Layout/HlcrfLayoutTest.php`
2026-01-26 20:56:28 +00:00
### Low Priority
- [x] **Test Coverage: Teapot/Honeypot** - Test anti-spam
- [x] Test TeapotController honeypot detection
- [x] Test HoneypotHit recording
- [x] Test automatic IP blocking
- [x] Test bot detection patterns
- [x] Test severity classification
- [x] Test rate limiting for log flooding prevention
- [x] Test header sanitization
- [x] Test model scopes and statistics
- **Completed:** January 2026
- **File:** `tests/Feature/Honeypot/TeapotTest.php`
2026-01-26 20:56:28 +00:00
## Features & Enhancements
### High Priority
- [ ] **Feature: Data Tables Component** - Reusable admin tables
- [ ] Create sortable table component
- [ ] Add bulk action support
- [ ] Implement column filtering
- [ ] Add export to CSV/Excel
- [ ] Test with large datasets (1000+ rows)
- **Estimated effort:** 6-8 hours
- **Files:** `src/Admin/Tables/`
- [ ] **Feature: Dashboard Widgets** - Composable dashboard
- [ ] Create widget system with layouts
- [ ] Add drag-and-drop widget arrangement
- [ ] Implement widget state persistence
- [ ] Create common widgets (stats, charts, lists)
- [ ] Test widget refresh and real-time updates
- **Estimated effort:** 8-10 hours
- **Files:** `src/Admin/Dashboard/`
- [ ] **Feature: Notification Center** - In-app notifications
- [ ] Create notification inbox component
- [ ] Add real-time notification delivery
- [ ] Implement notification preferences
- [ ] Add notification grouping
- [ ] Test with high notification volume
- **Estimated effort:** 6-8 hours
- **Files:** `src/Admin/Notifications/`
### Medium Priority
- [ ] **Enhancement: Form Builder** - Dynamic form generation
- [ ] Create form builder UI
- [ ] Support custom field types
- [ ] Add conditional field visibility
- [ ] Implement form templates
- [ ] Test complex multi-step forms
- **Estimated effort:** 8-10 hours
- **Files:** `src/Forms/Builder/`
- [ ] **Enhancement: Activity Feed Component** - Visual activity log
- [ ] Create activity feed Livewire component
- [ ] Add filtering by event type/user/date
- [ ] Implement infinite scroll
- [ ] Add export functionality
- [ ] Test with large activity logs
- **Estimated effort:** 4-5 hours
- **Files:** `src/Activity/Components/`
- [ ] **Enhancement: File Manager** - Media browser
- [ ] Create file browser component
- [ ] Add upload with drag-and-drop
- [ ] Implement folder organization
- [ ] Add image preview and editing
- [ ] Test with S3/CDN integration
- **Estimated effort:** 10-12 hours
- **Files:** `src/Media/Manager/`
### Low Priority
- [ ] **Enhancement: Theme Customizer** - Visual theme editor
- [ ] Create color picker for brand colors
- [ ] Add font selection
- [ ] Implement logo upload
- [ ] Add CSS custom property generation
- [ ] Test theme persistence per workspace
- **Estimated effort:** 6-8 hours
- **Files:** `src/Theming/`
- [ ] **Enhancement: Keyboard Shortcuts** - Power user features
- [ ] Implement global shortcut system
- [ ] Add command palette (Cmd+K)
- [ ] Create shortcut configuration UI
- [ ] Add accessibility support
- **Estimated effort:** 4-5 hours
- **Files:** `src/Shortcuts/`
## Security & Authorization
- [ ] **Audit: Admin Route Security** - Verify all admin routes protected
- [ ] Audit all admin controllers for authorization
- [ ] Ensure #[Action] attributes on sensitive operations
- [ ] Verify middleware chains
- [ ] Test unauthorized access attempts
- **Estimated effort:** 3-4 hours
- [ ] **Enhancement: Action Audit Log** - Track admin actions
- [ ] Log all admin operations
- [ ] Track who/what/when for compliance
- [ ] Add audit log viewer
- [ ] Implement tamper-proof logging
- **Estimated effort:** 4-5 hours
- **Files:** `src/Audit/`
## Documentation
- [x] **Guide: Creating Admin Panels** - Step-by-step guide
- [x] Document menu registration
- [x] Show modal creation examples
- [x] Explain authorization integration
- [x] Add complete example module
- **Completed:** January 2026
- **File:** `docs/packages/admin/creating-admin-panels.md`
- [x] **Guide: HLCRF Deep Dive** - Advanced layout patterns
- [x] Document all layout combinations
- [x] Show responsive design patterns
- [x] Explain ID system in detail
- [x] Add complex real-world examples
- **Completed:** January 2026
- **File:** `docs/packages/admin/hlcrf-deep-dive.md`
- [x] **API Reference: Components** - Component prop documentation
- [x] Document all form component props
- [x] Add prop validation rules
- [x] Show authorization prop examples
- [x] Include accessibility notes
- **Completed:** January 2026
- **File:** `docs/packages/admin/components-reference.md`
## Code Quality
- [ ] **Refactor: Extract Modal Manager** - Separate concerns
- [ ] Extract modal state management
- [ ] Create dedicated ModalManager service
- [ ] Add modal queue support
- [ ] Test modal lifecycle
- **Estimated effort:** 3-4 hours
- [ ] **Refactor: Standardize Component Props** - Consistent API
- [ ] Audit all component props
- [ ] Standardize naming (can/cannot/canAny)
- [ ] Add prop validation
- [ ] Update documentation
- **Estimated effort:** 2-3 hours
- [ ] **PHPStan: Fix Level 5 Errors** - Improve type safety
- [ ] Fix property type declarations
- [ ] Add missing return types
- [ ] Fix array shape types
- **Estimated effort:** 2-3 hours
## Performance
- [ ] **Optimization: Search Indexing** - Faster admin search
- [ ] Profile search performance
- [ ] Add search result caching
- [ ] Implement debounced search
- [ ] Optimize query building
- **Estimated effort:** 2-3 hours
- [ ] **Optimization: Menu Rendering** - Reduce menu overhead
- [ ] Cache menu structure
- [ ] Lazy load menu icons
- [ ] Optimize authorization checks
- **Estimated effort:** 1-2 hours
---
## Completed (January 2026)
- [x] **Forms: Authorization Props** - Added :can/:cannot/:canAny to all form components
- [x] **Search: Provider System** - Global search with multiple providers
- [x] **Search: Analytics** - Track search queries and results
- [x] **Documentation** - Complete admin package documentation
- [x] **Guide: Creating Admin Panels** - Menu registration, modals, authorization, example module
- [x] **Guide: HLCRF Deep Dive** - Layout combinations, ID system, responsive patterns
- [x] **API Reference: Components** - Form component props with authorization examples
- [x] **Test Coverage: Form Components** - Authorization props testing for Button/Input/Select/Checkbox/Toggle/Textarea (52 tests)
- [x] **Test Coverage: Admin Menu System** - AdminMenuRegistry, MenuItemBuilder, MenuItemGroup, IconValidator tests
- [x] **Test Coverage: Teapot/Honeypot** - Bot detection, severity classification, rate limiting, header sanitization, model scopes (40+ tests)
- [x] **Test Coverage: Search System** - SearchProviderRegistry, search execution, result aggregation, fuzzy matching, relevance scoring, SearchResult tests (60+ tests)
- [x] **Test Coverage: Livewire Modals** - Modal opening/closing, events, data passing, validation, nested modals, lifecycle (50+ tests)
- [x] **Test Coverage: HLCRF Components** - Layout variant parsing, nested rendering, self-documenting IDs, slot rendering, CSS structure (80+ tests)
2026-01-26 20:56:28 +00:00
*See `changelog/2026/jan/` for completed features.*