Skip to content

Architecture overview

Mimic is a Tauri v2 desktop app: Rust backend, React + TypeScript frontend, communicating over Tauri IPC (invoke).

┌──────────────────────────────────────────────────┐
│                  Tauri window                      │
│  ┌────────────────────────────────────────────┐   │
│  │          React frontend (Vite)              │   │
│  │  Zustand stores ──mergeProfiles──► React   │   │
│  │        │                                    │   │
│  │    invoke()  ◄──── Tauri IPC ────►          │   │
│  └──────────┬─────────────────────────────────┘   │
│             │                                     │
│  ┌──────────▼─────────────────────────────────┐   │
│  │           Rust backend                       │   │
│  │  commands/  config_parser  watcher  tray    │   │
│  │  models.rs  error.rs      presence         │   │
│  └────────────────────────────────────────────┘   │
└──────────────────────────────────────────────────┘


  ~/.aws/config  ~/.aws/sso/cache  ~/.aws/cli/cache
  ~/.config/mimic/config.json

Tech stack

LayerTechnology
FrontendReact 19, TypeScript 6, Vite 8
StateZustand 5
StylingTailwind CSS v4
Virtualization@tanstack/react-virtual
Drag & drop@dnd-kit
BackendRust edition 2024
Desktop frameworkTauri 2
Pluginswindow-state, shell, dialog, notification, global-shortcut
ExternalAWS CLI v2 on PATH

Architecture principles

  • Config is the source of truth~/.aws/config is always canonical. Mimic reads it, never overwrites user-managed sections.
  • Metadata is separate — Labels, tags, notes, stars are stored in Mimic's own config file, never touching AWS config.
  • Debounced saves — Metadata changes are debounced (400ms) to batch edits. A wasRecentlySaved() guard (2s window) prevents file watcher reload loops.
  • Generation counters — Login and sync operations use generation counters to prevent stale finally blocks from overwriting newer state.