TL;DR: What would be a good architecture for a Rust backend in the Tauri 2 framework with 3 user-facing interfaces (GUI, MCP, CLI) and multiple external resources (Docker, Git, SQLite, file system, remote data storage, ...) that does almost everything concurrently with tokio?
Hi. I'm currently building a tool that aims to help Business Central (BC - ERP system by Microsoft) developers and vibe coders operate more efficiently. The tool will make managing Docker containers, repositories, dependencies, and so on way easier. In addition to the GUI (Vue/Vite/Element Plus), I also want to provide a CLI and MCP. To make it even easier for the user, I plan on implementing a project-based system where you can set everything up for a customer, and if something changes (e.g. the BC version), the user updates the config and the program takes care of the rest.
Obviously, there are quite a few interfaces I need to cater to. For one, there are three different front-facing ones. And then, on the backend, there is Docker (bollard), Git (git2), SQLite (Tauri SQL plugin), the file system, remote resources, and so much more. Of course, all of that is built for concurrency.
I am in the very early stages of development and have implemented the basis for the Docker capabilities (backend and GUI) and started on Git. Of course, this already involves a lot of file system and remote resource (http, downloads, ...) interaction. I have yet to begin with any of the SQL, CLI, or MCP stuff. But I already notice some challenges and therefore want to apply a design pattern that allows me to implement all of these features without it becoming a complete clusterduck.
I tried Hexagonal Architecture from Alistair Cockburn in a Python project once and could imagine that it fits Rust as a language quite well. On the other hand, while thinking about implementing it, I already encountered heaps of challenges (which does not mean that this can't be the answer).
One thing I want to mention is that I do not have a lot of experience with Rust. I read the book a second time, more focused this time, over the last two months or so, and this project started as a practice project while I was in the middle of the book. Since I primarily focus on learning Rust right now, I did not dive all that deeply into the tauri framework itself, which I will definitely do soon.
But until then: What would be a good architecture to implement before moving on with new features? If you have the time I would be glad to read about your reasons and maybe even experience with it.