How xjoc/marsa works
Marsa is a local PHP/Node development environment operated through a CLI or desktop window. The principal workflow is to install runtimes, register project folders as sites, select versions, and have the background daemon serve those sites over trusted HTTPS with .test names. The graph also preserves the documented GUI, tray, shim, diagnostics, service control, setup, and privileged-helper capabilities. Some subsystem internals are unsampled, so their relationships are shown only where the README or excerpts support them.
Main entry points: strings.rs Marsa CLI · app.rs Marsa window · server.rs Daemon server · sites_sync.rs Site synchronization
Components 24
User interfaces
- Marsa CLI
crates/app/src/cli/strings.rs - Runtime shims
crates/shim/src/main.rs - Daemon client
crates/core/src/client.rs
Daemon runtime
- Daemon server
crates/app/src/daemon/server.rs - Daemon state
crates/app/src/daemon/state.rs - Caddy service
crates/app/src/daemon/caddy.rs - Service control
crates/app/src/daemon/services_api.rs - Service logs
crates/app/src/cli/logs.rs
Project management
- Site management
crates/app/src/daemon/sites_api.rs - Site synchronization
crates/app/src/daemon/sites_sync.rs - Version selection
crates/core/src/resolver.rs - Runtime installation
crates/core/src/installer.rs - Runtime management
crates/core/src/runtimes.rs - Diagnostics
crates/core/src/doctor.rs - Site configuration
crates/core/src/sites.rs
System integration
- `.test` DNS
crates/app/src/daemon/dns.rs - System setup
crates/app/src/daemon/setup_api.rs - Privileged helper
crates/helper/src/main.rs
Desktop experience
- Marsa window
crates/gui/src/app.rs - Menu bar tray
crates/gui/src/tray/worker.rs - UI state model
crates/gui/src/model.rs - UI bridge
crates/gui/src/bridge.rs
Other components
- Developer
- Web browser
Connections 26
- Developer → Marsa CLI: runs commands
README.md - Developer → Marsa window: uses window
README.md - Marsa CLI → Daemon client: requests operations
crates/core/src/client.rs - Marsa window → UI state model: updates state
crates/gui/src/app.rs - Marsa window → UI bridge: sends commands
crates/gui/src/app.rs - Marsa window → Daemon client: controls daemon
README.md - Menu bar tray → Marsa window: opens panel
README.md - Runtime shims → Version selection: resolves runtime
crates/shim/src/main.rs - Version selection → Runtime management: selects installed version
README.md - Daemon client → Daemon server: calls HTTP API
crates/core/src/client.rs - Daemon server → Daemon state: serves with state
crates/app/src/daemon/server.rs - Daemon server → Site synchronization: starts synchronization
crates/app/src/daemon/server.rs - Daemon server → `.test` DNS: starts DNS service
crates/app/src/daemon/server.rs - Site management → Site configuration: reads site settings
- Site synchronization → Caddy service: synchronizes site config
- Site synchronization → Site management: refreshes site list
- Marsa CLI → Runtime installation: installs runtimes
README.md - Runtime installation → Runtime management: adds installed versions
- Marsa CLI → Site management: manages sites
README.md - Marsa CLI → System setup: runs setup
README.md - System setup → Privileged helper: requests privileged work
- Marsa CLI → Diagnostics: checks environment
README.md - Marsa CLI → Service control: controls services
README.md - Marsa CLI → Service logs: reads logs
README.md - Caddy service → Web browser: serves HTTPS sites
README.md - `.test` DNS → Web browser: resolves `.test` names
README.md