Skip to content

Design CHUCC-server frontend architecture and UI#7

Merged
arne-bdt merged 17 commits into
mainfrom
claude/chucc-frontend-concept-011CUz9umHKfMkBUeeaqpPRD
Nov 13, 2025
Merged

Design CHUCC-server frontend architecture and UI#7
arne-bdt merged 17 commits into
mainfrom
claude/chucc-frontend-concept-011CUz9umHKfMkBUeeaqpPRD

Conversation

@arne-bdt

Copy link
Copy Markdown
Owner

No description provided.

Created detailed prompt for AI-driven research to design CHUCC frontend:
- Context: CHUCC-server API, CHUCC-SQUI components, UX inspiration
- Research tasks: Fuseki UI analysis, Fork UX analysis, component gaps
- Design specs: 7 primary views with mockups, component architecture
- Deliverables: Research reports, mockups, implementation roadmap

Combines Fuseki's SPARQL usability with Fork's version control elegance.
Built on Svelte 5 + Carbon Design System + CHUCC-SQUI library.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Research Documents Created:
- fuseki-ui-analysis.md (3,500 words): Tab-based SPARQL interface analysis
- fork-ux-analysis.md (5,000 words): Elegant version control UX patterns

Fuseki Key Findings:
- Simple tab navigation (Query, Upload, Edit, Info)
- YASQE/YASR components for query editing and results
- Split-pane layout (editor + results)
- Dataset selector dropdown
- Prefix management modal
- Multi-tab queries with persistence

Fork Key Findings:
- Three-pane layout (sidebar | commit graph | details)
- Colored branch graph with collapsible merges
- Drag-and-drop for merge/rebase/cherry-pick
- Quick Launch command palette (Ctrl+P)
- Side-by-side diff viewer
- Three-column merge conflict resolver
- Interactive rebase with visual drag-to-reorder

Adaptations for CHUCC:
- Replace file tree → graph list
- Replace text diff → RDF Patch viewer
- Replace file conflicts → triple/quad conflicts
- Add dataset selector (multi-tenant)
- Add time-travel controls (asOf selector)
- Add batch operation builder

Next: Component gap analysis (Task 3)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Created comprehensive 6,000-word analysis of available and missing components:

Component Inventory:
- Carbon Design System: 165+ components (comprehensive standard UI)
- CHUCC-SQUI: 8 components (SPARQL query + results + tabs)
- Missing: 15+ specialized components for version control and RDF visualization

Component Placement Decisions:
CHUCC-SQUI (7 reusable RDF components):
- RDF Patch Viewer (syntax highlighting)
- RDF Diff Viewer (side-by-side)
- Graph Explorer (triple table/tree)
- Commit SHA Badge, Author Input
- 3-Pane Diff View (generic part)
- RDF Patch Language Mode (CodeMirror)

Frontend Project (11 CHUCC-specific components):
- Commit Graph Visualizer (DAG with D3/Cytoscape)
- Branch Selector, Commit Detail View
- History Filter, Time Travel Controls
- Conflict Summary & Resolution Logic
- Merge Configuration Modal
- Dataset Creation Wizard, Health Dashboard, Switcher
- Batch Operation Builder & Preview
- Quick Launch Palette

Technology Recommendations:
- Graph visualization: Cytoscape.js or D3.js
- Syntax highlighting: CodeMirror 6 (already in CHUCC-SQUI)
- State management: Svelte stores
- Testing: Vitest + Playwright

Implementation Roadmap (8 Phases):
Phase 1: Core SPARQL (✅ complete via CHUCC-SQUI)
Phase 2: Basic version control (commit graph, branch selector, RDF Patch viewer)
Phase 3: Advanced version control (merge, time travel, diff viewer)
Phase 4: Conflict resolution (3-pane resolver, conflict summary)
Phase 5: Dataset management (wizard, health dashboard)
Phase 6: Batch operations (builder, preview)
Phase 7: Enhanced browsing (graph explorer, history filter, Quick Launch)
Phase 8: Polish (badges, utilities)

