name: 02-moxin-studio-app-development description: Create or modify Moxin Studio apps, screens, and shell integration. Use when adding a new app, changing an existing app, or wiring app lifecycle (timers, dark mode, dataflow).
Moxin Studio App Development
1. Overview
Build apps as self-contained crates under apps/. Use MoxinApp for registration and keep shell coupling minimal.
2. New app workflow
- Scaffold the app crate (copy moxin-fm or
cargo new). - Implement
MoxinAppand export the screen type. - Create the screen with
live_design!andWidgetimpl. - Register the app in the shell (Cargo features,
LiveRegister,LiveHook). - Add the dashboard page and sidebar entry.
- Add timer and dark mode hooks if needed.
- Add dataflow wiring if the app uses Dora.
3. Existing app changes
- Keep UI changes inside
apps/<app>/src/screen/*. - Keep dataflow changes inside
apps/<app>/dataflow. - Update shared widgets in
moxin-widgetsonly when multiple apps need it.
4. References
- references/app-workflow.md
- references/shell-integration.md
- references/app-edge-cases.md