How iotaledger/firefly works
Project type and purpose
• This is a monorepo for Firefly Shimmer, the official desktop wallet for the IOTA/Shimmer network.
• It’s built as an Electron-based full-stack desktop application with a Svelte/TypeScript UI (“packages/desktop”) and a shared TypeScript library of components, stores, and domain logic (“packages/shared”).
• Key use cases: account/profile management, transaction signing (including Ledger hardware support), token and NFT management, governance proposals, deep links, app updates and notifications.
High-level architecture from the file tree
• “packages/desktop”:
– Electron main process (electron/main.js) responsible for OS integration: native menus, deep-link handling, auto-updates, notification, stronghold encryption.
– Electron preload script (electron/preload.js) that exposes a safe IPC API to the renderer.
– Renderer process: Svelte UI components, views, feature flags, routers, stores, styling, assets, and business logic orchestrated by shared library.
– Build scripts and configuration (webpack, electron-builder, postcss, tsconfig).
• “packages/shared”:
– Core domain logic and state management (TS “lib” folder) covering account management, profile manager, wallet-rs bindings, network client, ledger integration, market price polling, governance logic, layer-2, token/NFT orchestration, i18n, error handling, utility modules, routing.
– Stores and context providers (Svelte stores) for each domain.
– Tests and mocks.
• Top-level: CI/CD workflows, linting configuration, docs and specifications, handbook guides, localization, contribution templates.