Skip to content

Directory structure

src/
├── App.tsx                        # Root component, state orchestration
├── main.tsx                       # Entry point
├── types.ts                       # Shared TS types, default values
├── styles.css                     # Global styles
├── DevPreview.tsx                 # Component dev sandbox
├── stores/
│   ├── appConfig.ts               # Config CRUD, metadata, preferences
│   ├── profiles.ts                # Scan, sync, auth operations
│   └── toasts.ts                  # Toast notifications + error log
├── hooks/
│   ├── useAuthActions.ts          # Login, re-login (generation counters)
│   ├── useAuthPoller.ts           # Periodic auth check + silent refresh
│   ├── useTraySync.ts             # Push auth state to tray menu
│   ├── useTauriEvents.ts          # Listen to Tauri events
│   ├── useAppPresence.ts          # Tray/dock/both mode
│   └── useNow.ts                  # 1s tick for timer countdown
├── lib/
│   ├── ipc.ts                     # Tauri invoke wrappers + mock fallback
│   ├── mergeProfiles.ts           # CloudProfile + AppConfig → ProfileViewModel
│   ├── organizations.ts           # Org resolution, filter options, slug generation
│   ├── time.ts                    # Auth state, countdown formatting
│   ├── theme.ts                   # Theme application
│   ├── platform.ts                # macOS detection, mod key labels
│   └── mockData.ts                # Mock data for browser preview
├── components/
│   ├── design/
│   │   ├── Button.tsx
│   │   ├── Badge.tsx
│   │   ├── MechanicalToggle.tsx
│   │   ├── SegmentedControl.tsx
│   │   └── tokens.css
│   ├── ProfileCard.tsx            # Single profile card
│   ├── SortableProfileCard.tsx    # dnd-kit wrapper
│   ├── ProfileList.tsx            # Virtualized list + drag context
│   ├── ProfileDetail.tsx          # Expanded detail editor
│   ├── Toolbar.tsx                # Search, sort, view, filters, batch actions
│   ├── OrgFilterChips.tsx         # Organization filter chips
│   ├── AuthButton.tsx             # Login/Logout button
│   ├── TimerWidget.tsx            # Countdown timer
│   ├── TagInput.tsx               # Tag editor
│   ├── ThemeProvider.tsx          # CSS variable application
│   ├── SettingsPanel.tsx          # Settings drawer
│   ├── SetupPanel.tsx             # First-run wizard
│   ├── HelpPanel.tsx              # Help + diagnostics
│   ├── AddOrgPanel.tsx            # SSO org CRUD
│   ├── ContextMenu.tsx            # Right-click menu
│   └── Toaster.tsx                # Toast notifications
├── assets/
│   └── tray-icon.svg

src-tauri/

src-tauri/
├── src/
│   ├── main.rs                    # Entry point
│   ├── lib.rs                     # App builder, command registration
│   ├── config_parser.rs           # INI parser + block markers
│   ├── models.rs                  # Rust structs (Serialize/Deserialize)
│   ├── error.rs                   # Error enum + Result alias
│   ├── tray.rs                    # Tray icon + menu builder
│   ├── watcher.rs                 # notify-based filesystem watcher
│   ├── presence.rs                # Tray/dock/both mode
│   └── commands/
│       ├── mod.rs
│       ├── profiles.rs            # scan, sync, login, logout
│       ├── auth.rs                # Auth status, silent refresh
│       ├── app_config.rs          # Config load/save, export/import
│       └── system_info.rs         # CLI info