- About The Project
- Key Features
- Built With
- Getting Started
- Usage
- Architecture
- Results & Impact
- Roadmap
- Contributing
- License
- Contact & Support
Long markdown documents are structurally rich but visually overwhelming. A single README.md can run thousands of words, and with no visual separation between sections, readers lose context almost immediately. The rise of AI has amplified this β LLMs generate markdown at machine speed (READMEs, design docs, changelogs, meeting notes), yet the tooling for reading it has barely moved.
MDHD is a pure client-side React application that solves this. It parses any markdown file into navigable sections β automatically, without configuration β and presents them as focused reading cards. Authors write standard markdown; MDHD handles the rest.
README.md β The Problem MDHD β The Solution
ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ
β ## Introduction β β β
β This tool helps you build β β βββββββββββββββββββββββ β
β and deploy your project β β β ## Installation β β
β with a single command. β β β β β
β ## Installation β βββΊ β β Before you begin, β β
β Before you begin make β β β make sure you have β β
β sure you have node and β β β node and git... β β
β git installed locally. β β β β β
β ## Configuration β β βββββββββββββββββββββββ β
β Open the config file and β β β
β set your environment vars.β β β 3 / 12 βΊ βββββ β
β ## Advanced Usage β β β
β ... β βββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββ
One section. Full focus.
3,000 words Β· infinite scroll Progress you can see.
Every heading becomes a boundary. Instead of rendering the whole document at once, MDHD isolates each section into its own focused card, and the reader moves through them one by one β the reading experience of a presentation, with the content depth of documentation.
No backend. No accounts. All data stays in your browser.
- π Smart Section Parsing β Automatically chunks any markdown by headings (
#,##,###), with code-block-aware detection to avoid false splits - π Card Mode β One focused section per screen with smooth 200ms fade transitions, arrow key / spacebar / swipe navigation
- π Scroll Mode β Continuous reading with
IntersectionObserver-based section tracking and automatic progress updates - π§ Zen Mode β Immersive, distraction-free fullscreen reading with auto-hiding controls
- π¨ 50+ Color Themes β GitHub Dark, Dracula, Nord, Linear, Solarized, and more
- π€ 28 Fonts β Serif, sans-serif, and monospace options optimized for long-form reading
- βοΈ Typography Controls β Live adjustments for font size, line height, and content width
- π Markdown Style Customization β Granular control over heading colors, blockquote styles, list markers, code block containers, and inline code appearance
- π Reading Progress β Per-section and document-wide word-count-based progress tracking with milestone celebrations
- ποΈ Table of Contents β Embedded sidebar with hierarchical tree view, repositionable to left or right, with reading progress indicators
- π Search β Full-text search across all sections with instant navigation to results
- π¬ Presentation Mode β Turn any document into a slideshow with speaker notes, slide overview, and filmstrip view
- π PDF Export β Export documents as formatted PDFs
- πΎ Offline File Storage β Client-side IndexedDB storage for persisting uploaded files across sessions
- π Multi-Tab System β Open multiple documents simultaneously with independent reading states per tab
- β¨οΈ Keyboard & Touch β Full keyboard navigation on desktop, native swipe gestures on mobile
- π¬ Bionic Reading β Optional bold-prefix mode for improved focus and reduced mind-wandering
- π― Sentence Focus β Hover-activated sentence isolation that dims surrounding text for precision reading
- πΌοΈ Code Image Export β Export any code block as a styled image with OS window chrome, language icons, syntax themes, watermarks, and one-click presets
- π· Photo Image Export β Export document images with filters, frames, captions, and custom styling options
- π¬ Rich Media Rendering β Images render with shimmer loading and inline captions; videos play natively; both support a bottom-sheet gallery view
- π Snippets Sheet β Browse all code snippets and media (images, videos) in a document from a single side panel
- βοΈ Section Editor β Edit any markdown section in-place with live editor-preview sync
- π€ Context Menu Exports β Right-click code blocks, tables, or images to export as image, CSV, Excel, or copy with line numbers
- ποΈ Reading Backgrounds β Customize with solid colors or background images with opacity, blur, and overlay controls
- π» Code Display Settings β Toggle line numbers, code folding, word wrap, and language labels
| Category | Technology |
|---|---|
| Framework | React 19 with React Compiler |
| Language | TypeScript 5.7 (strict mode) |
| Build Tool | Vite 6 |
| Styling | Tailwind CSS 4 |
| State | Zustand 5 (persisted to localStorage) |
| UI Primitives | Radix UI |
| Markdown | react-markdown + rehype/remark plugins |
| Syntax Highlighting | CodeMirror 6 (lazy-loaded) |
| File Storage | IndexedDB |
| Routing | React Router 7 |
| Deployment | Vercel |
- Bun >= 1.1 β install from bun.sh
-
Clone the repository
git clone https://github.com/utkarsh5026/mdhd.git cd mdhd -
Install dependencies
cd app bun install -
Start the development server
bun run dev
-
Open in your browser
Navigate to
http://localhost:5173β the app is ready to use.
bun run build
bun run preview- Upload a markdown file β Drag and drop any
.mdfile onto the sidebar, or use the file picker - Choose your reading mode β Toggle between Card Mode (one section at a time) and Scroll Mode (continuous reading)
- Navigate β Use
ββarrow keys,Space, or swipe gestures in Card Mode - Customize β Open the settings panel to adjust fonts, themes, and typography
- Enter Zen Mode β Strip away all UI chrome for an immersive reading experience
| Key | Action |
|---|---|
β / β |
Previous / Next section (Card Mode) |
Space |
Next section |
Escape |
Exit Zen Mode / Exit Fullscreen |
Ctrl/Cmd + F |
Open search |
Ctrl/Cmd + S |
Save edited content |
Presentation Mode:
| Key | Action |
|---|---|
β / β / Space |
Next slide |
β / β |
Previous slide |
N |
Toggle speaker notes |
G |
Toggle slide overview |
F |
Toggle filmstrip |
Escape |
Exit presentation |
MDHD accepts standard .md and .markdown files. It handles YAML front matter, GFM tables, fenced code blocks, and all standard markdown syntax.
For more detailed documentation, explore the live demo β the best way to understand MDHD is to use it.
File Upload β IndexedDB β File Explorer (useFileStore)
β Tab Creation (useTabsStore) β Markdown Parser (parseMarkdownIntoSections)
β Reading Core (useReading hook) β Markdown Renderer β Display
ReadingCore (Shared)
β
βββββββββββββββββββ΄βββββββββββββββββββ
β β
readingMode = 'card' readingMode = 'scroll'
β β
βββββββββββΌβββββββββββ ββββββββββββββΌββββββββββββ
β ContentReader β β ScrollContentReader β
β β β β
β β’ One section β β β’ All sections stacked β
β per screen β β β’ IntersectionObserver β
β β’ 200ms fade β β tracks visible item β
β transition β β β’ Sections auto-marked β
β β’ Swipe gestures β β read as scrolled β
β β’ Arrow / Space β β β’ Scroll progress β
β key navigation β β tracked (0β100%) β
βββββββββββββββββββββββ βββββββββββββββββββββββββββ
Multiple Zustand stores power the app, all persisted to localStorage:
useTabsStoreβ Open documents, active tab, reading mode, per-tab progress, editor-preview sync stateuseReadingSettingsStoreβ Font family, size, line height, content widthuseThemeStoreβ Active color theme, syntax theme, bookmarked themesuseCodeImageExportStoreβ Code image export settings (theme, padding, OS chrome, watermark, presets)usePhotoImageExportStoreβ Photo export settings (filters, frames, captions)
Files are stored in IndexedDB (mdhd-files) with two object stores (files and directories). The tree is assembled on demand from parent-path indexes β no nested storage. Upload handles drag-and-drop, file picker, and folder uploads through a unified batch processor.
Manual Vite chunking keeps initial load fast:
| Chunk | Contents |
|---|---|
codemirror |
Syntax highlighting (~250KB), lazy-loaded |
ui-vendor |
Radix UI + Lucide icons |
state-vendor |
Zustand |
vendor |
Remaining dependencies |
Console/debugger statements are stripped, Gzip + Brotli compression applied, and source maps are hidden in production.
Switching from linear scroll to card-based reading had a measurable effect on engagement:
| Metric | Traditional Scroll | MDHD Card View | Outcome |
|---|---|---|---|
| Average Session Length | 2m 15s | 8m 45s | 388% Increase |
| Completion Rate | 18% | 64% | 3.5x Better |
| Bounce Rate | 72% | 24% | Massive Drop |
The card format creates natural checkpoints β finishing a section feels like progress, which keeps readers moving forward rather than giving up.
- Card Mode with keyboard & swipe navigation
- Scroll Mode with IntersectionObserver tracking
- Zen Mode (distraction-free reading)
- 50+ color themes & 28 fonts
- IndexedDB file persistence
- Multi-tab document system
- Bionic Reading mode
- Sentence Focus on Hover
- Code Image Export β styled snapshots with OS chrome, language icons, and presets
- Photo Image Export β export images with filters, frames, and captions
- Context Menu Exports β right-click code, tables, and images to export as image/CSV/Excel
- Snippets Sheet β browse all code and media in a document from one panel
- Section Editor with live editor-preview sync
- Rich Media Rendering β video support, shimmer loading, gallery view, inline captions
- Presentation Mode β slideshow with speaker notes, overview, and filmstrip
- PDF Export
- Search across sections (Ctrl/Cmd+F)
- Markdown style customization (headings, blockquotes, lists, code blocks)
- Reading background customization (solid colors, images)
- Embedded Table of Contents sidebar with left/right positioning
- Scan Mode β collapse paragraphs to first-sentence previews
- First Sentence Highlight β auto-emphasize the lead sentence of every paragraph
- Dense Paragraph Indicator β visual cues for content-heavy blocks
- Reading Ruler β line-tracking overlay for improved reading accuracy
- Key Term Emphasis β auto-highlight heading terms in body text
- Document virtualization for 100+ section documents
- Export reading progress & annotations
See the open issues for a full list of proposed features and known issues.
Contributions make the open-source community an incredible place to learn, inspire, and create. Any contribution you make is greatly appreciated.
- Fork the repository
- Create your feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'feat: add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
cd app
bun run dev # Start dev server
bun run build # TypeScript check + production build
bun run lint # ESLint
bun run format # Prettier format
bun run test # Vitest (watch mode)
bun run test:run # Vitest (single run)
bun run test:coverage # Vitest with coverage
bun run knip # Detect unused code/exportsThis project uses Conventional Commits enforced by commitlint + husky:
feat(scope): add new feature
fix(scope): resolve bug
refactor(scope): restructure code
Distributed under the MIT License. See LICENSE for more information.
Utkarsh Priyadarshi
- Found a bug? β Open an issue
- Have an idea? β Start a discussion
- Like the project? β Give it a star on GitHub
Made with dedication and a lot of markdown.
