A local-first Markdown workspace: editor, live preview, multi-format file viewer, and BYOK AI writing assistant.
Built with Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4, Shadcn UI, Zustand, and Dexie.js.
- โก Real-Time Live Preview: Split-screen or full-screen rendering of GitHub Flavored Markdown (GFM) with AST-synchronized bidirectional scrolling.
- ๐งฎ LaTeX Math: Inline (
$E = mc^2$) and block equation rendering powered by KaTeX. - ๐ Extended Diagram Engines: Mermaid, Markmap (mind maps), Vega-Lite (charts), PlantUML, Graphviz/DOT, D2, WaveDrom, ERD, Pikchr (via Kroki), ABC music notation (with audio playback), GeoJSON/TopoJSON maps (Leaflet), and a 3D STL model viewer (Three.js) โ every engine shares a zoom/pan/copy-SVG/download-PNG/fullscreen toolbar.
- ๐ Find & Replace: In-editor search (
Ctrl+F) with match count, case sensitivity, whole word, and regex support, plus a workspace-wide global search/replace across all documents. - ๐ Insert Diagram: Searchable modal with 17 diagram templates across 9 categories.
- ๐ Interactive Table Builder: Visual spreadsheet-style modal to create, align, resize, and insert Markdown tables.
- ๐ Format & Data Converters: CSV/TSV โ Markdown table converter, plus a JSON โ XML โ YAML โ CSV data format converter.
- ๐งน Auto-Formatter: AST-based linter that aligns Markdown table columns and normalizes document structure.
- ๐ Document Diagnostics: Flesch Reading Ease score, word/syllable counts, reading time, and speaking time.
- ๐ค Voice Dictation: Speech-to-text input via the Web Speech API.
โ๏ธ Text Direction & Alignment: LTR/RTL toggle plus left/center/right/justify alignment.- ๐ Emoji Picker: Full emoji database via
@emoji-mart/reactwith cursor insertion. - ๐ฝ๏ธ Presentation Mode: Marp-style full-screen slide deck with keyboard navigation and progress tracking.
- ๐ Template Hub: Pre-built starter templates (READMEs, technical RFCs, API specs, academic papers, meeting notes, feature tours).
- ๐ธ๏ธ Knowledge Graph View: Force-directed graph of all documents linked by
[[wikilinks]]/references, with zoom, pan, and click-to-open. - ๐งญ Command Palette: Keyboard-driven
Cmd/Ctrl+Kcommand palette for navigating actions, documents, and settings.
- ๐ค AI Writing Actions: Summarize, fix grammar, rewrite, and shorten selected text or the whole document using your own Anthropic (Claude) or OpenAI API key.
- ๐ช AI Diagram Generation: Describe a diagram in plain language and get a ready-to-insert Mermaid block.
- ๐ Encrypted Key Vault: API keys are AES-GCM encrypted at rest in IndexedDB, unlocked per-session with a local passphrase โ keys never touch a Dnyx Draft server.
- ๐ Folder Explorer & Tabs: Multi-document tabs, nested folders, search filtering, and favorites.
- ๐๏ธ Multi-Format File Viewer: Beyond Markdown โ view and edit CSV/TSV tables, JSON/XML/YAML trees, XLSX spreadsheets, Jupyter notebooks, PDFs, images, code files (syntax highlighted), config files, and browse ZIP/archive contents, all in one workspace.
- ๐ป Local Folder Mounting: Open and edit a real folder on your computer via the native File System Access API โ no upload required.
- ๐ฅ Import Anything: Convert
.docx,.html, and.pdffiles to Markdown on import; import whole folders at once. - ๐ค Smart Export: Export to Markdown, HTML, Word (
.docx), JSON, PDF (with diagram serialization), or a full ZIP of the workspace. - ๐ GitHub Import: Pull Markdown files from public or private repositories using an encrypted Personal Access Token vault (AES-GCM, up to 50 tokens).
- ๐ README Builder: Dedicated
/readme-buildertool โ a guided, section-by-section wizard (features, tech stack, install steps, badges, folder structure, FAQ, etc.) that pulls live metadata from a GitHub repo and renders a polished, exportable README. - ๐ Document Encryption Vault: Password-protect any individual document with AES-GCM.
- ๐ Version History: Per-document revision snapshots with line-by-line diffing and one-click restore.
- ๐๏ธ Trash & Recovery: Dedicated trash window with restore and permanent delete.
- ๐ฌ Comments: Threaded, anchored comment system with resolve/reopen, backed by IndexedDB.
- ๐ค Live Share: Polling-based real-time collaboration with host/editor/viewer roles, invite links, and 2-second content sync.
- ๐ Share Snapshots: Fast, ephemeral read-only shareable links.
- ๐พ Local-First & Privacy-First: Zero login required. All documents, folders, revisions, comments, and tokens persist locally via IndexedDB (Dexie.js).
- ๐จ Light & Dark Themes: High-contrast light theme and deep dark theme with zero FOUC via
next-themes. - ๐ 15-Language UI: EN, ZH, JA, KO, FR, DE, ES, PT-BR, RU, AR, HI, BG, TR, IT.
- ๐ฑ PWA: Service worker with offline caching; installable as a standalone app.
- ๐ Marketing Site: Standalone landing app (
apps/landing) showcasing the product.
- Monorepo: Turborepo + pnpm workspaces
- Framework: Next.js 16 (App Router) with Server Components & Streaming SSR, React 19
- Language: 100% Strict TypeScript (zero JavaScript)
- UI Components: Shadcn UI & Radix UI primitives
- Styling: Tailwind CSS v4
- State Management: Zustand
- Local Storage: Dexie.js (IndexedDB)
- Validation: Zod + React Hook Form
- Error Handling: Sentry error boundaries
- Testing: Vitest (unit/integration/benchmarks) + Playwright (E2E) + React Testing Library + jsdom
- Tooling & Linter: Biome + Husky (commit-msg & pre-commit hooks) + Turborepo
- Edge/Serverless: Cloudflare Pages Functions (
functions/api) mirror the Next.js API routes for edge deployment - Containerization: Docker + docker-compose
Dnyx-Draft/
โโโ apps/
โ โโโ web/ # Next.js 16 (App Router) main application
โ โ โโโ app/ # Routes: editor, /readme-builder, /s/[id] (share), api/*
โ โ โโโ components/ # editor, preview, viewers, modals, sidebar, navbar, graph
โ โ โโโ lib/ # ai, crypto, db, export, format, import, i18n, store, utils
โ โโโ landing/ # Marketing/landing site (Next.js)
โโโ packages/
โ โโโ @dnyx-draft/engine # Shared Markdown AST parsing library
โ โโโ @dnyx-draft/crypto-vault # AES-256-GCM encryption package
โ โโโ @dnyx-draft/storage # Dexie.js database schemas
โ โโโ @dnyx-draft/ui # Shared UI design tokens & theme library
โโโ functions/
โ โโโ api/live-room.ts # Cloudflare Pages Function mirror of Live Share API
โโโ docs/ # Full documentation suite
โ โโโ llms/ # AI/LLM cheatsheets (Next.js, Tailwind, shadcn, TS)
โ โโโ wiki/ # GitHub-wiki-style guides
โ โโโ architecture.md # Architecture & data flow
โ โโโ DESIGN.md # UI & design tokens specification
โ โโโ PRD.md / BRD.md / TRD.md # Product/business/technical requirements
โ โโโ PRODUCT.md # Product vision & user personas
โ โโโ setup.md # Local setup & installation
โ โโโ testing.md # Vitest & Playwright testing guide
โ โโโ deployment.md # Vercel, Docker, and Cloudflare deployment
โ โโโ troubleshooting.md # Common solutions & FAQ
โโโ tests/ # unit, integration, e2e (Playwright), performance benches
โโโ scripts/ # setup-env.ts and other dev scripts
โโโ .github/ # Workflows & Copilot instructions
- Node.js >= 20.x
- pnpm >= 10.x
# Clone the repository
git clone https://github.com/dnyxtech/dnyx-draft.git
cd dnyx-draft
# Install dependencies
pnpm install
# Start development server (web app)
pnpm devOpen http://localhost:3000 in your browser.
pnpm dev:landing # Run only the landing site
pnpm dev:all # Run every app in the monorepo
pnpm build # Production build of the web app
pnpm build:all # Production build of every apppnpm test # Run Vitest unit/integration suite
pnpm test:watch # Vitest in watch mode
pnpm test:e2e # Playwright end-to-end tests
pnpm bench # Vitest performance benchmarks
pnpm typecheck # Type check all workspaces (Turborepo)
pnpm check # Biome format & lint (auto-fix)
pnpm lint # Lint all workspaces (Turborepo)docker compose up --buildSee docs/deployment.md for Vercel and Cloudflare deployment guides.
If Dnyx Draft saves you time, consider sponsoring the project on GitHub โ it helps fund ongoing development and maintenance. โญ Starring the repo helps too!
This project is open source and available under the MIT License.