App (Flutter) Overview

Unified cross-platform app for voice journaling, AI chat, and knowledge management. Built with Flutter and Riverpod for iOS, Android, macOS, and Web.

247
Dart Files
78K
Lines of Code
25
Providers
6
Features

Directory Structure

lib/
├── main.dart                        # App entry, tab shell, global nav keys
├── core/                            # Shared infrastructure
│   ├── models/                      # Shared data models (speaker_segment.dart)
│   ├── providers/                   # Core Riverpod providers (25 files)
│   │   ├── app_state_provider.dart  # Server config, app mode, flavors
│   │   ├── voice_input_providers.dart
│   │   ├── streaming_voice_providers.dart
│   │   └── ...
│   ├── services/
│   │   ├── file_system_service.dart # Unified for Daily/Chat (1,127 lines)
│   │   ├── streaming_voice_service.dart
│   │   ├── transcription/           # Audio → text (CANONICAL location)
│   │   │   ├── audio_service.dart
│   │   │   ├── parakeet_service.dart      # Sherpa-ONNX Parakeet
│   │   │   ├── sherpa_onnx_service.dart   # Native transcription
│   │   │   └── sherpa_onnx_isolate.dart   # Background processing
│   │   ├── vad/                     # Voice Activity Detection
│   │   │   ├── simple_vad.dart
│   │   │   └── smart_chunker.dart
│   │   └── audio_processing/        # Audio filters
│   │       └── simple_noise_filter.dart
│   ├── theme/
│   │   ├── design_tokens.dart       # Brand colors, typography
│   │   └── app_theme.dart           # Material theme config
│   └── widgets/
│       └── error_boundary.dart
└── features/
    ├── chat/                        # AI chat (requires server)
    ├── daily/                       # Voice journaling (offline-capable)
    ├── vault/                       # Knowledge browser
    ├── settings/                    # Configuration screens
    └── onboarding/                  # Setup flow
                    

Features

💬 Chat Server

Full AI chat with Claude. Streaming responses, tool calls, thinking sections, code highlighting, and session management.

  • 69 files total
  • 16 data models
  • 2,059-line ChatService
  • WebSocket streaming
Explore Chat →

📔 Daily Offline

Voice-first journaling with local transcription. Works completely offline with Sherpa-ONNX Parakeet models.

  • 92+ files total
  • Live streaming transcription
  • Omi BLE device support
  • Photo/handwriting capture
Explore Daily →

📂 Vault Server

Browse and view your knowledge vault. Local and remote file browsing with markdown rendering.

  • 10 files total
  • Markdown viewer
  • Remote file browser
  • Syntax highlighting
Explore Vault →

State Management

The app uses Riverpod for state management with clear patterns for different use cases:

Type Use For Example
Provider<T> Singleton services fileSystemServiceProvider
FutureProvider<T>.autoDispose Async data that should refresh chatSessionsProvider
StateNotifierProvider Complex mutable state chatMessagesProvider
StreamProvider Reactive streams streamingTranscriptionProvider
StateProvider Simple UI state currentTabIndexProvider
AsyncNotifierProvider Async state with mutations serverUrlProvider
Important: Use .autoDispose for FutureProviders with dynamic/paginated content to prevent memory leaks.

Core Providers

Key providers that drive the app's behavior:

lib/core/providers/app_state_provider.dart
// App flavor (compile-time)
const String appFlavor = String.fromEnvironment('FLAVOR', defaultValue: 'client');

bool get isDailyOnlyFlavor => appFlavor == 'daily';
bool get isClientFlavor => appFlavor == 'client';
bool get isComputerFlavor => appFlavor == 'computer';

// App mode (runtime)
enum AppMode {
  dailyOnly,  // No server configured
  full,       // Server configured, all features
}

// Visible tabs based on mode
final visibleTabsProvider = Provider>((ref) {
  final mode = ref.watch(appModeProvider);
  return switch (mode) {
    AppMode.dailyOnly => [AppTab.daily],
    AppMode.full => [AppTab.chat, AppTab.daily, AppTab.vault],
  };
});

Navigation Architecture

Three-tab layout with persistent bottom navigation. Each tab has its own Navigator for independent navigation stacks:

┌─────────────────────────────────────────────────────────────┐
│                        TabShell                              │
│                                                              │
│  ┌─────────────────────────────────────────────────────┐    │
│  │                  Current Tab View                    │    │
│  │                                                      │    │
│  │  ┌──────────────────────────────────────────────┐   │    │
│  │  │                 Navigator                     │   │    │
│  │  │     (independent stack per tab)               │   │    │
│  │  │                                               │   │    │
│  │  │   [Screen1] → [Screen2] → [Screen3]          │   │    │
│  │  │                                               │   │    │
│  │  └──────────────────────────────────────────────┘   │    │
│  │                                                      │    │
│  └─────────────────────────────────────────────────────┘    │
│                                                              │
│  ┌─────────────────────────────────────────────────────┐    │
│  │              Bottom Navigation Bar                   │    │
│  │                                                      │    │
│  │     [Chat]        [Daily]        [Vault]            │    │
│  │                      ▲                               │    │
│  │               (center, default)                      │    │
│  └─────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────┘
                    
Key principle: Daily works offline. Chat and Vault require server connection.

Platform Support

Feature Desktop (macOS) Mobile (Android/iOS) Web
Transcription FluidAudio (CoreML) Sherpa-ONNX (Parakeet) Not supported
Embeddings Ollama flutter_gemma Server-side
Omi Pendant Supported (BLE) Supported (BLE) Not supported
Lima VM Supported (Computer) N/A N/A
File System Full access (sandboxed) App storage Sandboxed
Sherpa-ONNX Version Pin: The app pins sherpa_onnx to version 1.12.20. Version 1.12.21 has a native library crash (SIGSEGV) on certain ARM devices like Daylight DC-1.

Theme System

Design tokens define the visual language:

Brand Colors

  • Forest: #2D5A4A (primary)
  • Turquoise: #40E0D0 (accent)
  • Cream: #FAFAF8 (light bg)
  • Charcoal: #1C1C1E (dark text)
  • Night Surface: #121212 (dark bg)

Typography

  • Font: Inter (Google Fonts)
  • Display: 57px - 36px
  • Headline: 32px - 24px
  • Body: 16px - 14px
  • Label: 14px - 11px

Key Files

Purpose File Lines
App entry & navigation lib/main.dart ~300
Chat state management lib/features/chat/providers/chat_providers.dart ~800
Chat API service lib/features/chat/services/chat_service.dart 2,059
Journal state lib/features/daily/journal/providers/journal_providers.dart ~400
Live transcription lib/features/daily/recorder/services/live_transcription_service_v3.dart ~500
File system operations lib/core/services/file_system_service.dart 1,127
Message rendering lib/features/chat/widgets/message_bubble.dart ~600

Key Dependencies

Package Version Purpose
flutter_riverpod 2.6.1 State management
flutter_markdown 0.7.0 Markdown rendering
sherpa_onnx 1.12.20 (pinned) Local transcription
flutter_blue_plus 1.33.6 Omi BLE connection
web_socket_channel 3.0.0 Chat streaming
record 5.0.4 Audio recording
google_fonts 6.1.0 Typography (Inter)

Next Steps