backend-development

Structure Rust/Tauri backend services using a 3-layer Clean Architecture.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/reynalivan/EMMM2 --skill backend-development-reynalivan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-development
Source: https://github.com/reynalivan/EMMM2/tree/main/.agent/skills/backend-development
Command: npx skills add https://github.com/reynalivan/EMMM2 --skill backend-development-reynalivan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Establishing a maintainable, decoupled backend for EMMM2 is challenging; this guide codifies the 3-layer Clean Architecture (Presentation, Domain, Infrastructure) and practical patterns for Rust services in Tauri.

Core Features & Use Cases

  • Core Architecture: Presentation (Commands) thin wrapper; Domain (Services) pure business logic; Infrastructure (Repositories) data access.
  • API & DB Design: DTO-driven commands, UUIDv4 IDs, SQLite + SQLx migrations, and robust error handling.
  • Reusability & Testing: Clear boundaries enable unit and integration tests, easy refactors, and scalable feature delivery.

Quick Start

Examine a new backend feature and structure it as Commands -> Services -> Repositories following the 3-layer standard.

Frequently Asked Questions about backend-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Rust backend service for maintainability?

Structure a Rust backend service using a 3-layer Clean Architecture: thin Presentation Commands, pure Domain Services for business logic, and Infrastructure Repositories for data access. This decoupled design enables clear boundaries, easy refactors, and scalable feature delivery.

What is the best way to handle database migrations in a Rust Tauri application?

Handle database migrations in a Rust Tauri application by using SQLite with SQLx migrations. This approach ensures robust data handling and secure schema updates while maintaining consistent infrastructure boundaries across your backend services.

Does the 3-layer Clean Architecture pattern work with Tauri commands?

The 3-layer Clean Architecture pattern works with Tauri by treating Commands as a thin Presentation wrapper. They delegate to Domain Services for pure business logic, which then interact with Infrastructure Repositories for database access.

How do you design DTOs and handle IDs in Rust backend services?

Design DTOs in Rust backend services to drive your Commands, and use UUIDv4 for generating unique IDs. This DTO-driven approach ensures secure data handling and clear boundaries between your API presentation layer and internal domain logic.

Why does separating business logic from data access improve backend testing?

Separating business logic from data access improves backend testing by creating clear boundaries between Domain Services and Infrastructure Repositories. This structural isolation enables straightforward unit and integration testing without needing to mock entire database systems.

Can I use this Rust backend architecture for features beyond EMMM2?

You can apply this Rust backend architecture to features beyond EMMM2 because the 3-layer Clean Architecture pattern establishes generic, decoupled boundaries. The structural guidelines for Commands, Services, and Repositories support scalable feature delivery in any Rust application.