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.jsonTech stack
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript 6, Vite 8 |
| State | Zustand 5 |
| Styling | Tailwind CSS v4 |
| Virtualization | @tanstack/react-virtual |
| Drag & drop | @dnd-kit |
| Backend | Rust edition 2024 |
| Desktop framework | Tauri 2 |
| Plugins | window-state, shell, dialog, notification, global-shortcut |
| External | AWS CLI v2 on PATH |
Architecture principles
- Config is the source of truth —
~/.aws/configis 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
finallyblocks from overwriting newer state.