A Progressive Web App (PWA) for editing and previewing Markdown in your browser with offline support and persistent storage.
Live Demo: evgenyvinnik.github.io/mdreader
Source Code: github.com/evgenyvinnik/mdreader
- Monaco Editor - VS Code's powerful editor with full Markdown syntax highlighting
- Live Preview - Real-time Markdown rendering as you type
- GitHub Flavored Markdown - Full support for tables, task lists, code fences, and more
- Syntax Highlighting - Code blocks with language-specific highlighting via highlight.js
- PWA Capabilities - Offline support, installable as standalone app
- Persistent Storage - Documents saved to IndexedDB with auto-save
- Theme Support - Light/dark mode toggle
- View Modes - Editor only, split view, or preview only
┌─────────────────────────────────────────────────────────────┐
│ Browser (PWA Container) │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────────────┐ ┌─────────────────────────┐ │
│ │ Monaco Editor │ │ Markdown Preview │ │
│ │ (React 19) │────▶│ (markdown-it) │ │
│ └─────────────────────┘ └─────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ State Management (Zustand) │ │
│ └─────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ IndexedDB (Document Persistence) │ │
│ └─────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────────┤
│ Service Worker (Workbox - Offline Support) │
└─────────────────────────────────────────────────────────────┘
See architecture.md for detailed design documentation.
- Framework: React 19 + TypeScript (strict mode)
- Build: Vite with Rolldown bundler
- Editor: Monaco Editor (VS Code's editor component)
- Markdown Parser: markdown-it with plugins (anchor, task-lists, emoji)
- Syntax Highlighting: highlight.js
- Security: DOMPurify for HTML sanitization
- Storage: IndexedDB (via idb library)
- PWA: Workbox for service worker and offline support
This project demonstrates several system design concepts:
- Offline-First Architecture - Service workers and caching strategies
- Local Persistence - IndexedDB for client-side document storage
- Real-time Preview - Efficient markdown parsing and rendering pipeline
- Progressive Web Apps - Installability, offline support, and native-like experience
- Security - HTML sanitization to prevent XSS attacks
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linting
npm run lintThis is an external project. The full source code and implementation details are available in the MDReader repository.