Next: Frontend concept with mockups (Task 4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Information Architecture (7,500 words):
- Navigation hierarchy (tab-based + contextual sidebars)
- Routing structure with URL patterns
- Site map for 7 primary views
- Content organization (header, footer, main layouts)
- Responsive breakpoints (mobile, tablet, desktop)
- Keyboard shortcuts and accessibility
- Progressive disclosure patterns

Query Workbench Mockup (5,500 words):
- ASCII wireframes (desktop, tablet, mobile)
- Detailed component specifications
- Query editor (CodeMirror, multi-tab, autocomplete)
- Results table (virtual scrolling, sortable)
- Prefix manager modal
- Query history sidebar
- Interaction patterns (execute, save, time-travel)
- State management (local + global stores)
- Accessibility (WCAG 2.1 AA)
- Error/empty states

Technologies:
- Svelte 5 + Carbon Design System
- CodeMirror 6 for SPARQL editing
- Virtual scrolling for 10k+ rows
- localStorage for session persistence

Next: Remaining 6 view mockups

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Task 4 Deliverables (30,000+ words total):

## 02-concept Documents:

### 1. Information Architecture (7,500 words)
- Navigation hierarchy (tab-based + contextual)
- Routing structure (7 views + query parameters)
- Site map with secondary/tertiary navigation
- 4 layout patterns (single-pane, sidebar, sidebar+bottom, 3-pane)
- Responsive breakpoints (5 levels: sm to max)
- Keyboard shortcuts (20+ global + view-specific)
- Progressive disclosure patterns
- Accessibility guidelines (WCAG 2.1 AA)

### 2. UI Mockups (8,500 words)
- Query Workbench (5,500 words): Multi-tab editor, results table, prefix manager, history
- Version Control (3,000 words): Fork-inspired DAG, branch sidebar, commit details, modals
- README + mockups directory structure

ASCII wireframes with:
- Component breakdowns
- Interaction patterns
- State management specifications
- Responsive behavior (mobile, tablet, desktop)
- Accessibility notes
- Error/empty states
- Performance optimizations

### 3. Executive Summary (6,500 words)
- Research findings synthesis
- Information architecture overview
- Component architecture (tree + state management)
- 4 detailed interaction flows:
  1. Execute SPARQL query with time-travel
  2. Create branch and commit changes
  3. Merge branches with conflict resolution
  4. Cherry-pick commit
- Visual design system (colors, typography, icons, spacing)
- Responsive design strategy
- Accessibility compliance (WCAG 2.1 AA)
- Implementation roadmap (8 phases, 30 weeks)
- Success criteria and performance targets
- Risks and mitigations

## Key Design Decisions:

### From Research:
✅ Tab-based primary navigation (Fuseki pattern)
✅ Three-pane layout for version control (Fork pattern)
✅ Colored branch graph with collapsible merges (Fork)
✅ Drag-and-drop operations (Fork)
✅ RDF-aware diff visualization (CHUCC-specific)
✅ Graph-level conflict resolution (CHUCC-specific)

### Technology Stack:
- Framework: Svelte 5
- Design System: Carbon (IBM)
- Component Library: CHUCC-SQUI
- Graph Visualization: D3.js or Cytoscape.js
- Code Editor: CodeMirror 6
- State Management: Svelte stores
- Testing: Vitest + Playwright

### Component Distribution:
- Carbon: 165+ standard UI components (available)
- CHUCC-SQUI: 8 existing + 7 new (RDF/SPARQL reusable)
- Frontend: 11 new (CHUCC-specific business logic)

### Implementation Phases:
Phase 1: Core SPARQL ✅ (complete via CHUCC-SQUI)
Phase 2: Basic version control (8 weeks)
Phase 3: Advanced version control (6 weeks)
Phase 4: Conflict resolution (4 weeks)
Phase 5: Dataset management (3 weeks)
Phase 6: Batch operations (3 weeks)
Phase 7: Enhanced browsing (4 weeks)
Phase 8: Polish (2 weeks)

Total: ~30 weeks (7.5 months)

## Next Steps:
1. Stakeholder review and feedback
2. Create interactive prototypes (Figma)
3. Set up development environment
4. Begin Phase 2 implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Created navigation guide for all deliverables (30,000+ words):

Structure:
- 01-research/ (14,500 words)
  - Fuseki UI analysis
  - Fork UX analysis
  - Component gap analysis

- 02-concept/ (15,500 words)
  - Executive summary
  - Information architecture
  - UI mockups (Query Workbench, Version Control)

- 03-recommendations/ (future)
  - Component placement
  - Implementation roadmap

Quick Navigation:
- For Product Managers → Executive summary, roadmap
- For Designers → UI mockups, visual design system
- For Developers → Component architecture, interaction flows
- For UX Researchers → Fuseki/Fork analysis, accessibility

Success Criteria:
✅ All CHUCC endpoints accessible
✅ Fuseki-level SPARQL usability
✅ Fork-level version control elegance
✅ WCAG 2.1 AA compliant
✅ 10k+ rows virtual scrolling
✅ Multi-dataset support

Timeline: 8 phases, 30 weeks (7.5 months)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive UI mockups (40,000+ words):
- Graph Explorer (5,000 words): GSP operations, triple table, tree/raw views
- Merge & Conflicts (8,000 words): Fork-inspired 3-way diff, conflict resolution
- Time Travel (6,500 words): Historical queries, timeline animation, comparisons
- Dataset Manager (7,000 words): Multi-tenant management, creation wizard, health monitoring
- Batch Operations (7,500 words): Operation builder, templates, RDF Patch generation

Updated Query Workbench with unified context selector per user feedback.

All mockups include:
- ASCII wireframes for desktop layout
- Detailed component specifications (Carbon Design System)
- Complete interaction flows
- State management patterns
- Responsive behavior (mobile/tablet/desktop)
- Accessibility guidelines (WCAG 2.1 AA)
- Performance targets
- Testing considerations

Total frontend concept documentation: 70,000+ words across 12 files.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Created comprehensive component specification (10,000+ words) for implementing unified context selector in CHUCC-SQUI component library.

Specification includes:

TypeScript Interfaces:
- QueryContext (union type: BranchContext | CommitContext | AsOfContext)
- Branch, Commit metadata types
- ValidationResult, ValidationError
- Complete type safety for protocol implementation

Component API:
- QueryContextSelector (main modal component)
- QueryContextIndicator (compact read-only display)
- QueryContextBreadcrumb (breadcrumb integration)
- Props, events, slots fully specified

Helper Utilities:
- buildQueryUrl(): Construct SPARQL query URLs with context params
- formatContext(): Format context as human-readable string
- validateContext(): Validate context objects (UUIDv7, ISO 8601)
- parseContextFromUrl(): Parse context from URL query parameters

Implementation Guide:
- File structure for CHUCC-SQUI integration
- Complete Svelte 5 component skeleton
- Unit test examples (Vitest)
- Component test examples (Playwright)
- Accessibility checklist (WCAG 2.1 AA)

Design Principles:
- Stateless (callback-driven)
- Protocol-agnostic (works with any VC extension backend)
- Carbon Design System integration
- Full TypeScript support
- 80%+ test coverage target

Ready for implementation in CHUCC-SQUI repository.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Created implementation roadmap and first task for QueryContextSelector component in CHUCC-SQUI.

Files added:
- 00-roadmap.md (3,500 words): Complete 4-week implementation roadmap
  - 5 phases: Foundation, Utilities, Components, Testing, Publishing
  - Task progress tracking matrix
  - Success criteria and risk mitigation
  - Future enhancements (v1.1, v1.2, v2.0)

- 01-setup.md (1,500 words): Phase 1 - Project setup task
  - Directory structure specification
  - Package.json exports configuration
  - TypeScript/Vitest/Storybook configuration
  - Initial file creation checklist

Remaining tasks to be created (in progress):
- 02-types.md: TypeScript interfaces
- 03-utils.md: Helper utilities
- 04-main-component.md: QueryContextSelector
- 05-indicator.md: QueryContextIndicator
- 06-breadcrumb.md: QueryContextBreadcrumb
- 07-tests.md: Testing strategy
- 08-docs.md: Documentation
- 09-publish.md: Package publishing

Note: User suggested expanding scope to include more protocol-level components (CommitGraph, SPARQLEditor, GraphList, etc.) in CHUCC-SQUI. Will create expanded planning docs after completing QueryContextSelector task files.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added 8 detailed task files for CHUCC-SQUI component implementation (17,100 words total).

Tasks cover:
- 02-types: TypeScript interfaces and type guards
- 03-utils: Helper functions (buildQueryUrl, formatContext, validateContext, parseContextFromUrl)
- 04-main-component: QueryContextSelector modal
- 05-indicator: QueryContextIndicator display
- 06-breadcrumb: QueryContextBreadcrumb navigation
- 07-tests: Comprehensive testing (80%+ coverage target)
- 08-docs: API docs, examples, Storybook
- 09-publish: npm publishing checklist

Ready for implementation in CHUCC-SQUI repository.
Created 3 strategic planning documents for full SPARQL/RDF UI toolkit:

10-expanded-components.md (3,800 words):
- Complete catalog of 20+ protocol-level components
- Organized by protocol: SPARQL, Graph Store, Version Control, RDF viz
- Package structure (sparql/, graph-store/, version-control/, rdf/)
- 6-phase implementation timeline (24 weeks total)

11-component-priority-matrix.md (3,200 words):
- Priority scoring: Impact × Need × Complexity
- P0: QueryContextSelector (in progress)
- P1: 7 essential components (SPARQLEditor, ResultsTable, GraphList, etc.)
- P2: 10 enhanced components
- P3: 3 polish/extras
- Recommended approach: Critical Path First (unblocks frontend early)

12-frontend-integration.md (4,500 words):
- Architecture: Frontend as thin composition layer
- Integration patterns (stateless callbacks, controlled components)
- State management strategy (global stores vs. component state)
- Complete QueryWorkbench example (87% code reduction vs. without SQUI)
- Testing strategy (component, integration, E2E)
- Performance considerations (lazy loading, code splitting)

Total: 11,500 words of strategic planning.

Key architectural decision: CHUCC-SQUI provides protocol-level components, CHUCC Frontend composes them with routing, state, and API integration.

Benefits:
- 70%+ frontend code reduction
- Reusable across any SPARQL/VC extension project
- Guaranteed protocol compliance
- Independent testing and versioning

Ready to begin Phase 2 component development after QueryContextSelector completes.
Created navigation guide and summary (4,200 words) for all 12 task files.

Sections:
- Quick Navigation (implementers vs architects)
- What's Included (Phase 1: QueryContextSelector, Phase 2+: 20+ components)
- Architecture Overview (protocol components vs thin frontend)
- Getting Started (3 options: implement first, plan next, prototype)
- Success Metrics (per component, per phase, overall)
- Technical Stack (dependencies, dev tools)
- Quality Gates (8 criteria all components must pass)
- File Organization (current + future structure)
- FAQ (5 common questions answered)
- Next Steps (immediate, short-term, medium-term, long-term)

Complete implementation plan ready:
- 13 files total
- 32,800+ words
- Covers 4-week implementation for QueryContextSelector
- Strategic roadmap for 20+ additional components over 24 weeks

Ready for implementation in CHUCC-SQUI repository.
Applied consistency updates from 13-consistency-review.md:

High Priority Updates:
- Updated AsOfContext interface docs to clarify server-side commit resolution
- Added "Understanding Time Travel" section to time-travel mockup
- Added server resolution note to query execution workflow
- Updated information architecture with commit resolution notes
- Added architecture note to executive summary explaining time-travel = commit history
- Updated AsOfContext comments in SQUI types with UI considerations

Medium Priority Updates:
- Added visualization modes (Graph/Timeline/Calendar) to version control mockup
- Added Pattern 4 (AsOf Resolution) to frontend integration guide

Key Insight: Time-travel queries always resolve to commits server-side.
There is no data "between" commits - each commit is an immutable snapshot.
The asOf timestamp is UI convenience that finds the commit at or before
the specified time.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Created comprehensive migration impact assessment and updated
integration guide to reflect CHUCC-SQUI's v2.x store architecture.

New Files:
- 14-store-migration-impact.md: Complete analysis of store migration
  - Old pattern: Global singleton stores
  - New pattern: Context-based store instances
  - Compatibility matrix, testing implications, action items
  - Phase-based migration path (3 phases, backward compatible)

Updated Files:
- 12-frontend-integration.md: Added store migration guidance
  - Split State Management into Approach 1 (legacy) vs Approach 2 (context)
  - Added factory function examples with context provider
  - Added "Using Stores in Components" comparison section
  - Added store migration strategy (Option A vs Option B)
  - Updated document version to 1.1

Key Findings:
1. Migration is backward compatible (fallback mechanism in CHUCC-SQUI)
2. Frontend can use global stores initially (Option A - 0 days)
3. Context pattern optional for better isolation (Option B - 1-2 days)
4. Recommended: Start with Option A, migrate to Option B when needed

Impact: LOW - No breaking changes, frontend works immediately
Action: Documentation updated, ready for UI implementation

Related CHUCC-SQUI commit: 53689c8c4b1db43b25032b383cc0037324b6bfae

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Clarified that CHUCC-SQUI store migration doesn't affect QueryContextSelector
and removed all backward compatibility concerns since nothing is released yet.

Key Changes:
1. Created 15-revised-impact-analysis.md
   - Store migration is PLANNED (Task 70), not yet implemented
   - QueryContextSelector does NOT use stores (stateless, callback-driven)
   - All QueryContextSelector tasks (01-09) are UNAFFECTED
   - No backward compatibility needed (nothing released)
   - Frontend can use context-based pattern from day 1

2. Updated 12-frontend-integration.md (v1.2)
   - Removed "Approach 1 (Legacy)" vs "Approach 2 (Recommended)" split
   - Simplified to SINGLE pattern: context-based stores only
   - Removed fallback mechanism discussions
   - Removed migration timeline sections
   - Added error-throwing getAppStores() (no fallback)
   - Added AppStores TypeScript interface
   - Renamed setAppStores() → provideAppStores() for clarity

3. Updated 00-roadmap.md
   - Added note that store migration doesn't affect this component

Rationale:
- Nothing released yet = no need for backward compatibility
- QueryContextSelector is stateless = unaffected by store architecture
- Simpler docs = easier to understand and implement
- Modern patterns from day 1 = no technical debt

See 15-revised-impact-analysis.md for comprehensive analysis.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@arne-bdt
arne-bdt merged commit b46cddd into main Nov 13, 2025
1 check failed
@arne-bdt
arne-bdt deleted the claude/chucc-frontend-concept-011CUz9umHKfMkBUeeaqpPRD branch November 13, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants