How masayukita/miasma-protocol works
Miasma is a censorship-resistant content storage and retrieval protocol, currently shipping as a Windows beta with desktop GUI, CLI, daemon, and BitTorrent bridge. The main workflow is to encrypt and erasure-code content into shares, publish them to peers and route signed records through the DHT, then retrieve and reconstruct content through selectable privacy layers. The desktop UI issues daemon requests through its worker; web and mobile surfaces are foundation-level bridges, not operational mobile networking. The README documents capabilities beyond the sampled source, so those appear as documented subsystems with only documented relationships shown.
Main entry points: main.rs Node daemon · coordinator.rs Retrieval coordinator · app.js Web client · routing.rs DHT routing
Components 27
User clients
- Desktop GUI
crates/miasma-desktop/src/app.rs - Daemon worker
crates/miasma-desktop/src/worker.rs - CLI
crates/miasma-cli/src/main.rs - Web client
web/js/app.js - Browser storage
web/js/storage.js - Android bridge
android/app/src/main/kotlin/dev/miasma/WebBridgeActivity.kt - iOS view model
ios/MiasmaApp/App/MiasmaViewModel.swift
Storage protocol
- Content pipeline
crates/miasma-core/src/pipeline.rs - Dissolution
crates/miasma-core/src/dissolution/segment.rs - Content store
crates/miasma-core/src/store.rs - Share publishing
crates/miasma-core/src/transfer/publish.rs - Retrieval coordinator
crates/miasma-core/src/retrieval/coordinator.rs - Streaming reconstruction
crates/miasma-core/src/retrieval/streaming.rs - Hosted share push
crates/miasma-core/src/push/service.rs - Encrypted chat
crates/miasma-core/src/chat/engine.rs
Network and privacy
- DHT routing
crates/miasma-core/src/network/routing.rs - Peer credentials
crates/miasma-core/src/directed/challenge.rs - Onion routing
crates/miasma-core/src/onion/router.rs - Obfuscated transports
crates/miasma-core/src/transport/obfuscated.rs
Node operations
- Node daemon
crates/miasma-cli/src/main.rs - Repair detection
crates/miasma-core/src/repair/detector.rs
Bridges
- WASM API
crates/miasma-wasm/src/lib.rs - BitTorrent bridge
crates/miasma-bridge/src/bridge.rs
Other components
- User
- P2P peers
- IndexedDB
- Local daemon
Connections 31
- User → Desktop GUI: uses
crates/miasma-desktop/src/app.rs - Desktop GUI → Daemon worker: issues commands
crates/miasma-desktop/src/worker.rs - Daemon worker → Node daemon: IPC requests
crates/miasma-desktop/src/worker.rs - User → CLI: runs commands
crates/miasma-cli/src/main.rs - CLI → Node daemon: starts and controls
crates/miasma-cli/src/main.rs - Node daemon → Content pipeline: runs protocol
- Content pipeline → Dissolution: dissolves content
- Dissolution → Content store: stores shares
- Node daemon → Share publishing: publishes shares
- Share publishing → DHT routing: publishes records
- Share publishing → Hosted share push: distributes shares
- Hosted share push → P2P peers: pushes shards
- P2P peers → Content store: hosts shares
- Node daemon → Retrieval coordinator: requests retrieval
- Retrieval coordinator → DHT routing: looks up records
- Retrieval coordinator → Onion routing: routes privately
- Retrieval coordinator → Obfuscated transports: uses transports
- Retrieval coordinator → Streaming reconstruction: reconstructs content
- Streaming reconstruction → Content store: reads shares
- DHT routing → Peer credentials: verifies holders
- DHT routing → P2P peers: routes records
- Node daemon → Encrypted chat: serves chat
- Node daemon → Repair detection: monitors content
- User → Web client: uses
web/js/app.js - Web client → WASM API: calls protocol API
web/js/app.js - Web client → Browser storage: persists shares
web/js/storage.js - Browser storage → IndexedDB: reads and writes
web/js/storage.js - Web client → Local daemon: bridges requests
- Android bridge → WASM API: local FFI
- iOS view model → WASM API: local FFI
- BitTorrent bridge → Node daemon: imports into node