# TODO 6 - Package System

## Core Package Infrastructure

- [x] Add unit tests for package-glue.ts ✅ (45 parameterized tests)
- [ ] Complete package loader implementation (`src/lib/package-loader.ts`)
- [ ] Add package dependency resolution
- [ ] Implement package version management
- [ ] Create package installation/uninstallation API
- [ ] Add package compatibility validation
- [x] Add API-backed package export/snapshot endpoints to remove client DB reads (`frontends/nextjs/src/app/api/codegen/studio/route.ts` + docs/codegen-studio.md)
- [ ] Add tests for packages API routes (`frontends/nextjs/src/app/api/packages/*`)

## Admin Dialog Package

- [ ] Complete admin dialog component rendering
- [ ] Add dialog state management
- [ ] Implement form validation for admin inputs
- [ ] Create confirmation dialogs with custom actions
- [ ] Add keyboard shortcuts for dialog navigation

## Dashboard Package

- [ ] Complete widget rendering system
- [ ] Add drag-and-drop widget positioning
- [ ] Implement widget resize functionality
- [ ] Create dashboard layout persistence
- [ ] Add real-time data refresh for widgets

## Data Table Package

- [ ] Complete column configuration system
- [ ] Add server-side pagination support
- [ ] Implement advanced filtering (date ranges, multi-select)
- [ ] Create bulk action toolbar
- [ ] Add export functionality (CSV, Excel, PDF)
- [ ] Implement column resizing and reordering
- [ ] Add row selection with checkbox column

## Form Builder Package

- [ ] Complete form schema validation
- [ ] Add conditional field visibility
- [ ] Implement field dependency rules
- [ ] Create custom field type registration
- [ ] Add form submission with validation errors
- [ ] Implement multi-step form wizard
- [ ] Add form data persistence (draft saving)

## Nav Menu Package

- [ ] Complete navigation structure rendering
- [ ] Add permission-based menu filtering
- [ ] Implement active state highlighting
- [ ] Create collapsible menu sections
- [ ] Add mobile-responsive navigation

## Notification Center Package

- [ ] Complete notification rendering
- [ ] Add notification grouping by type/time
- [ ] Implement mark-as-read functionality
- [ ] Create notification preferences UI
- [ ] Add push notification support
- [ ] Implement notification sound/vibration options

## Spark Tools Package

- [ ] Complete spark-specific tool implementations
- [ ] Add tool configuration interface
- [ ] Implement tool execution logging
- [ ] Create tool permission management

## Package Seed Data

- [ ] Validate all package metadata.json files
- [ ] Ensure consistent component.json structure across packages
- [ ] Add Lua scripts for all package-specific logic
- [ ] Create seed data migration scripts
- [ ] Add package testing infrastructure
