sveltemark Code
A privacy-first, local-only Markdown editor built with Svelte 5
Brought to you by:
masfana
# SvelteMark
A **privacy-first**, **open-source**, **local-only** markdown editor built with Svelte 5.
Your notes never leave your device. No accounts. No tracking. No cloud.
[](https://sm.fana.my.id)
[](LICENSE)
[](https://svelte.dev/)




# Clone the repository
git clone https://github.com/MasFana/sveltemark.git
cd sveltemark
# Install dependencies
pnpm install
# Start development server
pnpm dev
Open http://localhost:5173 in your browser.
# Build the application
pnpm build
# Preview the production build
pnpm preview
| Shortcut | Action |
|---|---|
Ctrl+S |
Save now |
Ctrl+B |
Bold |
Ctrl+I |
Italic |
Ctrl+P |
fanadown/
├── src/
│ ├── lib/
│ │ ├── components/
│ │ │ ├── Editor.svelte # CodeMirror editor component
│ │ │ ├── Preview.svelte # Markdown preview component
│ │ │ ├── Sidebar.svelte # File explorer sidebar
│ │ │ ├── FileTree.svelte # Recursive file tree
│ │ │ └── Toolbar.svelte # Formatting toolbar
│ │ ├── appState.svelte.ts # Global reactive state
│ │ ├── db.ts # Dexie database operations
│ │ ├── markdown.ts # Markdown processing pipeline
│ │ └── index.ts # Library exports
│ ├── service-worker.ts # PWA offline caching
│ └── routes/
│ ├── +layout.svelte # App layout
│ └── +page.svelte # Main page
├── static/ # Static assets
├── package.json
├── svelte.config.js
├── vite.config.ts
└── tsconfig.json
SvelteMark uses IndexedDB via Dexie.js for local-first data storage. All your notes are stored in your browser and never leave your device.
id, name, parentId, isOpenid, folderId (nullable), title, content, createdAt, updatedAtNote:
folderIdcan benullfor root-level files (files not inside any folder).
You can export all your data as a JSON file for backup:
To restore:
SvelteMark works fully offline as a Progressive Web App (PWA).
The application uses a GitHub-inspired dark theme with the following color palette:
| Element | Color |
|---|---|
| Background | #0d1117 |
| Surface | #161b22 |
| Border | #30363d |
| Text | #c9d1d9 |
| Muted | #8b949e |
| Accent | #58a6ff |
| Success | #3fb950 |
| Warning | #d29922 |
| Danger | #da3633 |
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
Made with Svelte 5 | Open Source | Privacy First