Create a complete braindump note-taking application with Dioxus 0.7 featuring: - Note capture with title, content, and tags - Full CRUD operations (create, read, update, delete) - Search functionality for notes - Tag-based filtering - Note pinning for quick access - Modern dark theme with purple accents - Responsive sidebar layout - Clean card-based note list - Full-text editor with auto-save hint Implemented with: - Dioxus 0.7.1 fullstack for reactive UI and server functions - Workspace pattern with shared API crate - In-memory storage using LazyLock - Server functions for note management All core features working and ready for testing.
1.5 KiB
1.5 KiB
Development
The mobile crate defines the entrypoint for the mobile app along with any assets, components and dependencies that are specific to mobile builds. The mobile crate starts out something like this:
mobile/
├─ assets/ # Assets used by the mobile app - Any platform specific assets should go in this folder
├─ src/
│ ├─ main.rs # The entrypoint for the mobile app.It also defines the routes for the mobile platform
│ ├─ views/ # The views each route will render in the mobile version of the app
│ │ ├─ mod.rs # Defines the module for the views route and re-exports the components for each route
│ │ ├─ blog.rs # The component that will render at the /blog/:id route
│ │ ├─ home.rs # The component that will render at the / route
├─ Cargo.toml # The mobile crate's Cargo.toml - This should include all mobile specific dependencies
Dependencies
Since you have fullstack enabled, the mobile crate will be built two times:
- Once for the server build with the
serverfeature enabled - Once for the client build with the
mobilefeature enabled
You should make all mobile specific dependencies optional and only enabled in the mobile feature. This will ensure that the server builds don't pull in mobile specific dependencies which cuts down on build times significantly.
Serving Your Mobile App
Mobile platforms are shared in a single crate. To serve mobile, you need to explicitly set your target device to android or ios:
dx serve --platform android