Skip to content

LLM Conversations Viewer - Specifications

This directory contains detailed technical specifications for the major features of the LLM Conversations Viewer application.

Purpose

These specifications document the current behavior and requirements of the application's core features. They serve as:

  • Documentation: Understanding how the system works
  • Development Guide: Reference for implementing new features or modifying existing ones
  • Testing Guide: Basis for writing comprehensive tests
  • Design Reference: Source of truth for architectural decisions

Specification Files

Core Features

  1. conversation-parsing-spec.md
  2. Parsing and normalizing conversation exports from OpenAI, Claude, and Z.ai
  3. Format detection and validation
  4. Normalized data structure

  5. file-import-spec.md

  6. File upload via drag and drop
  7. File input selection
  8. URL-based imports
  9. ZIP file handling
  10. User feedback and error handling

  11. storage-spec.md

  12. IndexedDB implementation for large-scale storage
  13. Data persistence and retrieval
  14. Migration from localStorage
  15. Database schema and operations

  16. sidebar-ui-spec.md

  17. Conversation list display
  18. Search and filtering
  19. Selection management
  20. Format badges and date formatting

  21. chat-view-spec.md

  22. Message rendering and display
  23. Markdown rendering with code highlighting
  24. Search term highlighting
  25. Continue conversation functionality

  26. export-spec.md

  27. Export format and structure
  28. Filename generation
  29. Single and bulk export operations
  30. Re-import compatibility

  31. state-management-spec.md

  32. Application state structure
  33. Event system
  34. Conversation lifecycle management
  35. Persistence control

  36. markdown-rendering-spec.md

  37. Markdown parsing with marked.js
  38. Code syntax highlighting with highlight.js
  39. Error handling and fallbacks
  40. Security considerations

  41. platform-integration-spec.md

  42. URL generation for continuing conversations
  43. Platform-specific URL patterns
  44. Continue conversation button behavior

Requirements Language

Specifications use the standard RFC 2119 keywords to indicate requirement levels:

  • MUST: Absolute requirement
  • MUST NOT: Absolute prohibition
  • SHOULD: Recommended requirement
  • SHOULD NOT: Recommended prohibition
  • MAY: Optional feature

Using These Specifications

For Developers

  • Read the relevant specification before implementing changes
  • Ensure your implementation meets all MUST requirements
  • Consider SHOULD recommendations for best practices
  • Update specifications when adding new features or changing behavior

For Code Reviewers

  • Reference specifications when reviewing changes
  • Verify that implementations match documented requirements
  • Check that error handling meets specification standards
  • Ensure security requirements are met

For Testers

  • Create test cases based on MUST requirements
  • Test edge cases and error conditions
  • Verify that all formats are handled correctly
  • Check cross-browser compatibility where specified

Specification Structure

Each specification follows a consistent structure:

  1. Overview: High-level description of the feature
  2. Requirements: Detailed requirements using MUST/SHOULD/MAY
  3. API/Interface: Function signatures and data structures where applicable
  4. Error Handling: How errors should be handled
  5. Security: Security considerations
  6. Performance: Performance requirements

Keeping Specifications Updated

Specifications should be updated when:

  • New features are added
  • Existing behavior changes
  • New platforms are supported
  • Security requirements evolve
  • Performance characteristics change

Architecture Overview

The application follows a modular architecture:

App (State Management)
├── FileHandler (File Import)
│   └── Parsers (Conversation Parsing)
├── Storage (IndexedDB)
├── Sidebar (Conversation List UI)
│   └── Markdown (Markdown Rendering)
└── ChatView (Message Display UI)
    ├── Markdown (Markdown Rendering)
    └── Platform URLs (Continue Conversation)

Data flows through the system as follows:

  1. Import: FileHandler → Parsers → AppState
  2. Storage: AppState ↔ Storage (IndexedDB)
  3. Display: AppState → Sidebar/ChatView
  4. Export: AppState → Export Module → File Download
  • Main README - User-facing documentation
  • docs/ - Additional project documentation