Skip to content

KHET-1/md-reader-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

527 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MD Reader Pro

๐Ÿš€ Enterprise-Grade Markdown Editor with Advanced Performance Testing

A modern, fully-featured markdown editor built with cutting-edge web technologies, featuring real-time markdown parsing, professional UI, comprehensive performance monitoring, and enterprise-level testing infrastructure.

โœจ Features

Core Functionality

  • ๐Ÿ“ Real-time Markdown Preview - Live rendering using the marked library
  • ๐ŸŽจ Professional Split-Pane UI - Dark theme with responsive design
  • ๐Ÿ“ Advanced File Operations - Drag & drop support, file upload, and save functionality
  • โŒจ๏ธ Smart Keyboard Shortcuts - Tab for indentation, Ctrl+S/Cmd+S for save
  • ๐Ÿ–ฑ๏ธ Intuitive Interface - Responsive design with accessibility features
  • ๐ŸŽฏ Interactive Help System - Built-in markdown reference and examples

Performance & Testing Infrastructure

  • ๐Ÿงช 94.7% Test Coverage - Enterprise-level Jest test suite with E2E validation (All tests passing)
  • โšก Performance Monitoring - Comprehensive benchmarking and regression detection
  • ๐Ÿ“Š Real-time Metrics - Rendering, memory, and interaction performance tracking
  • ๐Ÿ”„ CI/CD Integration - GitHub Actions for automated testing and monitoring
  • ๐Ÿ›ก๏ธ Error Handling - Robust error recovery and edge case management
  • ๐Ÿ“ˆ Benchmark Standards - P95/P99 percentile performance validation

Plugin System

  • ๐Ÿ”Œ Extensible Architecture - Plugin system with lazy-loading support
  • ๐Ÿช Local Storefront - Browse and manage installed plugins
  • ๐Ÿ’Ž Diamond Drill - First plugin: security-focused file analyzer
  • ๐Ÿ”’ Sandboxed Execution - Plugins run in isolated environments
  • โš™๏ธ Edit Mode Toggle - Switch between editor and viewer modes

Developer Experience

  • ๐Ÿ”ง Modern Tooling - Webpack 5, Babel, ESLint with flat config
  • ๐Ÿ”„ Hot Module Replacement - Fast development with live reloading
  • ๐Ÿ“ฆ ES6 Modules - Modern JavaScript with proper transpilation
  • โœ… Quality Gates - Automated linting, testing, and build validation
  • ๐ŸŽ›๏ธ Development Console - Interactive debugging and exploration tools

Technical Stack

  • Frontend: Vanilla JavaScript ES6+, CSS3 with modern features
  • Build: Webpack 5 with dev server and HMR
  • Testing: Jest 29 with JSDOM environment and performance testing
  • Performance: Custom monitoring framework with statistical analysis
  • Linting: ESLint with modern flat configuration
  • Markdown: Marked.js v5.1.2 for fast, reliable parsing

๐Ÿš€ Quick Start

๐ŸŒ Live Demo

Try MD Reader Pro online: https://your-username.github.io/md-reader-pro/

๐Ÿ’ป Local Development

# Clone the repository
git clone https://github.com/khet-1/md-reader-pro.git
cd md-reader-pro

# Install dependencies
npm install

# Start development server
npm run dev

The application will be available at http://localhost:3080 (default port 3080 to avoid conflicts with other apps; override with PORT=3000 npm run dev if needed).

๐Ÿ“‹ Development Commands

Core Development

Command Description
npm run dev Start development server with hot reloading
npm run build Create production build
npm run build:clean Create production build with clean output

Testing & Quality

Command Description
npm test Run comprehensive test suite (228 tests)
npm run test:watch Run tests in watch mode
npm run test:coverage Generate detailed coverage report
npm run lint Check code quality with ESLint
npm run lint:clean Check code quality with clean output
npm run validate Run lint + test + build pipeline
npm run validate:full Run complete validation with all tests

Performance Testing

Command Description
npm run test:performance Run core performance tests
npm run test:benchmarks Run detailed benchmark analysis
npm run performance:monitor Complete performance monitoring suite
npm run performance:regression Check for performance regressions
npm run performance:update-baseline Update performance baselines
npm run test:optimize Analyze and optimize test performance
npm run test:all Run complete test suite with performance tests

