Bedrock is a minimal Markdown-focused text editor built with Electron + React + CodeMirror 6.
- Single-window editor
- Open/Save/Save As Markdown files (
.md) - Hybrid Markdown mode (renders structure while editing) + raw mode
- Customizable keybindings (Settings)
- Themes + UI scaling
- Install:
npm install - Run (dev):
npm start - Lint:
npm run lint - Tests:
npm test - Package/build:
npm run packagenpm run build
- Main process:
src/main/index.ts- Owns file dialogs + file IO
- Exposes safe operations via IPC handlers
- Preload:
src/main/preload.ts- Exposes a typed
window.electronAPIsurface (no Node integration in renderer)
- Exposes a typed
- Renderer:
src/renderer/app.tsx- Hosts the React app and wires
CodeMirrorEditor
- Hosts the React app and wires
- Editor:
src/renderer/components/CodeMirrorEditor.tsxmounts CodeMirror, reconfigures extensionssrc/renderer/editor/codemirror/*contains CodeMirror extensions (hybrid Markdown decorations, theme, keymaps, commands)
The renderer only talks to Electron via window.electronAPI (typed in src/shared/types.ts).
- Renderer runs without Node integration.
- File system access is confined to the main process.
- External URL opening is validated in main (
http(s)only).