How jq-20/motrix-next works
Motrix Next is a cross-platform download manager with a Vue/Pinia interface and a Tauri/Rust backend supervising an Aria2 Next sidecar. The principal workflow accepts a URL, magnet, or torrent, prepares download options, submits a task to the engine, and presents task state and history. The graph also captures preferences, engine recovery, and browser-extension input. Some subsystem links are documented capabilities rather than sampled call sites; those are marked dashed or omitted where their wiring is not shown.
Main entry points: TaskView.vue Task screens · useAddTaskSubmit.ts Add task flow · index.ts Task management · supervisor.rs Engine supervisor
Components 18
Task interface
- Task screens
src/views/TaskView.vue - Add task flow
src/composables/useAddTaskSubmit.ts - Main layout
src/layouts/MainLayout.vue - Task details
src/components/task/TaskDetail.vue - Preference screens
src/views/PreferenceView.vue
Application state
- Task management
src/stores/task/index.ts - Aria2 API
src/api/aria2.ts - App input routing
src/stores/app.ts - Engine state
src/stores/engine.ts - Preferences
src/stores/preference.ts - Download history
src/stores/history.ts
Native backend
- Tauri commands
src-tauri/src/commands/engine.rs - Engine supervisor
src-tauri/src/engine/supervisor.rs - Aria2 RPC client
src-tauri/src/aria2/client.rs - SQLite history
src-tauri/src/history.rs
External integrations
- Browser extension
- Aria2 Next
Other components
- User
Connections 20
- User → Task screens: manages downloads
- Task screens → Add task flow: submits tasks
- Add task flow → Task management: adds tasks
src/composables/useAddTaskSubmit.ts - Add task flow → Aria2 API: submits RPC
src/composables/useAddTaskSubmit.ts - Task management → Download history: reads history
src/stores/task/index.ts - Task management → Aria2 API: fetches task state
src/stores/task/index.ts - Task screens → Task management: shows tasks
- Task screens → Task details: opens details
- Browser extension → App input routing: sends download input
src/stores/app.ts - App input routing → Add task flow: routes submissions
src/stores/app.ts - User → Preference screens: configures downloads
- Preference screens → Preferences: updates settings
- Preferences → Tauri commands: refreshes runtime config
src/stores/preference.ts - Main layout → Engine state: displays engine state
- Engine state → Tauri commands: invokes lifecycle commands
src/stores/engine.ts - Tauri commands → Engine supervisor: delegates lifecycle
src-tauri/src/commands/engine.rs - Engine supervisor → Aria2 RPC client: probes RPC
src-tauri/src/engine/supervisor.rs - Aria2 RPC client → Aria2 Next: sends JSON-RPC
src-tauri/src/aria2/client.rs - Download history → SQLite history: persists records
- Engine supervisor → SQLite history: maintains history
src-tauri/src/engine/supervisor.rs