Deployment Commands

Command Description
npm run deploy:validate Full validation + deployment build
npm run deploy:build Build + prepare deployment assets
npm run deploy:prepare Generate deployment metadata
npm run pages:setup Show GitHub Pages setup instructions
npm run pages:status Check deployment status URL

๐Ÿ—๏ธ Project Structure

md-reader-pro/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.html          # Main HTML template with professional styling
โ”‚   โ”œโ”€โ”€ index.js            # MarkdownEditor class with full functionality
โ”‚   โ”œโ”€โ”€ styles/             # Modular CSS (variables, base, layout, etc.)
โ”‚   โ”œโ”€โ”€ utils/              # AnimationManager, NotificationManager
โ”‚   โ””โ”€โ”€ plugins/            # Plugin system (Loader, Registry, Bridge)
โ”œโ”€โ”€ rust-cli/               # Diamond Drill plugin (Rust)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ main.rs         # CLI entry point
โ”‚   โ”‚   โ”œโ”€โ”€ tui.rs          # Terminal UI with ratatui
โ”‚   โ”‚   โ”œโ”€โ”€ analyzer.rs     # File analysis engine
โ”‚   โ”‚   โ””โ”€โ”€ ...             # auth, config, picker, ro_lock
โ”‚   โ””โ”€โ”€ Cargo.toml          # Rust dependencies
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ setup.js            # Test environment configuration
โ”‚   โ”œโ”€โ”€ test-utils.js       # Shared testing utilities
โ”‚   โ”œโ”€โ”€ core.test.js        # Core functionality tests
โ”‚   โ”œโ”€โ”€ ui-interactions.test.js     # UI and DOM interaction tests
โ”‚   โ”œโ”€โ”€ edge-cases.test.js          # Edge cases and error handling
โ”‚   โ”œโ”€โ”€ accessibility.test.js       # Accessibility and UX tests
โ”‚   โ”œโ”€โ”€ integration.test.js         # End-to-end workflow tests
โ”‚   โ”œโ”€โ”€ markdown-rendering.test.js  # Markdown parsing tests
โ”‚   โ”œโ”€โ”€ help-bar.test.js           # Help system tests
โ”‚   โ”œโ”€โ”€ performance.test.js        # Core performance validation
โ”‚   โ”œโ”€โ”€ benchmarks.test.js         # Statistical benchmark analysis
โ”‚   โ””โ”€โ”€ performance-utils.js       # Performance testing framework
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ performance-regression.js  # Regression detection system
โ”‚   โ””โ”€โ”€ optimize-tests.js         # Test optimization analyzer
โ”œโ”€โ”€ .github/workflows/
โ”‚   โ””โ”€โ”€ performance.yml            # GitHub Actions CI/CD
โ”œโ”€โ”€ webpack.config.cjs      # Webpack 5 configuration
โ”œโ”€โ”€ jest.config.cjs         # Jest testing configuration
โ”œโ”€โ”€ eslint.config.mjs       # ESLint v9 flat configuration
โ”œโ”€โ”€ babel.config.cjs        # Babel transpilation settings
โ”œโ”€โ”€ PERFORMANCE.md          # Performance testing documentation
โ”œโ”€โ”€ ARCHITECTURE.md         # Complete system architecture with Mermaid diagrams
โ”œโ”€โ”€ PLUGIN-ARCHITECTURE.md  # Plugin system design document
โ”œโ”€โ”€ SERVICES.md             # Current services and components map
โ””โ”€โ”€ package.json            # Dependencies and scripts

๐Ÿงช Testing & Performance

The project maintains enterprise-grade testing standards:

Test Coverage Metrics

  • 74.88% Total Coverage (realistic threshold for production-only code)
  • 93.93% AnimationManager Coverage (new requestAnimationFrame-based system)
  • E2E Production Validation - All production-only code paths verified
  • All 228 tests passing - Jest unit tests + Playwright E2E tests
  • Performance validated - All benchmarks within targets

Test Categories

  • Core Functionality - Editor operations and markdown processing
  • UI Interactions - User interface and event handling
  • Edge Cases - Error handling and boundary conditions
  • Accessibility - ARIA labels and keyboard navigation
  • Integration - End-to-end workflow validation
  • Performance - Rendering speed and memory efficiency
  • Benchmarks - Statistical analysis with P95/P99 metrics
  • Animation System - requestAnimationFrame-based animations with FPS tracking

