- Implemented `owl_to_mermaid.py` to convert OWL/Turtle files into Mermaid class diagrams. - Implemented `owl_to_plantuml.py` to convert OWL/Turtle files into PlantUML class diagrams. - Added two new PlantUML files for custodian multi-aspect diagrams.
1027 lines
31 KiB
Markdown
1027 lines
31 KiB
Markdown
# GLAM Frontend Implementation Master Checklist
|
|
|
|
## Project Overview
|
|
|
|
**Objective**: Build a modern React + TypeScript frontend for the GLAM Heritage Custodian Ontology, migrating and enhancing functionality from the example_ld project.
|
|
|
|
**Timeline**: 16 weeks (4 months)
|
|
**Team Size**: 1-2 developers
|
|
**Tech Stack**: React 18, TypeScript 5, Vite, D3.js v7, N3.js, Zustand, React Query
|
|
|
|
---
|
|
|
|
## Pre-Flight Checklist
|
|
|
|
### Environment Setup
|
|
- [ ] Node.js 18+ installed
|
|
- [ ] npm or yarn configured
|
|
- [ ] Git repository initialized
|
|
- [ ] Code editor with TypeScript support (VS Code recommended)
|
|
- [ ] Browser dev tools configured (React DevTools, Redux DevTools)
|
|
|
|
### Access Verification
|
|
- [ ] Access to `/Users/kempersc/apps/example_ld` for reference
|
|
- [ ] Access to `/Users/kempersc/apps/glam` for development
|
|
- [ ] Access to RDF schemas at `/schemas/20251121/rdf/`
|
|
- [ ] Access to UML diagrams at `/schemas/20251121/uml/`
|
|
|
|
---
|
|
|
|
## Phase 1: Foundation (Weeks 1-2) ✅ COMPLETE
|
|
|
|
### Week 1: Project Initialization ✅
|
|
|
|
#### Day 1: Project Structure ✅
|
|
- [x] Create `frontend/` directory in glam project
|
|
- [x] Initialize Vite project with React + TypeScript template
|
|
- [x] Create directory structure
|
|
- [x] Initialize Git
|
|
- [x] Create `.gitignore` file
|
|
- [x] Create `README.md` with project setup instructions
|
|
|
|
#### Day 2: Dependencies Installation ✅
|
|
- [x] Install core dependencies (d3, react-router-dom, etc.)
|
|
- [x] Install dev dependencies (vitest, testing-library, playwright)
|
|
- [x] Verify all dependencies installed correctly
|
|
- [x] Run `npm run dev` to test Vite dev server
|
|
|
|
#### Day 3: Configuration Files ✅
|
|
- [x] Configure TypeScript (`tsconfig.json`) with strict mode and path aliases
|
|
- [x] Configure Vite (`vite.config.ts`) with path aliases and build optimization
|
|
- [x] Configure Vitest (`vitest.config.ts`) with test environment and coverage
|
|
- [x] Configure ESLint (`.eslintrc.json`) with TypeScript and React rules
|
|
- [x] Configure Prettier (`.prettierrc`)
|
|
- [x] Create `.editorconfig` for consistent formatting
|
|
|
|
#### Day 4: Core Type Definitions ✅
|
|
- [x] Create `src/types/rdf.ts` - RdfFormat, GraphNode, GraphLink, GraphData, NodeType
|
|
- [x] Create `src/types/graph.ts` - Merged with rdf.ts for simplicity
|
|
- [x] TypeScript interfaces fully defined with comprehensive types
|
|
|
|
#### Day 5: Testing Infrastructure ✅
|
|
- [x] Create test setup file (`tests/setup.ts`)
|
|
- [x] Write first tests (63 tests passing)
|
|
- [x] Configure comprehensive test coverage
|
|
- [x] **Status**: 63/63 tests passing (100%)
|
|
|
|
### Week 2: Core Library Migration ✅
|
|
|
|
#### Day 6-7: IndexedDB Manager ✅
|
|
- [x] Created `src/lib/storage/indexed-db.ts` (TypeScript implementation)
|
|
- [x] Promise-based API implemented
|
|
- [x] CRUD operations fully functional
|
|
- [x] Error handling and transaction support
|
|
- [x] Note: Using functional approach instead of class-based
|
|
|
|
#### Day 8-9: RDF Parser ✅
|
|
- [x] Created `src/lib/rdf/parser.ts` (514 lines)
|
|
- [x] N-Triples format support ✅
|
|
- [x] Turtle format support ✅
|
|
- [x] Node type inference from RDF type URIs
|
|
- [x] Bidirectional relationship handling
|
|
- [x] Label extraction and node metadata
|
|
- [x] **20 unit tests** - all passing
|
|
- [x] Created `useRdfParser.ts` hook - 8 tests passing
|
|
- [x] **Fixed 5 failing tests using TDD approach** (Nov 22)
|
|
|
|
#### Day 10: Utilities Migration ✅
|
|
- [x] Created `src/lib/utils/helpers.ts`
|
|
- [x] TypeScript utility functions
|
|
- [x] Helper functions for RDF parsing (predicateToLabel, getShortLabel, inferTypeFromUri)
|
|
|
|
---
|
|
|
|
---
|
|
|
|
## Phase 2: Visualization Components (Weeks 3-4) ✅ COMPLETE
|
|
|
|
### Week 3: Core Visualization & Layout ✅
|
|
|
|
#### Day 11-15: Force-Directed Graph & Layout ✅
|
|
- [x] Created `src/components/visualizations/GraphView.tsx` (441 lines)
|
|
- [x] D3.js v7 force-directed graph implementation
|
|
- [x] Node positioning with force simulation
|
|
- [x] Link rendering with arrows
|
|
- [x] Interactive zoom and pan
|
|
- [x] Node dragging functionality
|
|
- [x] Node click handling and selection
|
|
- [x] Hover effects and tooltips
|
|
- [x] Color coding by node type
|
|
- [x] Created layout components:
|
|
- [x] `src/components/layout/Navigation.tsx` (42 lines)
|
|
- [x] `src/components/layout/Layout.tsx` (24 lines)
|
|
- [x] **13 visualization tests** - all passing
|
|
|
|
### Week 4: UI Components & Forms ✅
|
|
|
|
#### Day 16-20: UI Components Library & Forms ✅
|
|
- [x] Created `src/components/ui/Button.tsx` with variants
|
|
- [x] Created `src/components/forms/FileUpload.tsx` (file picker, drag-drop)
|
|
- [x] Created `src/components/forms/QueryForm.tsx` (SPARQL query interface)
|
|
- [x] RDF upload with format selection
|
|
- [x] File validation and error handling
|
|
- [x] Parse and store in state management
|
|
- [x] **25 component tests** - all passing
|
|
|
|
---
|
|
|
|
### Week 3: Layout and Page Components
|
|
|
|
#### Day 11-12: Layout Components
|
|
- [ ] Create `src/components/layout/Header.tsx`:
|
|
- [ ] Logo and branding
|
|
- [ ] Navigation menu
|
|
- [ ] User menu (if auth enabled)
|
|
- [ ] Theme toggle
|
|
- [ ] Create `src/components/layout/Sidebar.tsx`:
|
|
- [ ] Navigation links
|
|
- [ ] Collapsible sections
|
|
- [ ] Active link highlighting
|
|
- [ ] Create `src/components/layout/Footer.tsx`:
|
|
- [ ] Copyright information
|
|
- [ ] Links to documentation
|
|
- [ ] Version number
|
|
- [ ] Create `src/components/layout/Layout.tsx`:
|
|
- [ ] Combine header, sidebar, footer
|
|
- [ ] Responsive layout
|
|
- [ ] Mobile menu
|
|
- [ ] Style all layout components
|
|
- [ ] Write component tests
|
|
- [ ] Test responsive behavior
|
|
|
|
#### Day 13: Page Components (Part 1)
|
|
- [ ] Create `src/pages/Home.tsx` (replaces `index.html`):
|
|
- [ ] Welcome message
|
|
- [ ] Quick start guide
|
|
- [ ] Recent datasets
|
|
- [ ] Statistics overview
|
|
- [ ] Create `src/pages/ApiExplorer.tsx` (replaces `api.html`):
|
|
- [ ] API endpoint tester
|
|
- [ ] Request builder
|
|
- [ ] Response viewer
|
|
- [ ] Example requests
|
|
- [ ] Set up React Router:
|
|
- [ ] Define routes
|
|
- [ ] Create route configuration
|
|
- [ ] Add 404 page
|
|
- [ ] Test navigation between pages
|
|
|
|
#### Day 14: Page Components (Part 2)
|
|
- [ ] Create `src/pages/DatabaseManager.tsx` (replaces `databases.html`):
|
|
- [ ] List stored RDF datasets
|
|
- [ ] Import/export functionality
|
|
- [ ] Database statistics
|
|
- [ ] Clear database option
|
|
- [ ] Create `src/pages/GraphVisualization.tsx` (replaces `graphVisualization.html`):
|
|
- [ ] Graph container
|
|
- [ ] Control panel
|
|
- [ ] Legend
|
|
- [ ] Export options
|
|
- [ ] Create `src/pages/RdfVisualization.tsx` (replaces `visualization.html`):
|
|
- [ ] RDF data viewer
|
|
- [ ] Format selector
|
|
- [ ] Syntax highlighting
|
|
- [ ] Download options
|
|
- [ ] Test all pages
|
|
- [ ] Ensure consistent styling
|
|
|
|
#### Day 15: UI Components Library
|
|
- [ ] Create `src/components/ui/Button.tsx`:
|
|
- [ ] Primary, secondary, danger variants
|
|
- [ ] Size options
|
|
- [ ] Loading state
|
|
- [ ] Disabled state
|
|
- [ ] Create `src/components/ui/Modal.tsx`:
|
|
- [ ] Backdrop
|
|
- [ ] Close button
|
|
- [ ] Portal rendering
|
|
- [ ] Keyboard navigation (Escape to close)
|
|
- [ ] Create `src/components/ui/Tooltip.tsx`:
|
|
- [ ] Positioning logic
|
|
- [ ] Arrow indicator
|
|
- [ ] Delay options
|
|
- [ ] Create `src/components/ui/Input.tsx`:
|
|
- [ ] Text input
|
|
- [ ] Validation states
|
|
- [ ] Error messages
|
|
- [ ] Create `src/components/ui/Select.tsx`:
|
|
- [ ] Dropdown select
|
|
- [ ] Search functionality
|
|
- [ ] Multi-select option
|
|
- [ ] Write Storybook stories (or tests) for each component
|
|
- [ ] Ensure accessibility (ARIA labels, keyboard nav)
|
|
|
|
### Week 4: Form Components
|
|
|
|
#### Day 16-17: RDF Upload Form
|
|
- [ ] Create `src/components/forms/RdfUpload.tsx`:
|
|
- [ ] File picker
|
|
- [ ] Drag-and-drop support
|
|
- [ ] Format selection
|
|
- [ ] URL input option
|
|
- [ ] Preview pane
|
|
- [ ] Implement file upload logic:
|
|
- [ ] Client-side validation
|
|
- [ ] File size limits
|
|
- [ ] Format detection
|
|
- [ ] Progress indicator
|
|
- [ ] Parse uploaded RDF
|
|
- [ ] Store in IndexedDB
|
|
- [ ] Display success/error messages
|
|
- [ ] Write component tests
|
|
- [ ] Test with various file sizes
|
|
|
|
#### Day 18: SPARQL Query Form
|
|
- [ ] Create `src/components/forms/QueryForm.tsx`:
|
|
- [ ] Query textarea with syntax highlighting
|
|
- [ ] Example queries dropdown
|
|
- [ ] Execute button
|
|
- [ ] Clear button
|
|
- [ ] Implement SPARQL execution:
|
|
- [ ] Query validation
|
|
- [ ] Execute against local store
|
|
- [ ] Display results in table
|
|
- [ ] Export results (CSV, JSON)
|
|
- [ ] Add query history
|
|
- [ ] Write component tests
|
|
|
|
#### Day 19: Configuration Forms
|
|
- [ ] Create `src/components/forms/VisualizationConfig.tsx`:
|
|
- [ ] Layout algorithm selection
|
|
- [ ] Color scheme picker
|
|
- [ ] Node size options
|
|
- [ ] Label visibility toggle
|
|
- [ ] Create `src/components/forms/ExportConfig.tsx`:
|
|
- [ ] Format selection
|
|
- [ ] Quality settings
|
|
- [ ] Filename input
|
|
- [ ] Implement form validation with react-hook-form
|
|
- [ ] Write form tests
|
|
|
|
#### Day 20: Error Boundaries and Loading States
|
|
- [ ] Create `src/components/ErrorBoundary.tsx`:
|
|
- [ ] Catch React errors
|
|
- [ ] Display user-friendly error message
|
|
- [ ] Log errors for debugging
|
|
- [ ] Reset button
|
|
- [ ] Create `src/components/LoadingState.tsx`:
|
|
- [ ] Spinner component
|
|
- [ ] Skeleton screens
|
|
- [ ] Progressive loading
|
|
- [ ] Create `src/components/EmptyState.tsx`:
|
|
- [ ] No data illustrations
|
|
- [ ] Helpful messages
|
|
- [ ] Call-to-action buttons
|
|
- [ ] Apply to all pages
|
|
- [ ] Test error scenarios
|
|
|
|
---
|
|
|
|
## Phase 3: State Management & Routing (Weeks 5-6) 🔄 IN PROGRESS (43% Complete)
|
|
|
|
**Current Status**:
|
|
- ✅ Global state management (GraphContext)
|
|
- ✅ React Router navigation (3 pages)
|
|
- ✅ Navigation components
|
|
- ✅ Test-driven parser fixes (63/63 tests passing)
|
|
- ⏳ History/Undo functionality
|
|
- ⏳ Persistent UI state
|
|
- ⏳ Advanced query builder
|
|
- ⏳ SPARQL query execution
|
|
|
|
### Week 5: State Management ✅
|
|
|
|
#### Day 21-25: React Context & Router ✅
|
|
- [x] Created `src/contexts/GraphContext.tsx` (242 lines)
|
|
- [x] Global state for graph data, selections, filters, config
|
|
- [x] Action creators for all state updates
|
|
- [x] TypeScript interfaces fully typed
|
|
- [x] **14 tests** - all passing
|
|
- [x] Implemented React Router v6:
|
|
- [x] Created `src/pages/Home.tsx` (117 lines) - landing page
|
|
- [x] Created `src/pages/Visualize.tsx` (248 lines) - main graph view
|
|
- [x] Created `src/pages/Database.tsx` (153 lines) - storage management
|
|
- [x] Route configuration in `main.tsx`
|
|
- [x] Navigation component with active link highlighting
|
|
- [x] Responsive layout with CSS styling
|
|
- [x] **TDD Session** (Nov 22):
|
|
- [x] Fixed 5 failing parser tests
|
|
- [x] RDF parser literal handling
|
|
- [x] Turtle multiple object parsing
|
|
- [x] Node creation order fixes
|
|
- [x] All 63 tests now passing (100%)
|
|
|
|
### Week 6: Advanced State Features ⏳ NEXT
|
|
|
|
#### Day 26-27: History/Undo Functionality ⏳ CURRENT TASK
|
|
- [ ] Create `src/contexts/HistoryContext.tsx`
|
|
- [ ] Implement state history tracking:
|
|
- [ ] Store previous states
|
|
- [ ] Undo/redo commands
|
|
- [ ] History limit (e.g., 50 actions)
|
|
- [ ] Create history actions:
|
|
- [ ] `undo()` - Revert to previous state
|
|
- [ ] `redo()` - Move forward in history
|
|
- [ ] `pushHistory()` - Add new state to history
|
|
- [ ] `clearHistory()` - Reset history
|
|
- [ ] Add keyboard shortcuts:
|
|
- [ ] Ctrl+Z / Cmd+Z for undo
|
|
- [ ] Ctrl+Shift+Z / Cmd+Shift+Z for redo
|
|
- [ ] Create UI components:
|
|
- [ ] History panel (list of actions)
|
|
- [ ] Undo/redo buttons
|
|
- [ ] History timeline visualization
|
|
- [ ] Write tests for history functionality
|
|
- [ ] Integrate with GraphContext
|
|
|
|
#### Day 28-29: Persistent UI State ⏳
|
|
- [ ] Create `src/lib/storage/ui-state.ts`
|
|
- [ ] Implement localStorage integration:
|
|
- [ ] Save UI preferences
|
|
- [ ] Save filter state
|
|
- [ ] Save visualization config
|
|
- [ ] Save recent files/queries
|
|
- [ ] Add state hydration on load:
|
|
- [ ] Load saved preferences
|
|
- [ ] Validate stored data
|
|
- [ ] Handle migration of old formats
|
|
- [ ] Create settings UI:
|
|
- [ ] Theme selector (light/dark)
|
|
- [ ] Default visualization settings
|
|
- [ ] Clear saved data button
|
|
- [ ] Write tests for persistence
|
|
- [ ] Add versioning for saved state
|
|
|
|
#### Day 30: Advanced Query Builder ⏳
|
|
- [ ] Create `src/components/forms/QueryBuilder.tsx`
|
|
- [ ] Implement visual SPARQL query builder:
|
|
- [ ] Triple pattern builder
|
|
- [ ] Subject/predicate/object selectors
|
|
- [ ] Filter builder (FILTER expressions)
|
|
- [ ] Optional patterns (OPTIONAL)
|
|
- [ ] Union patterns (UNION)
|
|
- [ ] Add query templates:
|
|
- [ ] Common queries dropdown
|
|
- [ ] Save custom templates
|
|
- [ ] Share templates
|
|
- [ ] Add syntax highlighting for generated SPARQL
|
|
- [ ] Add query validation
|
|
- [ ] Write component tests
|
|
|
|
---
|
|
|
|
### Week 5: Force-Directed Graph
|
|
|
|
#### Day 21-22: D3 Graph Migration (`graphVisualization.js` → `d3-graph.ts`)
|
|
- [ ] Copy `/Users/kempersc/apps/example_ld/js/graphVisualization.js` for reference
|
|
- [ ] Create `src/components/visualizations/GraphView/d3-graph.ts`
|
|
- [ ] Upgrade D3 v5 syntax to v7:
|
|
- [ ] Update force simulation API
|
|
- [ ] Update selection API
|
|
- [ ] Update scale API
|
|
- [ ] Implement core force-directed layout:
|
|
- [ ] Node positioning
|
|
- [ ] Link rendering
|
|
- [ ] Force parameters (charge, link distance, collision)
|
|
- [ ] Add node styling by type:
|
|
- [ ] Color schemes
|
|
- [ ] Shape variations
|
|
- [ ] Size variations
|
|
- [ ] Add link styling by relationship:
|
|
- [ ] Stroke width
|
|
- [ ] Stroke color
|
|
- [ ] Arrows/markers
|
|
|
|
#### Day 23: Graph Interactivity
|
|
- [ ] Implement zoom and pan:
|
|
- [ ] d3.zoom() behavior
|
|
- [ ] Scale extent limits
|
|
- [ ] Smooth transitions
|
|
- [ ] Implement node dragging:
|
|
- [ ] Drag behavior
|
|
- [ ] Fix node position on drag
|
|
- [ ] Release to resume simulation
|
|
- [ ] Implement node click handling:
|
|
- [ ] Select node
|
|
- [ ] Show details panel
|
|
- [ ] Highlight connected nodes
|
|
- [ ] Implement hover effects:
|
|
- [ ] Tooltip with node info
|
|
- [ ] Highlight on hover
|
|
- [ ] Dim unrelated nodes
|
|
- [ ] Add keyboard navigation:
|
|
- [ ] Arrow keys to navigate nodes
|
|
- [ ] Enter to expand
|
|
- [ ] Escape to deselect
|
|
|
|
#### Day 24-25: React Integration
|
|
- [ ] Create React hook `useD3ForceGraph`:
|
|
- [ ] Accept nodes and links as props
|
|
- [ ] Return SVG ref
|
|
- [ ] Handle cleanup on unmount
|
|
- [ ] Respond to data changes
|
|
- [ ] Create `src/components/visualizations/GraphView/index.tsx`:
|
|
- [ ] Use the D3 hook
|
|
- [ ] Add control panel
|
|
- [ ] Add legend
|
|
- [ ] Add export button
|
|
- [ ] Create control components:
|
|
- [ ] Layout algorithm selector
|
|
- [ ] Filter controls
|
|
- [ ] Search box
|
|
- [ ] Reset button
|
|
- [ ] Implement filtering:
|
|
- [ ] By node type
|
|
- [ ] By relationship type
|
|
- [ ] By search term
|
|
- [ ] Test with sample data
|
|
- [ ] Test with large datasets (1000+ nodes)
|
|
|
|
### Week 6: Additional Visualizations
|
|
|
|
#### Day 26-27: Timeline Visualization
|
|
- [ ] Create `src/components/visualizations/Timeline/index.tsx`
|
|
- [ ] Implement temporal change visualization:
|
|
- [ ] Time scale (d3.scaleTime)
|
|
- [ ] Swim lanes for institutions
|
|
- [ ] Event markers (founding, merger, closure)
|
|
- [ ] Add interactivity:
|
|
- [ ] Zoom to time range
|
|
- [ ] Click event for details
|
|
- [ ] Tooltip with event info
|
|
- [ ] Add controls:
|
|
- [ ] Date range selector
|
|
- [ ] Event type filter
|
|
- [ ] Institution filter
|
|
- [ ] Style timeline:
|
|
- [ ] Color code by event type
|
|
- [ ] Symbol shapes
|
|
- [ ] Grid lines
|
|
- [ ] Write visualization tests
|
|
|
|
#### Day 28: Geographic Map
|
|
- [ ] Create `src/components/visualizations/Map/index.tsx`
|
|
- [ ] Integrate Leaflet for base map
|
|
- [ ] Add D3 overlay for custom markers:
|
|
- [ ] Circle markers scaled by count
|
|
- [ ] Color by institution type
|
|
- [ ] Cluster markers when zoomed out
|
|
- [ ] Implement interactivity:
|
|
- [ ] Click marker for details
|
|
- [ ] Hover for preview
|
|
- [ ] Zoom to region
|
|
- [ ] Add map controls:
|
|
- [ ] Layer toggle (street, satellite)
|
|
- [ ] Legend
|
|
- [ ] Search by location
|
|
- [ ] Test with geocoded data
|
|
|
|
#### Day 29: Class Hierarchy Tree
|
|
- [ ] Create `src/components/visualizations/Hierarchy/index.tsx`
|
|
- [ ] Implement tree layout (d3.tree):
|
|
- [ ] Hierarchical positioning
|
|
- [ ] Collapsible nodes
|
|
- [ ] Smooth transitions
|
|
- [ ] Style tree nodes:
|
|
- [ ] Rectangles for classes
|
|
- [ ] Diamonds for properties
|
|
- [ ] Circles for datatypes
|
|
- [ ] Add interactivity:
|
|
- [ ] Click to expand/collapse
|
|
- [ ] Zoom to fit
|
|
- [ ] Search and highlight
|
|
- [ ] Add breadcrumb navigation
|
|
- [ ] Test with ontology data
|
|
|
|
#### Day 30: Visualization Testing
|
|
- [ ] Write unit tests for D3 utilities
|
|
- [ ] Write integration tests for each visualization
|
|
- [ ] Visual regression tests (Percy, Chromatic, or screenshots)
|
|
- [ ] Performance tests:
|
|
- [ ] Measure render time
|
|
- [ ] Test with 100, 1000, 10000 nodes
|
|
- [ ] Profile memory usage
|
|
- [ ] Accessibility tests:
|
|
- [ ] Keyboard navigation
|
|
- [ ] Screen reader support
|
|
- [ ] Color contrast
|
|
- [ ] Cross-browser testing (Chrome, Firefox, Safari, Edge)
|
|
|
|
---
|
|
|
|
## Phase 4: State Management and API (Weeks 7-8)
|
|
|
|
### Week 7: State Management
|
|
|
|
#### Day 31-32: Zustand Stores
|
|
- [ ] Create `src/stores/rdf-store.ts`:
|
|
- [ ] RDF data state
|
|
- [ ] Loading states
|
|
- [ ] Error states
|
|
- [ ] Actions (load, parse, save, clear)
|
|
- [ ] Create `src/stores/ui-store.ts`:
|
|
- [ ] Theme state (light/dark)
|
|
- [ ] Sidebar collapsed state
|
|
- [ ] Selected visualization type
|
|
- [ ] Filter states
|
|
- [ ] Actions (toggle theme, set view, update filters)
|
|
- [ ] Create `src/stores/visualization-store.ts`:
|
|
- [ ] Visualization configuration
|
|
- [ ] Selected nodes/links
|
|
- [ ] Zoom level
|
|
- [ ] Actions (update config, select item, reset)
|
|
- [ ] Write store tests
|
|
- [ ] Document store usage
|
|
|
|
#### Day 33: React Query Setup
|
|
- [ ] Configure React Query client:
|
|
- [ ] Set default options
|
|
- [ ] Configure caching strategy
|
|
- [ ] Set retry logic
|
|
- [ ] Create query hooks:
|
|
- [ ] `useRdfData(url: string)`
|
|
- [ ] `useOntology(schemaId: string)`
|
|
- [ ] `useInstitutions(filters: FilterOptions)`
|
|
- [ ] Create mutation hooks:
|
|
- [ ] `useUploadRdf()`
|
|
- [ ] `useDeleteRdf()`
|
|
- [ ] `useUpdateRdf()`
|
|
- [ ] Add optimistic updates
|
|
- [ ] Add cache invalidation logic
|
|
- [ ] Write query tests
|
|
|
|
#### Day 34-35: API Client
|
|
- [ ] Copy `/Users/kempersc/apps/example_ld/js/api.js` for reference
|
|
- [ ] Create `src/lib/api/client.ts`:
|
|
- [ ] Axios instance configuration
|
|
- [ ] Request interceptors
|
|
- [ ] Response interceptors
|
|
- [ ] Error handling
|
|
- [ ] Implement API methods:
|
|
- [ ] `fetchRdf(url: string, format: RdfFormat)`
|
|
- [ ] `fetchSparqlResults(query: string, endpoint: string)`
|
|
- [ ] `uploadRdf(file: File)`
|
|
- [ ] `transformRdf(data: string, format: RdfFormat)`
|
|
- [ ] Add retry logic with exponential backoff
|
|
- [ ] Add circuit breaker pattern
|
|
- [ ] Add request cancellation
|
|
- [ ] Write API client tests (mock axios)
|
|
- [ ] Test error scenarios
|
|
|
|
### Week 8: Data Integration
|
|
|
|
#### Day 36-37: RDF Schema Loading
|
|
- [ ] Load schemas from `/schemas/20251121/rdf/`:
|
|
- [ ] `01_custodian_name.owl.ttl`
|
|
- [ ] Other schema files
|
|
- [ ] Parse schema with N3.js
|
|
- [ ] Extract classes and properties
|
|
- [ ] Build class hierarchy
|
|
- [ ] Store in IndexedDB for offline use
|
|
- [ ] Create schema browsing UI
|
|
- [ ] Test with actual schema files
|
|
|
|
#### Day 38: UML Diagram Parsing
|
|
- [ ] Load UML diagrams from `/schemas/20251121/uml/`:
|
|
- [ ] Mermaid files (`.mmd`)
|
|
- [ ] PlantUML files (`.puml`)
|
|
- [ ] Create Mermaid parser:
|
|
- [ ] Parse class diagrams
|
|
- [ ] Parse ER diagrams
|
|
- [ ] Extract nodes and relationships
|
|
- [ ] Create PlantUML parser:
|
|
- [ ] Parse syntax
|
|
- [ ] Extract classes
|
|
- [ ] Extract relationships
|
|
- [ ] Convert to D3-compatible format
|
|
- [ ] Test parsers with actual diagram files
|
|
|
|
#### Day 39-40: Data Pipeline
|
|
- [ ] Create data flow pipeline:
|
|
1. Load RDF schema
|
|
2. Parse with N3.js
|
|
3. Store in IndexedDB
|
|
4. Query with SPARQL (in-memory)
|
|
5. Transform to visualization format
|
|
6. Render with D3
|
|
- [ ] Optimize for performance:
|
|
- [ ] Use Web Workers for parsing
|
|
- [ ] Implement streaming for large files
|
|
- [ ] Add pagination for results
|
|
- [ ] Add progress indicators
|
|
- [ ] Test end-to-end flow
|
|
- [ ] Profile performance bottlenecks
|
|
|
|
---
|
|
|
|
## Phase 5: Testing and Quality (Weeks 9-10)
|
|
|
|
### Week 9: Comprehensive Testing
|
|
|
|
#### Day 41-42: Unit Tests
|
|
- [ ] Achieve 80%+ code coverage for:
|
|
- [ ] `src/lib/rdf/parser.ts`
|
|
- [ ] `src/lib/storage/indexed-db.ts`
|
|
- [ ] `src/lib/api/client.ts`
|
|
- [ ] `src/lib/utils/helpers.ts`
|
|
- [ ] Test all utility functions
|
|
- [ ] Test all custom hooks
|
|
- [ ] Test store actions and selectors
|
|
- [ ] Review coverage report
|
|
- [ ] Add missing tests
|
|
|
|
#### Day 43-44: Component Tests
|
|
- [ ] Test all UI components:
|
|
- [ ] Button, Modal, Tooltip, Input, Select
|
|
- [ ] Test all form components:
|
|
- [ ] RdfUpload, QueryForm, Config forms
|
|
- [ ] Test all page components:
|
|
- [ ] Home, ApiExplorer, DatabaseManager, etc.
|
|
- [ ] Test layout components:
|
|
- [ ] Header, Sidebar, Footer
|
|
- [ ] Use React Testing Library best practices
|
|
- [ ] Test user interactions
|
|
- [ ] Test accessibility
|
|
|
|
#### Day 45: Integration Tests
|
|
- [ ] Test complete user flows:
|
|
- [ ] Upload RDF → Parse → Visualize
|
|
- [ ] Query SPARQL → Display results
|
|
- [ ] Load schema → Browse classes
|
|
- [ ] Filter graph → Export
|
|
- [ ] Test state management integration
|
|
- [ ] Test API integration
|
|
- [ ] Test database persistence
|
|
- [ ] Test error recovery
|
|
|
|
### Week 10: E2E Testing and Performance
|
|
|
|
#### Day 46-47: Playwright E2E Tests
|
|
- [ ] Set up Playwright test environment
|
|
- [ ] Write E2E tests for:
|
|
- [ ] User onboarding flow
|
|
- [ ] RDF upload and visualization
|
|
- [ ] Graph interaction
|
|
- [ ] SPARQL queries
|
|
- [ ] Export functionality
|
|
- [ ] Test cross-browser (Chromium, Firefox, WebKit)
|
|
- [ ] Test responsive layouts (mobile, tablet, desktop)
|
|
- [ ] Add visual regression tests
|
|
- [ ] Generate test reports
|
|
|
|
#### Day 48: Performance Optimization
|
|
- [ ] Run Lighthouse audits
|
|
- [ ] Optimize bundle size:
|
|
- [ ] Code splitting
|
|
- [ ] Tree shaking
|
|
- [ ] Dynamic imports
|
|
- [ ] Analyze with `vite-bundle-visualizer`
|
|
- [ ] Optimize rendering:
|
|
- [ ] Memoization (useMemo, useCallback)
|
|
- [ ] Virtualization for large lists
|
|
- [ ] Debounce expensive operations
|
|
- [ ] Optimize network requests:
|
|
- [ ] Caching strategies
|
|
- [ ] Request deduplication
|
|
- [ ] Compression
|
|
- [ ] Profile with React DevTools Profiler
|
|
- [ ] Measure Core Web Vitals
|
|
|
|
#### Day 49-50: Accessibility Audit
|
|
- [ ] Run axe DevTools
|
|
- [ ] Fix all critical accessibility issues
|
|
- [ ] Ensure WCAG 2.1 AA compliance:
|
|
- [ ] Keyboard navigation
|
|
- [ ] Screen reader support
|
|
- [ ] Color contrast
|
|
- [ ] Focus indicators
|
|
- [ ] ARIA labels
|
|
- [ ] Test with screen readers (NVDA, JAWS, VoiceOver)
|
|
- [ ] Create accessibility documentation
|
|
|
|
---
|
|
|
|
## Phase 6: Backend Services (Weeks 11-12)
|
|
|
|
### Week 11: Python Service Migration
|
|
|
|
#### Day 51-53: RDF Transformer Service
|
|
- [ ] Copy `/Users/kempersc/apps/example_ld/extract_and_transform.py` for reference
|
|
- [ ] Create `backend/services/rdf-transformer/`:
|
|
- [ ] FastAPI or Flask application
|
|
- [ ] Dockerfile
|
|
- [ ] Requirements.txt
|
|
- [ ] Implement API endpoints:
|
|
- [ ] `POST /transform` - Transform RDF formats
|
|
- [ ] `POST /validate` - Validate RDF syntax
|
|
- [ ] `POST /merge` - Merge multiple RDF files
|
|
- [ ] Add request validation with Pydantic
|
|
- [ ] Add error handling
|
|
- [ ] Add logging
|
|
- [ ] Write Python tests (pytest)
|
|
- [ ] Create API documentation (OpenAPI/Swagger)
|
|
|
|
#### Day 54-55: OAI-PMH Harvester Service
|
|
- [ ] Create `backend/services/harvester/`:
|
|
- [ ] FastAPI application
|
|
- [ ] Celery for async tasks
|
|
- [ ] Redis for task queue
|
|
- [ ] Implement harvesting logic:
|
|
- [ ] OAI-PMH protocol support
|
|
- [ ] Incremental harvesting
|
|
- [ ] Error recovery
|
|
- [ ] Rate limiting
|
|
- [ ] Implement API endpoints:
|
|
- [ ] `POST /harvest` - Start harvest job
|
|
- [ ] `GET /harvest/:id` - Get job status
|
|
- [ ] `GET /harvests` - List all harvests
|
|
- [ ] Add scheduling (APScheduler or Celery beat)
|
|
- [ ] Write tests
|
|
- [ ] Document API
|
|
|
|
### Week 12: Backend Integration
|
|
|
|
#### Day 56-57: MARC Converter Service
|
|
- [ ] Create `backend/services/marc-converter/`:
|
|
- [ ] FastAPI application
|
|
- [ ] MARC21 parsing library
|
|
- [ ] Implement conversion logic:
|
|
- [ ] MARC21 to RDF
|
|
- [ ] MARCXML to RDF
|
|
- [ ] Validate MARC records
|
|
- [ ] Implement API endpoints:
|
|
- [ ] `POST /convert` - Convert MARC to RDF
|
|
- [ ] `POST /validate` - Validate MARC
|
|
- [ ] Write tests
|
|
- [ ] Document API
|
|
|
|
#### Day 58-59: Backend Deployment
|
|
- [ ] Create Docker Compose configuration:
|
|
- [ ] RDF transformer service
|
|
- [ ] Harvester service
|
|
- [ ] MARC converter service
|
|
- [ ] Redis
|
|
- [ ] PostgreSQL (if needed)
|
|
- [ ] Set up service communication
|
|
- [ ] Configure environment variables
|
|
- [ ] Add health check endpoints
|
|
- [ ] Test local deployment
|
|
- [ ] Document deployment process
|
|
|
|
#### Day 60: Frontend-Backend Integration
|
|
- [ ] Update frontend API client to call backend services
|
|
- [ ] Test RDF transformation flow
|
|
- [ ] Test harvesting flow
|
|
- [ ] Test MARC conversion flow
|
|
- [ ] Add error handling for backend errors
|
|
- [ ] Add loading states
|
|
- [ ] Test with production-like data
|
|
|
|
---
|
|
|
|
## Phase 7: Polish and Documentation (Weeks 13-14)
|
|
|
|
### Week 13: UI/UX Polish
|
|
|
|
#### Day 61-62: Design Refinement
|
|
- [ ] Review all pages for consistency
|
|
- [ ] Standardize spacing and typography
|
|
- [ ] Refine color scheme
|
|
- [ ] Add transitions and animations
|
|
- [ ] Improve loading states
|
|
- [ ] Improve error messages
|
|
- [ ] Add empty states
|
|
- [ ] Polish mobile experience
|
|
|
|
#### Day 63: User Onboarding
|
|
- [ ] Create welcome tour (react-joyride or similar)
|
|
- [ ] Add tooltips for complex features
|
|
- [ ] Create quick start guide
|
|
- [ ] Add example datasets
|
|
- [ ] Add sample queries
|
|
- [ ] Create video tutorial (optional)
|
|
|
|
#### Day 64-65: Internationalization (Optional)
|
|
- [ ] Set up i18n (react-i18next)
|
|
- [ ] Extract all text to translation files
|
|
- [ ] Add language selector
|
|
- [ ] Support at least English and Dutch
|
|
- [ ] Test with different languages
|
|
- [ ] Document translation process
|
|
|
|
### Week 14: Documentation
|
|
|
|
#### Day 66-67: User Documentation
|
|
- [ ] Create user guide:
|
|
- [ ] Getting started
|
|
- [ ] Uploading RDF data
|
|
- [ ] Visualizing data
|
|
- [ ] Running SPARQL queries
|
|
- [ ] Exporting results
|
|
- [ ] Troubleshooting
|
|
- [ ] Create FAQ
|
|
- [ ] Add inline help text
|
|
- [ ] Create video tutorials (optional)
|
|
|
|
#### Day 68-69: Developer Documentation
|
|
- [ ] Document codebase architecture
|
|
- [ ] Document component API
|
|
- [ ] Document state management
|
|
- [ ] Create contribution guide
|
|
- [ ] Document build and deployment
|
|
- [ ] Create API reference
|
|
- [ ] Add code examples
|
|
|
|
#### Day 70: Release Preparation
|
|
- [ ] Create CHANGELOG.md
|
|
- [ ] Update README.md
|
|
- [ ] Create LICENSE file
|
|
- [ ] Set up GitHub releases
|
|
- [ ] Create release notes
|
|
- [ ] Tag version 1.0.0
|
|
|
|
---
|
|
|
|
## Phase 8: Deployment and Monitoring (Weeks 15-16)
|
|
|
|
### Week 15: Deployment
|
|
|
|
#### Day 71-72: Production Build
|
|
- [ ] Optimize Vite build configuration
|
|
- [ ] Set up environment variables for production
|
|
- [ ] Build frontend bundle
|
|
- [ ] Build backend Docker images
|
|
- [ ] Test production build locally
|
|
- [ ] Fix any production-only issues
|
|
|
|
#### Day 73-74: Hosting Setup
|
|
- [ ] Choose hosting platform:
|
|
- [ ] Vercel/Netlify (frontend)
|
|
- [ ] AWS/GCP/Azure (backend)
|
|
- [ ] Or self-hosted
|
|
- [ ] Set up frontend deployment:
|
|
- [ ] Configure build settings
|
|
- [ ] Set up custom domain
|
|
- [ ] Configure HTTPS
|
|
- [ ] Set up CDN
|
|
- [ ] Set up backend deployment:
|
|
- [ ] Deploy Docker containers
|
|
- [ ] Configure load balancer
|
|
- [ ] Set up database
|
|
- [ ] Configure Redis
|
|
- [ ] Test deployed application
|
|
- [ ] Set up staging environment
|
|
|
|
#### Day 75: CI/CD Pipeline
|
|
- [ ] Set up GitHub Actions (or GitLab CI):
|
|
- [ ] Run tests on push
|
|
- [ ] Run linting
|
|
- [ ] Build on merge to main
|
|
- [ ] Deploy to staging automatically
|
|
- [ ] Deploy to production on tag
|
|
- [ ] Set up deployment notifications
|
|
- [ ] Document CI/CD process
|
|
|
|
### Week 16: Monitoring and Maintenance
|
|
|
|
#### Day 76-77: Monitoring Setup
|
|
- [ ] Set up error tracking (Sentry, Rollbar)
|
|
- [ ] Set up analytics (Google Analytics, Plausible)
|
|
- [ ] Set up performance monitoring (Lighthouse CI)
|
|
- [ ] Set up uptime monitoring (UptimeRobot, Pingdom)
|
|
- [ ] Set up log aggregation (if needed)
|
|
- [ ] Create monitoring dashboard
|
|
|
|
#### Day 78: Security Audit
|
|
- [ ] Run npm audit and fix vulnerabilities
|
|
- [ ] Review Content Security Policy
|
|
- [ ] Review CORS configuration
|
|
- [ ] Test for XSS vulnerabilities
|
|
- [ ] Test for CSRF vulnerabilities
|
|
- [ ] Review authentication (if implemented)
|
|
- [ ] Test rate limiting
|
|
- [ ] Document security practices
|
|
|
|
#### Day 79: Load Testing
|
|
- [ ] Set up load testing tool (k6, Artillery)
|
|
- [ ] Test API endpoints under load
|
|
- [ ] Test database performance
|
|
- [ ] Test frontend performance with large datasets
|
|
- [ ] Identify bottlenecks
|
|
- [ ] Optimize as needed
|
|
- [ ] Document performance characteristics
|
|
|
|
#### Day 80: Launch and Handoff
|
|
- [ ] Final QA testing
|
|
- [ ] Deploy to production
|
|
- [ ] Announce launch
|
|
- [ ] Monitor for issues
|
|
- [ ] Create maintenance plan
|
|
- [ ] Create bug report process
|
|
- [ ] Schedule regular updates
|
|
- [ ] Celebrate! 🎉
|
|
|
|
---
|
|
|
|
## Post-Launch Checklist
|
|
|
|
### Week 17+: Maintenance and Enhancement
|
|
|
|
#### Ongoing Tasks
|
|
- [ ] Monitor error rates and fix bugs
|
|
- [ ] Review user feedback
|
|
- [ ] Update dependencies regularly
|
|
- [ ] Review and merge pull requests
|
|
- [ ] Improve documentation based on user questions
|
|
- [ ] Plan feature enhancements
|
|
|
|
#### Monthly Tasks
|
|
- [ ] Review analytics data
|
|
- [ ] Run security audit
|
|
- [ ] Update dependencies
|
|
- [ ] Review performance metrics
|
|
- [ ] Backup database
|
|
- [ ] Review and update documentation
|
|
|
|
#### Quarterly Tasks
|
|
- [ ] Major feature releases
|
|
- [ ] Comprehensive testing
|
|
- [ ] User survey
|
|
- [ ] Performance optimization sprint
|
|
- [ ] Security review
|
|
|
|
---
|
|
|
|
## Success Metrics
|
|
|
|
### Technical Metrics
|
|
- [ ] Test coverage > 80%
|
|
- [ ] Bundle size < 500KB (gzipped)
|
|
- [ ] Lighthouse score > 90
|
|
- [ ] Page load time < 2 seconds
|
|
- [ ] API response time < 200ms (p95)
|
|
- [ ] Zero critical vulnerabilities
|
|
|
|
### User Metrics
|
|
- [ ] User satisfaction score > 4/5
|
|
- [ ] Task completion rate > 90%
|
|
- [ ] Error rate < 1%
|
|
- [ ] Daily active users growth
|
|
- [ ] Feature adoption rate
|
|
|
|
---
|
|
|
|
## Risk Mitigation
|
|
|
|
### Technical Risks
|
|
| Risk | Mitigation |
|
|
|------|------------|
|
|
| D3 v5 → v7 breaking changes | Thorough testing, gradual migration |
|
|
| Large RDF file performance | Web Workers, streaming, pagination |
|
|
| Browser compatibility | Cross-browser testing, polyfills |
|
|
| State management complexity | Clear documentation, simple patterns |
|
|
|
|
### Project Risks
|
|
| Risk | Mitigation |
|
|
|------|------------|
|
|
| Scope creep | Clear requirements, phased approach |
|
|
| Timeline delays | Buffer time, prioritization |
|
|
| Technical debt | Code reviews, refactoring sprints |
|
|
| Knowledge silos | Documentation, pair programming |
|
|
|
|
---
|
|
|
|
## Resources
|
|
|
|
### Documentation
|
|
- [ ] [React Documentation](https://react.dev/)
|
|
- [ ] [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
|
- [ ] [D3.js Documentation](https://d3js.org/)
|
|
- [ ] [N3.js Documentation](https://github.com/rdfjs/N3.js)
|
|
- [ ] [Zustand Documentation](https://docs.pmnd.rs/zustand/)
|
|
- [ ] [React Query Documentation](https://tanstack.com/query/)
|
|
- [ ] [Vite Documentation](https://vitejs.dev/)
|
|
- [ ] [Vitest Documentation](https://vitest.dev/)
|
|
- [ ] [Playwright Documentation](https://playwright.dev/)
|
|
|
|
### Reference Projects
|
|
- [ ] `/Users/kempersc/apps/example_ld` - Original implementation
|
|
- [ ] RDF visualization examples
|
|
- [ ] D3.js example gallery
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- This checklist is living document - update as needed
|
|
- Mark items complete as you finish them
|
|
- Add notes for complex items
|
|
- Link to relevant pull requests or commits
|
|
- Update timeline if needed
|
|
- Celebrate milestones!
|
|
|
|
---
|
|
|
|
**Last Updated**: 2025-11-22
|
|
**Version**: 1.0
|
|
**Status**: Ready to begin implementation
|