How poppingmoon/aria works
Project type and purpose
• Aria is a cross-platform client application for the Misskey social network.
• Built with Flutter (Dart) for UI on Android, iOS, macOS, Linux, Windows, and the Web.
• Embeds a Rust core (via flutter_rust_bridge) for performance-sensitive tasks (e.g., AIscript processing).
• Uses Riverpod for state management, REST and WebSocket to communicate with Misskey servers, plus local caching and persistence (shared_preferences, file system).
High-level file-structure analysis
• Top-level “android”, “ios”, “linux”, “macos”, “windows”, “web”: platform embedding and native shell.
• “lib”: Dart source, subdivided into:
• main.dart + router/ – entry point and navigation layer
• view/ – UI widgets and pages
• model/ – data structures (Freezed, JSON-serializable)
• provider/ – Riverpod providers and state notifiers
• repository/ – abstracted data sources (Token, Auth, Summaly, Window settings)
• util/ – helper functions
• rust/ – glue code for calling Rust via flutter_rust_bridge
• “rust”: pure Rust library exposing APIs (AIscript, init) and generating FFI stubs.
• “rust_builder”: scripts and plug-ins to compile the Rust library for each platform.
• CI and release scripts (fastlane, GitHub workflows, snapcraft).
Key architectural insights from README and code
• Flutter’s “engine + Dart” hosts UI and business logic.
• Riverpod providers isolate stateful logic and coordinate API calls.
• Repositories encapsulate network/storage; providers or hooks consume them.
• rust core performs compute-heavy or platform-specific tasks, called via FFI.
• Network layer: Dio HTTP client + WebSocket channels for streaming events.
• Local persistence: SharedPreferences and file system for caching, plus window sizing/position storage.