How osakichi/markmiru works
Markmiru is a Go/Wails desktop Markdown viewer and lightweight editor. Users open, drop, or restore documents, then view rendered Markdown or make edits and save; tabs, reload, search, printing, and style customization support that workflow. Go owns application state and server-rendered UI, while htmx and small WebView glue handle interactions. The graph preserves documented capabilities whose individual handlers were not sampled; those links cite the README rather than implying their source was inspected. Some platform-specific and UI wiring is therefore summarized at subsystem level.
Main entry points: web.go HTTP handlers · main.go App startup · glue.js WebView interactions · state.go Tabs and session state
Components 18
Desktop runtime
- App startup
main.go - App services
app.go - Single instance IPC
single_instance.go - OS integration
platform_linux.go
Document workflow
- Config persistence
config.go - Tabs and session state
web/state.go - Text format handling
web/textformat.go
Rendering and styles
- Markdown rendering
render/render.go - Style model and CSS
style/style.go - Print and PDF
platform_darwin.go - External links and images
render/render.go
Server-rendered interface
- HTTP handlers
web/web.go - HTML templates
web/templates - WebView interactions
web/assets/glue.js - Page search
web/assets/glue.js
Other components
- User
- Markdown files
- Mermaid diagrams
Connections 24
- User → App startup: launches
README.md - App startup → App services: creates
main.go - App startup → Single instance IPC: checks instance
main.go - Single instance IPC → App services: delivers paths
single_instance.go - App services → OS integration: raises window
app.go - App startup → HTTP handlers: installs handler
main.go - App startup → Tabs and session state: restores tabs
main.go - App startup → Config persistence: loads and saves
main.go - User → HTTP handlers: opens and edits
README.md - HTTP handlers → Tabs and session state: updates state
web/web.go - HTTP handlers → HTML templates: renders HTML
- HTTP handlers → Markdown rendering: highlights code
web/web.go - HTTP handlers → WebView interactions: serves assets
web/web.go - WebView interactions → HTTP handlers: sends requests
README.md - Tabs and session state → Text format handling: normalizes text
web/state.go - HTTP handlers → Markdown files: reads and writes
README.md - Tabs and session state → Config persistence: persists session
README.md - Markdown rendering → Mermaid diagrams: marks diagrams
README.md - HTTP handlers → Style model and CSS: manages styles
- Style model and CSS → HTTP handlers: provides CSS values
- WebView interactions → Page search: implements search
README.md - User → Print and PDF: prints document
README.md - Markdown rendering → External links and images: sanitizes content
README.md - WebView interactions → External links and images: confirms navigation
README.md