How xuxian2102/cloudstack works
CloudStack is a native GTK4 Markdown editor for local Wayland use. Its main workflow is to open a project, edit an article and its frontmatter, preview rendered Markdown, manage colocated images, then selectively commit and synchronize project content through Git. The graph separates the GTK interface, application workflow/state coordination, core project and file services, and static rendering. Several subsystem paths and capabilities come from the README and tree; unsampled wiring is omitted where it cannot be established from excerpts.
Main entry points: window.rs Editor window · workspace.rs Workspace lifecycle · git.rs Git operations · posts.rs Article operations
Components 27
GTK interface
- GTK application
crates/cloudstack-gtk/src/main.rs - Editor window
crates/cloudstack-gtk/src/window.rs - Article controls
crates/cloudstack-gtk/src/window/articles.rs - Frontmatter drawer
crates/cloudstack-gtk/src/window/frontmatter.rs - Publish dialog
crates/cloudstack-gtk/src/window/publish.rs - Git panel
crates/cloudstack-gtk/src/window/git_panel.rs - WebKit preview
crates/cloudstack-gtk/src/preview.rs - Find and replace
crates/cloudstack-gtk/src/search.rs - Background tasks
crates/cloudstack-gtk/src/tasks.rs
Application workflows
- Workspace lifecycle
crates/cloudstack-application/src/workspace.rs - Edit session state
crates/cloudstack-application/src/session.rs - Save workflow
crates/cloudstack-application/src/save.rs - Draft recovery
crates/cloudstack-application/src/drafts/coordinator.rs - Preview scheduling
crates/cloudstack-application/src/preview.rs - Publish workflow
crates/cloudstack-application/src/publish.rs - Git workflow
crates/cloudstack-application/src/git.rs
Core services
- Project configuration
crates/cloudstack-core/src/services/project.rs - Article operations
crates/cloudstack-core/src/services/posts.rs - Frontmatter parsing
crates/cloudstack-core/src/services/frontmatter.rs - Local image assets
crates/cloudstack-core/src/services/assets.rs - Git operations
crates/cloudstack-core/src/services/git.rs - Markdown parsing
crates/cloudstack-core/src/services/markdown.rs
Preview rendering
- Markdown and KaTeX
crates/cloudstack-renderer/src/lib.rs
Other components
- Editor user
- Local project files
- Git remote
- GitHub CLI
Connections 28
- Editor user → GTK application: opens and edits
- GTK application → Editor window: presents
- Editor window → Workspace lifecycle: opens workspace
- Editor window → Edit session state: tracks edits
- Article controls → Workspace lifecycle: manages articles
- Frontmatter drawer → Frontmatter parsing: edits fields
- Editor window → Save workflow: saves changes
- Save workflow → Article operations: writes articles
- Workspace lifecycle → Project configuration: loads configuration
- Workspace lifecycle → Article operations: lists articles
- Draft recovery → Local project files: stores recovery drafts
- Edit session state → Draft recovery: tracks recovery state
- WebKit preview → Preview scheduling: schedules renders
- WebKit preview → Background tasks: dispatches rendering
- Background tasks → Markdown and KaTeX: renders Markdown
- Markdown and KaTeX → Markdown parsing: parses Markdown
- WebKit preview → Local image assets: loads local images
- Local image assets → Local project files: reads validated assets
- Publish dialog → Publish workflow: selects content
- Publish workflow → Article operations: gets article data
- Publish workflow → Git operations: commits selected files
- Git panel → Git workflow: controls Git
- Git workflow → Git operations: runs operations
- Git operations → Local project files: reads and stages
- Git operations → Git remote: fetches and pushes
- Git workflow → GitHub CLI: creates repository
- Project configuration → Local project files: reads and writes settings
- Article operations → Local project files: reads and changes articles