Performance Standards

Metric Target Current Status
Small Markdown Rendering <50ms โœ… ~6ms
Medium Markdown Rendering <200ms โœ… ~10ms
Large Markdown Rendering <1000ms โœ… ~108ms
File Loading <220ms โœ… <30ms avg
Memory Stability No leaks โœ… Confirmed
Interactive Response <5ms โœ… <2ms avg
# Run all tests with performance monitoring
npm run test:all

# Run tests with detailed coverage
npm run test:coverage

# Monitor performance metrics
npm run performance:monitor

# Check for performance regressions
npm run performance:regression

๐Ÿ—๏ธ Architecture & Documentation

System Architecture

The complete system architecture is documented in multiple comprehensive documents:

ARCHITECTURE.md - High-level system design with Mermaid diagrams:

  • Current Implementation - All existing systems and their connections
  • Plugin System - Plugin loader, registry, bridge, and storefront
  • Future Roadmap - Planned features and system expansions (shown with dashed lines)
  • Data Flow - How information moves through the system
  • Scalability Plans - Enterprise-grade scaling considerations
  • Security Architecture - Current and planned security measures

PLUGIN-ARCHITECTURE.md - Plugin system design document:

  • Plugin Types - WASM, IFrame, Worker, and Native plugins
  • Diamond Drill Integration - First plugin implementation
  • Local Storefront - Plugin discovery and management
  • Communication Protocol - IPC and message formats
  • Security Model - Permissions and sandbox enforcement

SERVICES.md - Detailed current services and components:

  • Service Responsibilities - Detailed breakdown of each service
  • Data Flow Patterns - Current operational data flows
  • Service Metrics - Performance and health monitoring
  • Configuration Details - Environment and dependency management

Performance Documentation

Detailed performance testing framework documentation is available in PERFORMANCE.md covering:

  • Performance Benchmarks - Statistical analysis and P95/P99 metrics
  • Regression Detection - Automated performance monitoring
  • CI/CD Integration - GitHub Actions performance pipeline
  • Optimization Guidelines - Best practices for maintaining performance

Planning & Innovation

IDEAS.md - Innovation hub for brainstorming and idea capture:

  • Idea Categories - Organized by impact and feasibility
  • Community Ideas - User-submitted feature requests
  • Quick Capture - Rapid idea documentation
  • Future Vision - Long-term product direction

BACKLOG.md - Prioritized product backlog:

  • Prioritized Features - Ready-to-implement features (P0-P3)
  • Effort Estimates - Development time estimates
  • Technical Specs - Detailed acceptance criteria
  • Status Tracking - Progress monitoring

๐Ÿš€ Deployment

GitHub Pages Deployment

MD Reader Pro includes a complete CI/CD pipeline for automated deployment to GitHub Pages:

Quick Deployment Setup

  1. Enable GitHub Pages: Repository Settings โ†’ Pages โ†’ Source: "GitHub Actions"
  2. Push to main branch: git push origin main
  3. Automatic deployment: Quality gates + build + deploy
  4. Live application: https://your-username.github.io/md-reader-pro/

Quality Gates (Must Pass Before Deployment)

  • โœ… ESLint code quality checks
  • โœ… Complete test suite (132 tests)
  • โœ… Performance benchmarks
  • โœ… Production build validation
  • โœ… Coverage threshold compliance

Deployment Features

  • Automated Pipeline: GitHub Actions workflow with quality gates
  • Zero-Downtime: Seamless deployments with rollback capability
  • Performance Monitoring: Daily automated performance checks
  • Status Tracking: Deployment status page and comprehensive logging
  • Security: Minimal permissions and branch protection
  • PR Management: Automatic closure of stale pull requests (3+ days old)
# Test deployment locally
npm run deploy:validate

# Check deployment status
npm run pages:status

๐Ÿ“š Complete deployment guide: DEPLOYMENT.md

Automated PR Management

Pull requests are automatically managed to keep the repository clean:

  • Stale Detection: PRs open for 3+ days are marked as stale
  • Auto-Close: Stale PRs are automatically closed with a notification
  • Exemptions: PRs with labels keep-open, wip, work-in-progress, or do-not-close are exempt
  • Schedule: Runs daily at 00:00 UTC
  • Manual Trigger: Can be manually triggered from GitHub Actions

