This document outlines the implementation of an admin panel for managing the agents catalog in a Vue 3 + Vuetify application. The panel provides CRUD operations, validation, reordering, and import/export functionality while maintaining a working copy pattern for safe editing.
graph TB
A[Vue 3 + Vuetify App] --> B[Router]
B --> C[Home View - Public]
B --> D[Admin Route - Protected]
C --> E[AgentsGrid + AgentCard]
D --> F[AdminDashboardView]
F --> G[GroupList + GroupFormDialog]
F --> H[AgentList + AgentFormDialog]
F --> I[ImportExportPanel]
J[useCatalogEditor Composable] --> K[Working Copy State]
J --> L[Validation Layer]
J --> M[LocalStorage Drafts]
L --> N[catalogSchema Validator]
classDef primary fill:#1976d2,color:#fff
classDef secondary fill:#4caf50,color:#fff
classDef core fill:#9c27b0,color:#fff
class A,B primary
class C,D,E,F secondary
class G,H,I,J,K,L,M,N core
✅ Schema & Validation - JSON schema for data integrity ✅ Authentication - Basic secret-key gate ✅ State Management - Working copy with persistence 🔄 Quality Gates - Refinement and security scans
⏳ Dashboard Layout - Tabbed interface ⏳ CRUD Components - Lists and forms for groups/agents ⏳ Drag & Drop - Reordering functionality ⏳ Import/Export - File handling
⏳ Component Wiring - Connect all components ⏳ Preview Mode - Live preview in main catalog
⏳ Testing - Unit, E2E, and integration tests ⏳ Refinement - Code quality and accessibility ⏳ Documentation - User and deployment guides
- Frontend-only gate comparing user input to
VITE_ADMIN_SECRET - Session-based access control
- No backend required (static deployment compatible)
- Working copy pattern for safe editing
- Optional LocalStorage drafts (debounced saves)
- Import/Export workflow for deployment
- JSON Schema for structural validation
- Real-time feedback in forms
- Unique constraint enforcement
- User-friendly error messages
- Vuetify components for consistency
- Responsive design (mobile-friendly)
- Loading states and error handling
- Confirmation dialogs for destructive actions
src/
├── views/
│ ├── AdminLoginView.vue # Authentication gate
│ └── AdminDashboardView.vue # Main admin interface
├── components/
│ └── admin/
│ ├── GroupList.vue # Groups data table
│ ├── GroupFormDialog.vue # Group CRUD form
│ ├── AgentList.vue # Agents data table
│ ├── AgentFormDialog.vue # Agent CRUD form
│ └── ImportExportPanel.vue # File operations
├── composables/
│ ├── useAgents.js # Original catalog loader
│ └── useCatalogEditor.js # Admin state management
└── utils/
└── catalogSchema.js # Validation utilities
flowchart LR
A[Original JSON] --> B[Working Copy]
B --> C[User Edits]
C --> D[Validation]
D --> E[State Update]
E --> F[LocalStorage]
E --> G[Export File]
H[Import File] --> I[Parse & Validate]
I --> J[Replace Working Copy]
classDef source fill:#4caf50,color:#fff
classDef process fill:#2196f3,color:#fff
classDef storage fill:#9c27b0,color:#fff
class A,H source
class B,C,D,E,I process
class F,G,J storage
The useCatalogEditor composable manages:
- Reactive state: Groups and agents arrays
- CRUD operations: Add, update, delete functions
- Validation: Schema-based validation with error reporting
- Persistence: Optional LocalStorage drafts
- Import/Export: JSON serialization and parsing
- Reordering: Array manipulation for groups and agents
- ✅ Input sanitization
- ✅ Schema validation prevents malformed data
- ✅ No sensitive data logging
- ✅ File upload validation
⚠️ Secret visible in client-side code⚠️ No server-side session management⚠️ Suitable for low-risk environments only
- Development: Use admin panel to edit catalog
- Export: Download modified catalog as JSON
- Deploy: Replace
public/agents_catalog.jsonwith exported file - Verify: Test changes in production
- Component rendering and interactions
- Composable logic and state management
- Validation functions
- Utility functions
- Component communication
- State persistence
- Import/export functionality
- Complete user workflows
- Authentication flow
- CRUD operations
- Reactive optimization: Computed properties for filtered data
- Debounced saves: LocalStorage writes batched
- Lazy validation: Real-time but not blocking
- Memory management: Cleanup on unmount
- Network errors: Retry logic with user feedback
- Validation errors: Field-level and form-level messages
- File errors: Upload/download failure handling
- State errors: Recovery from corrupted drafts
- Keyboard navigation: Full keyboard support
- Screen readers: Proper ARIA labels and roles
- Color contrast: Vuetify's accessible color palette
- Focus management: Logical tab order and focus trapping
- Modern browsers: Chrome, Firefox, Safari, Edge
- Vue 3 requirements: ES2020+ support
- Vuetify 3: Modern browser features required
# Install dependencies
npm install
# Development server
npm run dev
# Set admin secret (create .env file)
VITE_ADMIN_SECRET=your-secret-key-here
# Run tests
npm run test
# Build for production
npm run buildImplementation Guide - Admin Panel for Agents Management