Kallos Markdown (Kallos MD) is a modern, high-performance, client-side Markdown workspace designed for clarity, zero distractions, complete data sovereignty, and an ergonomic writing experience. Formerly known as Markdown Studio.
Built with Svelte 5 (Runes), TypeScript, Vite 8, and CodeMirror 6, it features an Obsidian-free, clean-room modular 3-layer architecture (core/, features/, shared/), an interactive Hybrid Live Preview canvas, synchronized split-view editing, mathematical typesetting via self-hosted KaTeX, interactive vector diagrams with Mermaid, GFM extensions (tables, callouts, and footnotes), print-ready PDF and standalone HTML5 export, nested folder management, and 100% offline-first storage backed by IndexedDB.
- Interactive Live Preview Canvas: Headings, GFM tables, math blocks, code cards, and Mermaid diagrams render directly inline as you type, revealing the raw Markdown syntax and syntax theme colors only on the active line or block under your cursor.
- Adjustable Writing Sheet: Draggable canvas guides (
680pxto1600px, default1020px) with visible bounds, persisted inlocalStorage. - Raw / Rendered Toggle (
Ctrl + E/Alt + M): Instant toggle between raw Markdown and live-rendered view directly within Live Preview. - 4 View Modes:
Live Preview: Distraction-free interactive canvas with in-place rendering.Editor: Focused monospace code editor with line numbers, minimap, and active line styling.Split: Real-time side-by-side editing and reading desk with proportional scroll synchronization (SYNC) and an adjustable divider.Preview: Clean reader view without editing chrome.
- KaTeX Mathematical Typesetting: Full support for inline expressions (
$...$, with safe boundary spacing and escaped\$support) and multi-line display equations / matrices ($$...$$) powered by self-hosted local.woff2fonts. - Interactive Mermaid SVG Diagrams: Flowcharts, sequence, state, class, and architecture diagrams rendered as clean vector SVGs with dedicated zoom controls (
+,β,βΊ), full-screen modal, and SVG/PNG copy/export. - GitHub Flavored Markdown (GFM):
- Responsive tables with horizontal scroll and alignment directives (
:---,:---:). - Rich visual alerts (
[!NOTE],[!TIP],[!IMPORTANT],[!WARNING],[!CAUTION]). - Semantic linked footnotes (
[^1]) with instant back-links (β©). - Interactive task checkboxes (
- [ ]/- [x]) that toggle state in the source document. - Collapsible content via native
<details>and<summary>.
- Responsive tables with horizontal scroll and alignment directives (
- Nested File Tree: Organize documents into unlimited folders and subfolders or keep them at the vault root.
- Drag & Drop: Intuitive document movement between folders or within the file tree.
- Inline Renaming: Fast renaming with double-click or F2, complete with context menus.
- Instant Search: Real-time filtering across document titles and folder structures.
- Table of Contents (TOC): Automatically generated document navigation outline based on Markdown headings (
# H1through###### H6).
- Clean PDF / Print Output:
- Dedicated
@media printrules that hide interactive UI controls while preserving syntax colors and borders (print-color-adjust: exact). - Native SVG Mermaid diagrams with clean boundaries, preventing duplicate text or clipping.
- Automatic expansion of
<details>accordions and page-break guards for tables, task lists, and code blocks.
- Dedicated
- Standalone HTML5 Export: Exports self-contained single-file
.htmldocuments with KaTeX styles and fonts embedded as Base64 (works completely offline). - Markdown Download: One-click download of the active file as
.md.
- Local Browser Database (
IndexedDB): All documents and folders reside inside IndexedDB (md-studio-db), avoidinglocalStoragequota limitations. - Zero Remote Dependencies / Cero Internet: 100% client-side architecture. Your notes, equations, and private files never leave your device. Cero telemetry, analytics, or third-party cookies.
- Debounced Auto-Save (350 ms): Seamless background saves without blocking typing responsiveness.
- Dual-Language Interface (English / Spanish): Instant locale switching without reloading or external network requests.
- Bilingual Static Landings: Ultra-fast static landings for English (
/) and Spanish (/es/) with complete structured data (JSON-LDWebApplication), reciprocatedhreflangalternates, and social cards (1200Γ630og:image).
| Layer / Module | Technology | Version | Purpose |
|---|---|---|---|
| Framework | Svelte 5 | ^5.57.2 |
Reactive Runes ($state, $derived, $effect) |
| Language | TypeScript | ~6.0.3 |
Strict static typing across domain and components |
| Bundler & Server | Vite | ^8.3.5 |
Fast HMR, multi-page input, and modular production bundling |
| Code Editor | CodeMirror 6 | ^6.0.2 |
Extensible core editor & Hybrid Live Preview ViewPlugins |
| Minimap | @replit/codemirror-minimap |
^0.5.2 |
Visual document navigation in editor |
| Database | idb | ^8.0.4 |
Promise-based IndexedDB wrapper |
| Markdown Engine | Marked | ^18.1.2 |
Standard Markdown and GFM parsing |
| XSS Sanitization | DOMPurify | ^3.4.17 |
Safe HTML sanitization against XSS |
| Preview Syntax | highlight.js | ^11.12.0 |
Static syntax highlighting with copy buttons |
| Math Engine | KaTeX | ^0.19.1 |
Fast inline and display LaTeX rendering with self-hosted fonts |
| Diagrams | Mermaid | ^12.2.0 |
Vector flowcharts and sequence diagrams |
| Icons | Lucide Svelte | ^1.0.1 |
Accessible vector icons |
| Internationalization | Svelte 5 Runes | β |
Native type-safe offline localization (EN/ES) |
The codebase strictly adheres to a modular 3-layer architecture (core/, features/, shared/) where every .ts, .svelte, and .css file is kept under 450β500 lines for maintainability:
kallosmd/
βββ index.html # Static English landing (SEO, Open Graph, JSON-LD)
βββ es/index.html # Static Spanish landing (SEO, Open Graph, JSON-LD)
βββ app/index.html # SPA App entry point (noindex, follow)
βββ package.json # Project dependencies, metadata, and scripts
βββ vite.config.ts # Multi-page build configuration (main, es, app)
βββ scripts/
β βββ seo-check.mjs # Automated native Node.js SEO verification script
βββ src/
βββ main.ts # Application bootstrap entry point
βββ app.css # Global CSS variables, reset, and print imports
βββ App.svelte # Root layout orchestrator (< 300 lines)
β
βββ core/ # Pure TypeScript contracts and domain logic
β βββ types/ # DocumentItem, FolderItem, Settings, TocHeading
β βββ storage/ # Hexagonal StoragePort (indexedDbAdapter, localCache, db)
β βββ markdown/ # Modular pipeline (markdownPipeline, mathScanner, gfmAlerts, footnotes)
β
βββ features/ # Domain vertical feature modules
β βββ settings/ # settingsStore.svelte.ts (UI themes, font preferences)
β βββ vault/ # vaultStore.svelte.ts & sidebar components (FileTree, SearchBox, TocPanel)
β βββ editor/ # Editor.svelte & live-preview/ (liveWidgets, liveTheme, livePlugin)
β βββ preview/ # Preview.svelte, scrollSync, mermaidRenderer, and print/HTML export
β βββ toolbar/ # Toolbar.svelte, ActionGroup, and view mode selectors
β βββ workspace/ # Resizer, StatusBar, and DropOverlay
β
βββ shared/ # Reusable cross-cutting resources
βββ ui/ # Button, DropdownMenu, InlineRenameInput, ToggleSwitchItem
βββ i18n/ # i18n.svelte.ts, en.ts, es.ts
βββ styles/ # variables.css, base.css, print-document.css, print-diagrams.css
βββ utils/ # formatters.ts, codeThemes.ts
- Phase 0 Β· Architectural Refactoring & Modularization: 3-layer split (
core/,features/,shared/), hexagonal storage port, and strict enforcement of< 450-500lines per file. - Phase 1 Β· Hybrid Live Preview (WYSIWYG): In-place rendering of headings, code blocks with copy header bar, tables, KaTeX display math, and Mermaid diagrams with cursor-aware raw Markdown revealing.
- Phase 1 Β· Live Preview Stability & Ergonomics: Selection freeze, arrow key debounce, layout jump elimination, drag selection confinement, adjustable writing canvas (
Ctrl + E), theme color highlighting for active lines, and empty line placeholders. - Phase 5 Β· Bilingual SEO & Search Discovery: Dedicated English (
/) and Spanish (/es/) static landings, app route at/app/,og-image.png(1200Γ630), JSON-LDWebApplication, reciprocalhreflang, updated sitemap, and automatedseo:checktesting.
- Phase 2 Β· PKM Wiki & Quick Wins:
- Command Palette & Quick Switcher (
Ctrl + K/Ctrl + Shift + P) with local fuzzy search. - Bidirectional Wikilinks (
[[Note]]&[[Note|Alias]]) with floating autocomplete and Backlinks sidebar panel. - Frontmatter YAML card view and collapsible Callouts (
[!NOTE]-/[!NOTE]+).
- Command Palette & Quick Switcher (
- Phase 3 Β· Offline Media, Assisted Tables & Scroll Precision:
- Clipboard image paste (
Ctrl + V) and drag-and-drop stored as localBlobin IndexedDB (local-media://). - Assisted GFM table navigation (
Tab/Shift + Tab) and visual grid picker. - Exact scroll synchronization across multi-line display KaTeX blocks.
- Clipboard image paste (
- Phase 4 Β· Native Local-First (File System Access API) & PWA:
- Direct local hard drive folder syncing via
window.showDirectoryPicker(). - Full-text search with highlighted context snippets and line jumps.
- Offline Service Worker (
sw.js) with Cache-First strategy for 100% PWA installation.
- Direct local hard drive folder syncing via
- Phase 5.3 Β· Search Intent Landing Pages:
- Dedicated pages for
markdown-to-pdf,markdown-katex-latex,mermaid-diagrams, and Markdown cheat sheet in EN & ES.
- Dedicated pages for
| Shortcut | Action |
|---|---|
| Ctrl + E / Alt + M | Toggle between Raw Markdown and Rendered View in Live Preview |
| Ctrl + B / Cmd + B | Toggle sidebar visibility |
| Ctrl + S / Cmd + S | Save document with visual feedback |
| Ctrl + P / Cmd + P | Open print dialog / Export to PDF |
| F2 | Rename selected file or folder |
| Tab | Insert tab indentation inside editor |
| Double Click on Divider | Reset pane split ratio to 50% / 50% |
| Double Click on Frame Guide | Reset Live Preview writing width to default (1020px) |
- Node.js >= 18.0.0
- npm >= 9.0.0
-
Clone the repository:
git clone https://github.com/SamaelEND/kallosmd.git cd kallosmd -
Install dependencies:
npm install
-
Start development server:
npm run dev
Open
http://localhost:5173/in your browser.
- Type checking and Svelte validation:
npm run check
- Automated SEO checks (Metadata, JSON-LD, hreflang, noindex):
npm run seo:check
- Production build:
npm run build
- Preview local production build:
npm run preview
Markdown Studio was designed, refactored, and optimized through continuous pair programming between Manuel Alvarez.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Copyright (C) 2026 Manuel Alvarez.