A Vue 3 SPA for managing MongoDB schema configurations and processing operations. Supported by the MongoDB Configurator API
UI served at localhost:8082
# Install dependencies
npm install
# start the API and a testing database in containers.
npm run api
# Start development server (requires API on localhost:8081)
npm run dev
# Build for production
npm run build
# Run tests
npm run test
# Build Container for local testing before opening a PR
npm run container
# run the SPA as well as the backing services in local containers
npm run service
# shut down all of the containers after testing
npm run down
- Material Design design system
- Vue 3 + TypeScript + Composition API
- Vuetify 3 for UI components
- Vite for build tooling
- Vue Router for navigation
The application has undergone a comprehensive refactor to improve maintainability and user experience:
- Unified Property Editor: Single component handles all property types with polymorphic rendering
- Type Safety: Exact match to OpenAPI schema with comprehensive TypeScript interfaces
- Performance: Lazy loading and optimized rendering with
defineAsyncComponent
- Help System: Comprehensive help carousel and contextual assistance
- API Integration: Improved error handling and state management
- File Operations: Added "Lock All" functionality for supported file types
- Legacy Components: All Type* and Dictionary* components have been replaced
- Property Editing: Use the new PropertyEditor component for all property editing
- Type Definitions: Updated to match new API schema exactly
- Help Content: Comprehensive help system available throughout the application
- Method: Event-based popup dialogs with EventDialog component
- Triggers: All API 500 responses and processing events
- Display: Modal dialogs with event information and expandable details
- No retry mechanisms needed
- Router State: Complex event data passed via router state instead of query parameters
- Persistence: Server-side only
- Auto-save: On each field update with PUT requests returning updated documents
- No client-side state management needed
- Router State: Used for passing complex data between pages (event details, etc.)
- Navigation: Collapsible hamburger menu with help button in app bar
- Theme: Material Design defaults with comfortable density settings
- Loading: No spinners needed (local API is responsive)
- Confirmations: GitHub-style danger zone with case-sensitive typing
- Help System: Contextual help carousel accessible from app bar and navigation
- Lists: No pagination needed (small datasets)
- Large Documents: Simple JSON editors
- Real-time: No websockets, API is local and responsive
- Lazy Loading: Property type editors loaded on demand
- Unit Tests: Jest
- E2E Tests: Cypress
- API: Live local API with playground data
- Proxy: /api/* requests to API host/port (runtime configurable)
The application now uses a unified property editing system that handles all property types with polymorphic rendering:
PropertyEditor (main component)
├── Property Type Editors (polymorphic based on type)
│ ├── ArrayPropertyEditor
│ ├── ObjectPropertyEditor
│ ├── SimplePropertyEditor
│ ├── ComplexPropertyEditor
│ ├── EnumPropertyEditor
│ ├── EnumArrayPropertyEditor
│ ├── RefPropertyEditor
│ ├── ConstantPropertyEditor
│ ├── CustomPropertyEditor
│ └── OneOfPropertyEditor
├── Inline Editing (name, description, type, required)
└── usePropertyTypeEditor composable (shared logic)
- PropertyEditor: Unified property editing with polymorphic type rendering
- FileList: File listing with "Lock All" functionality and compact cards
- FileCard: Compact file information display with single-line layout
- EventCard: Event display with expandable sub-events and prominent IDs
- EventDialog: Simplified event-based error/processing display
- JsonDocumentEditor: JSON document editing for test data and migrations
- BaseCard: Reusable card component with title and header-actions slots
- AppLayout: Main application layout with collapsible navigation and help button
- DetailPageLayout: Standardized detail page layout
- FileListLayout: File listing layout with "Lock All" integration
- WelcomePage: Landing page with help carousel and comprehensive overview
- ConfigurationsPage: Configuration file listing with auto-navigation to new collections
- ConfigurationDetailPage: Configuration version management
- DictionariesPage: Dictionary file listing
- DictionaryDetailPage: Dictionary property editing with unified PropertyEditor
- TypesPage: Type file listing
- TypeDetailPage: Type property editing with unified PropertyEditor
- TestDataPage: Test data file listing
- TestDataDetailPage: Document editing with JSON editor
- EnumeratorsPage: Enumerator listing
- EnumeratorDetailPage: Enumeration editing
- EventViewerPage: Detailed event viewing with state management
- AdminPage: Database management and system operations
The application supports a comprehensive type system that matches the OpenAPI schema exactly:
- Array: Lists of values with configurable item types
- Object: Structured objects with properties and additional properties toggle
- Simple: JSON schema definitions with validation
- Complex: Dual JSON/BSON schema definitions with validation
- Enum: Enumerated values with enum name reference
- Enum Array: Arrays of enumerated values
- Reference: References to other type files
- Constant: Fixed values
- Custom: Custom type definitions
- One Of: Union types with multiple property options
- Dictionary Properties: Cannot use
simple
orcomplex
types - Type Properties: Only support
simple
,complex
,object
,array
, andcustom
types
Comprehensive TypeScript type guards ensure type safety:
isArrayProperty()
,isObjectProperty()
,isSimpleProperty()
, etc.- Prevents runtime errors when accessing type-specific properties
- Enables polymorphic rendering with confidence
GET /api/config/
- App startup configuration (BUILT_AT check)GET /api/configurations/
- List configurationsPOST /api/configurations/
- Process all configurationsGET /api/configurations/{file_name}.yaml/
- Get specific configuration (with .yaml extension)POST /api/configurations/collection/{name}
- Create new collection
GET /api/configurations/json_schema/{file_name}/{version}/
- Download JSON schemaGET /api/configurations/bson_schema/{file_name}/{version}/
- Download BSON schema
- All resource types:
GET
,PUT
,DELETE
operations with auto-save - Lock/unlock operations via
PUT
endpoints - File listing via
GET
endpoints - "Lock All" functionality for supported file types
DELETE /api/database/
- Drop database (with GitHub-style confirmation)- Processing operations via
POST
endpoints
- All endpoints return 200 or 500 with Event objects
- 500 responses and processing events displayed in popup dialogs
- Event data passed via router state for complex information
The application includes comprehensive help content for all major features:
- Welcome: Getting started guide and feature overview
- Configurations: Collection configuration management
- Dictionaries: Data dictionary creation and editing
- Types: Custom type definitions
- Enumerators: Enum value management
- Test Data: Sample data generation
- Migrations: Data transformation scripts
- Admin: Database and system management
- Help carousel on the landing page with navigation controls
- Contextual help button in app bar (?) that opens appropriate carousel slide
- Dynamic help content based on current page context
- Comprehensive overview with detailed feature explanations
- Compact File Cards: Reduced vertical space, single-line layout
- Right-Aligned Statistics: Created/Updated/Size info aligned to the right
- Improved Typography: Page titles (H3), file names (H4)
- Better Sorting: Always sorted by file name
- Lock All Integration: Positioned on same row as page title
- Enhanced Event Cards: Removed duplicate type display, increased ID prominence
- Better Expand/Collapse: More pronounced buttons with text and icons
- Cleaner UI: Removed unnecessary remove buttons from top-level events
- Simplified Dialogs: Streamlined EventDialog for delete/error operations
- Auto-Navigation: Process All button opens event details page
- Auto-Navigation: New collections automatically navigate to detail page
- Seamless Experience: Immediate access to new collection configuration
- State Management: Improved router state handling for complex data
- Error Handling: Streamlined notifications and user feedback
- Property type editors use
defineAsyncComponent
for lazy loading - Complex property types are loaded only when needed
- Improved initial page load times
- Unified PropertyEditor reduces code duplication
- Shared composables for common functionality (
usePropertyTypeEditor
,useFiles
,useEvents
) - Type-safe interfaces prevent runtime errors
- Mobile-friendly grid layouts
- Collapsible sections for complex properties
- Touch-friendly interface elements
- Comfortable density settings for better usability
- Property Types: Add new property type editors in
src/components/property-types/
- Type Safety: Update type definitions in
src/types/types.ts
with proper type guards - Help Content: Add help content in
src/composables/useHelp.ts
- Testing: Write unit tests for new components
- Endpoints: Add new API endpoints in
src/utils/api.ts
with proper error handling - Types: Update type definitions to match API schema exactly
- Error Handling: Implement proper error handling for new endpoints
- File Extensions: Ensure proper file extensions (.yaml) for configuration endpoints
- Material Design: Follow Vuetify 3 design patterns
- Responsive: Ensure mobile compatibility
- Theming: Use the established color scheme and comfortable density
src/types/types.ts
: Complete type system with type guardssrc/components/PropertyEditor.vue
: Main property editing componentsrc/composables/usePropertyTypeEditor.ts
: Shared property editing logicsrc/utils/api.ts
: All API endpoints and error handlingsrc/pages/WelcomePage.vue
: Help carousel implementationsrc/components/AppLayout.vue
: Main layout with navigation and help system