To keep a PR open longer, add one of the exempt labels or ensure regular activity.

๐Ÿ”ง Configuration

Webpack 5 Setup

  • Hot Module Replacement for fast development
  • Production optimization with tree shaking
  • Asset processing and bundling
  • Development server with proper error handling

ESLint 9 Modern Configuration

  • Flat config format (latest standard)
  • ES6+ support with proper parsing
  • Code quality rules for maintainability
  • Integration with development workflow

Jest 29 Testing

  • ES6 module support with Babel integration
  • Comprehensive coverage reporting
  • DOM testing with JSDOM environment
  • Async testing support

๐Ÿšฆ Quality Gates

Before contributing, ensure:

  1. โœ… All tests pass (npm test)
  2. โœ… No linting errors (npm run lint)
  3. โœ… Build succeeds (npm run build)
  4. โœ… Coverage remains above 95%

๐Ÿ“ˆ Performance

  • Fast startup - Optimized webpack configuration
  • Small bundle - ~265KB with all dependencies
  • Efficient rendering - Real-time markdown parsing
  • Memory optimized - Proper cleanup and garbage collection

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

  1. Check existing work: Review BACKLOG.md for planned features
  2. Share ideas: Add to IDEAS.md or open a feature request issue
  3. Fork & develop:
    • Fork the repository
    • Create a feature branch (git checkout -b feature/amazing-feature)
    • Make your changes with tests
    • Ensure quality gates pass
  4. Submit PR: Submit a pull request with clear description

See CONTRIBUTING.md for detailed guidelines.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐ŸŽฏ Roadmap

โœ… Completed (v4.0.0)

  • โœ… Enterprise Testing Framework - 94.7% coverage with E2E validation
  • โœ… Performance Benchmarking - Statistical analysis and regression detection
  • โœ… Production Validation - Playwright E2E tests for production-only code
  • โœ… Security Hardening - XSS prevention and memory leak protection
  • โœ… CI/CD Integration - GitHub Actions with quality gates
  • โœ… Advanced Error Handling - Robust edge case management
  • โœ… Accessibility Features - ARIA labels and keyboard navigation
  • โœ… Interactive Help System - Built-in markdown reference
  • โœ… Production Monitoring - Error tracking and performance metrics
  • โœ… Diamond Drill Plugin - Rust-based file analyzer with TUI

๐Ÿšง In Progress (v4.1.0) - Plugin System Foundation

  • ๐Ÿ”„ Edit Mode Toggle - Settings to disable editing (viewer mode)
  • ๐Ÿ”„ Plugin Loader - Lazy-load plugins on activation
  • ๐Ÿ”„ Plugin Registry - Manifest parsing and plugin tracking
  • ๐Ÿ”„ Plugin Menu - UI integration for plugins
  • ๐Ÿ”„ Diamond Drill Integration - IPC bridge to Rust plugin

๐Ÿ“‹ Planned (v4.2.0) - Plugin Storefront

  • Local Storefront UI - Browse and manage installed plugins
  • Plugin Configuration - Per-plugin settings panel
  • WASM Support - WebAssembly plugins for browser-only mode
  • Plugin Panel Slots - Sidebar and panel integration

๐Ÿ“‹ Planned (v4.3.0) - Advanced Features

  • Syntax Highlighting - Code block syntax highlighting with Prism.js
  • Export Functionality - HTML/PDF export with custom styling
  • Live Statistics - Real-time word/character/reading time count
  • Theme System - Customizable themes and color schemes
  • Advanced Search - Full-text search with regex support

๐Ÿ”ฎ Future Vision (v5.0.0+)

  • Collaborative Features - Real-time collaboration and sharing
  • Version Control - Git integration for document versioning
  • AI Integration - Smart writing assistance and suggestions
  • Cloud Sync - Cross-device document synchronization
  • Mobile App - Native mobile applications
  • Desktop App - Electron-based desktop version
  • Advanced Analytics - Writing patterns and productivity insights

Built with โค๏ธ using modern 2025 development practices and cutting-edge web technologies.

About

AI-powered markdown reader

Resources

License

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors