### Start Recording Command (Frontend to Rust) Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Example of how the frontend invokes the 'start_recording' command in the Rust backend, passing microphone, system audio device names, and meeting name. ```typescript // Frontend: src/app/page.tsx await invoke('start_recording', { mic_device_name: "Built-in Microphone", system_device_name: "BlackHole 2ch", meeting_name: "Team Standup" }); ``` -------------------------------- ### Clone and Build Meetily Frontend Source: https://github.com/zackriya-solutions/meetily/blob/main/README.md This snippet shows how to clone the Meetily repository, navigate to the frontend directory, install dependencies, and build the frontend with GPU acceleration. It's a quick start for developers wanting to build the application from source on Linux. ```bash git clone https://github.com/Zackriya-Solutions/meeting-minutes cd meeting-minutes/frontend pnpm install ./build-gpu.sh ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Installs project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Build and Run Meetily on Linux Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/building_in_linux.md Executes the build scripts for development or production. The scripts automatically handle GPU acceleration setup based on detected hardware and installed SDKs. ```bash # Development mode (with hot reload) ./dev-gpu.sh # Production build ./build-gpu.sh ``` -------------------------------- ### Run Frontend Development Server Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Starts the Next.js development server for the frontend. ```bash pnpm run dev ``` -------------------------------- ### Build with NVIDIA GPU (CUDA) Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/building_in_linux.md Install NVIDIA drivers and CUDA toolkit, verify installation, and build the project using CUDA. Adjust CMAKE_CUDA_ARCHITECTURES for your specific GPU. ```bash # Install sudo apt install nvidia-driver-550 nvidia-cuda-toolkit # Verify nvidia-smi --query-gpu=compute_cap --format=csv # Build (adjust architecture for your GPU) CMAKE_CUDA_ARCHITECTURES=86 \ CMAKE_CUDA_STANDARD=17 \ CMAKE_POSITION_INDEPENDENT_CODE=ON \ ./build-gpu.sh ``` -------------------------------- ### Build with Any GPU (Vulkan) Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/building_in_linux.md Install the Vulkan SDK and OpenBLAS, configure necessary environment variables for Vulkan SDK and BLAS include directories, and then build the project. ```bash # Install sudo apt install vulkan-sdk libopenblas-dev # Configure export VULKAN_SDK=/usr export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu # Build ./build-gpu.sh ``` -------------------------------- ### macOS Installation Prerequisites Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Installs Homebrew, Node.js, Rust, pnpm, and Xcode Command Line Tools on macOS. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install node curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh npm install -g pnpm xcode-select --install ``` -------------------------------- ### Install Basic Dependencies on Linux Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Installs essential build tools like compilers, CMake, and Git for Ubuntu/Debian, Fedora/RHEL, or Arch Linux. ```bash # Ubuntu/Debian sudo apt update sudo apt install build-essential cmake git ``` ```bash # Fedora/RHEL sudo dnf install gcc-c++ cmake git ``` ```bash # Arch Linux sudo pacman -S base-devel cmake git ``` -------------------------------- ### Install NVIDIA CUDA Toolkit Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Installs the NVIDIA driver and CUDA toolkit on Ubuntu/Debian systems. Verifies the installation using nvidia-smi and nvcc. ```bash # Ubuntu/Debian (CUDA 12.x) sudo apt install nvidia-driver-550 nvidia-cuda-toolkit # Verify installation nvidia-smi # Shows GPU info nvcc --version # Shows CUDA version ``` -------------------------------- ### Troubleshooting Vulkan Dependencies Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Provides example environment variable settings for VULKAN_SDK and BLAS_INCLUDE_DIRS to resolve issues when Vulkan is detected but dependencies are missing. ```bash export VULKAN_SDK=/usr export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu ``` -------------------------------- ### Build with CPU-only Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/building_in_linux.md Build the project for CPU-only execution. This configuration works out of the box without additional hardware-specific installations or configurations. ```bash # Just build - works out of the box ./build-gpu.sh ``` -------------------------------- ### Start Recording Command Implementation (Rust) Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Rust implementation of the 'start_recording' Tauri command, which accepts optional device names and meeting name, delegating to audio recording commands. ```rust // Rust: src/lib.rs #[tauri::command] async fn start_recording( app: AppHandle, mic_device_name: Option, system_device_name: Option, meeting_name: Option ) -> Result<(), String> { // Implementation delegates to audio::recording_commands } ``` -------------------------------- ### Build with AMD GPU (ROCm) Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/building_in_linux.md Install ROCm and hipcc, set the ROCM_PATH environment variable, and build the project. Refer to AMD documentation for specific ROCm installation steps for your distribution. ```bash # Install ROCm (see AMD docs for your distro) sudo apt install rocm-smi hipcc export ROCM_PATH=/opt/rocm # Build ./build-gpu.sh ``` -------------------------------- ### Install Vulkan SDK and BLAS Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Installs the Vulkan SDK and OpenBLAS development libraries on Ubuntu/Debian, Fedora, and Arch Linux systems. ```bash # Ubuntu/Debian sudo apt install vulkan-sdk libopenblas-dev # Fedora sudo dnf install vulkan-devel openblas-devel # Arch Linux sudo pacman -S vulkan-devel openblas ``` -------------------------------- ### Install Homebrew and Tools on macOS Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Installs Homebrew package manager and essential development tools like CMake, Node.js, and pnpm on macOS. ```bash # Install Homebrew (if not already installed) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install required tools brew install cmake node pnpm ``` -------------------------------- ### Install AMD ROCm Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Installs the ROCm-SMI and HIPCC components for AMD GPU acceleration on Ubuntu/Debian. Sets the ROCm path and verifies the installation. ```bash # Ubuntu/Debian # Add ROCm repository (see https://rocm.docs.amd.com for latest) sudo apt install rocm-smi hipcc # Set environment export ROCM_PATH=/opt/rocm # Verify rocm-smi # Shows GPU info hipcc --version # Shows ROCm version # Build ./build-gpu.sh ``` -------------------------------- ### Build and Run Tauri App on macOS Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Commands to start the Tauri application in development mode with hot reload or to create a production build on macOS. ```bash # Development mode (with hot reload) pnpm tauri:dev # Production build pnpm tauri:build ``` -------------------------------- ### Get Notification Settings Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/NOTIFICATION_TESTING.md Retrieve the current notification settings for the application. This can help in understanding the state of the notification system. ```javascript await invoke('get_notification_settings'); ``` -------------------------------- ### Emit Transcript Update Event (Rust to Frontend) Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Example of Rust code emitting a 'transcript-update' event to the frontend, containing the transcribed text and a timestamp. ```rust // Rust: Emit transcript updates app.emit("transcript-update", TranscriptUpdate { text: "Hello world".to_string(), timestamp: chrono::Utc::now(), // ... })?; ``` -------------------------------- ### Clone Repository and Navigate Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Clones the Meetily repository and changes the directory to the frontend folder. ```bash git clone https://github.com/Zackriya-Solutions/meeting-minutes cd meeting-minutes/frontend ``` -------------------------------- ### Manual Frontend Dependency and Development Commands Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Standard commands for managing frontend dependencies and running development servers for the Tauri desktop application. ```bash # Manual Commands pnpm install # Install dependencies pnpm run dev # Next.js dev server (port 3118) pnpm run tauri:dev # Full Tauri development mode pnpm run tauri:build # Production build ``` -------------------------------- ### Build Windows Production App Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Executes the batch script to build a production version of the Meetily app on Windows. ```cmd clean_build_windows.bat ``` -------------------------------- ### Windows Frontend Development Commands Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Commands for cleaning, building, and running the Tauri desktop application on Windows. ```batch # Windows Development clean_run_windows.bat # Clean build and run clean_build_windows.bat # Production build ``` -------------------------------- ### Frontend GPU-Specific Development Builds Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Commands to run the Tauri development mode with specific GPU acceleration options for testing performance. ```bash # GPU-Specific Builds (for testing acceleration) pnpm run tauri:dev:metal # macOS Metal GPU pnpm run tauri:dev:cuda # NVIDIA CUDA pnpm run tauri:dev:vulkan # AMD/Intel Vulkan pnpm run tauri:dev:cpu # CPU-only (no GPU) ``` -------------------------------- ### Build and Run Meetily on Linux Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Executes the build scripts for Meetily. Use 'dev-gpu.sh' for development with hot reloading or 'build-gpu.sh' for a production build. ```bash # Development mode (with hot reload) ./dev-gpu.sh ``` ```bash # Production build ./build-gpu.sh ``` -------------------------------- ### Test Notification Immediately Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/NOTIFICATION_TESTING.md Invoke this command from your frontend to quickly test if notifications are working. It initializes the notification system and shows a test notification automatically. ```javascript await invoke('test_notification_with_auto_consent'); ``` -------------------------------- ### Run Tauri Dev and Build Scripts Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Uses pnpm package scripts to run the Tauri development server or build the application. ```bash pnpm run tauri:dev pnpm run tauri:build ``` -------------------------------- ### Run Windows App in Development Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Executes the batch script to run the Meetily app in development mode on Windows. ```cmd clean_run_windows.bat ``` -------------------------------- ### Loading and Validating Templates in Rust Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/templates/README.md Demonstrates how to use the `templates` module to retrieve a specific template, list all available templates, and validate custom template JSON. ```rust use crate::summary::templates; // Get a specific template let template = templates::get_template("daily_standup")?; // List available templates let available = templates::list_templates(); // Validate custom template JSON let custom_json = std::fs::read_to_string("custom.json")?; let validated = templates::validate_template(&custom_json)?; ``` -------------------------------- ### Clone Repository Source: https://github.com/zackriya-solutions/meetily/blob/main/CONTRIBUTING.md Clone your forked repository to your local machine. ```bash git clone https://github.com/YOUR_USERNAME/meeting-minutes.git ``` -------------------------------- ### Build macOS Production App Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Executes the script to build a production version of the Meetily app on macOS. ```bash ./clean_build.sh ``` -------------------------------- ### Initialize Notification System Manually Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/NOTIFICATION_TESTING.md Use this sequence to manually initialize the notification system before showing a test notification. This provides more control over the initialization process. ```javascript // Initialize the notification system await invoke('initialize_notification_manager_manual'); // Then show a test notification await invoke('show_test_notification'); ``` -------------------------------- ### macOS Frontend Development Commands Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Use these commands for cleaning, building, and running the Tauri desktop application on macOS. Includes options for info and debug logging. ```bash # macOS Development ./clean_run.sh # Clean build and run with info logging ./clean_run.sh debug # Run with debug logging ./clean_build.sh # Production build ``` -------------------------------- ### System Status and Testing Commands Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/NOTIFICATION_TESTING.md A collection of commands for checking the readiness of the notification system, retrieving statistics, and performing various tests. These are useful for development and debugging. ```javascript // System status await invoke('is_notification_system_ready'); await invoke('get_system_dnd_status'); await invoke('get_notification_stats'); // Permissions and consent await invoke('request_notification_permission'); await invoke('set_notification_consent', { consent: true }); // Testing await invoke('test_notification_with_auto_consent'); await invoke('show_test_notification'); // Settings await invoke('get_notification_settings'); ``` -------------------------------- ### Run macOS App in Development Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Executes the script to run the Meetily app in development mode on macOS. ```bash ./clean_run.sh ``` -------------------------------- ### Build with NVIDIA CUDA Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Builds the project with CUDA support, optimizing for a specific GPU's compute capability and ensuring C++17 compatibility. Sets position-independent code to fix linking issues. ```bash # Set your GPU's compute capability # Example: RTX 3080 = 8.6 → use "86" # Example: GTX 1080 = 6.1 → use "61" CMAKE_CUDA_ARCHITECTURES=75 \ CMAKE_CUDA_STANDARD=17 \ CMAKE_POSITION_INDEPENDENT_CODE=ON \ ./build-gpu.sh ``` -------------------------------- ### Verify Audio File Properties with ffprobe Source: https://github.com/zackriya-solutions/meetily/blob/main/BLUETOOTH_PLAYBACK_NOTICE.md Use ffprobe to check the sample rate, channels, and codec of an audio file. Ensure the sample rate is 48000, channels are 1, and the codec is aac for accurate playback. ```bash # In terminal: ffprobe path/to/recording/audio.mp4 ``` -------------------------------- ### Sample Rate Chain for Audio Playback Source: https://github.com/zackriya-solutions/meetily/blob/main/BLUETOOTH_PLAYBACK_NOTICE.md Illustrates the audio processing pipeline for both computer speaker and Bluetooth playback on macOS, highlighting potential resampling issues with Bluetooth. ```text Recording Pipeline: Microphone (16kHz) → Resample to 48kHz → Pipeline (48kHz) System Audio (48kHz) → No resampling → Pipeline (48kHz) Mixed Audio (48kHz) → Encode → File (48kHz AAC) Playback (Computer Speakers): File (48kHz) → macOS CoreAudio → Speakers (48kHz) ✅ Playback (Bluetooth): File (48kHz) → macOS CoreAudio → Bluetooth Stack → Resample → BT Device (16-48kHz) ⚠️ ↑ This step can fail! ``` -------------------------------- ### Configure Vulkan Environment Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/BUILDING.md Sets the VULKAN_SDK and BLAS_INCLUDE_DIRS environment variables, typically added to ~/.bashrc or ~/.zshrc for persistent configuration. ```bash # Add to ~/.bashrc or ~/.zshrc export VULKAN_SDK=/usr export BLAS_INCLUDE_DIRS=/usr/include/x86_64-linux-gnu # Apply changes source ~/.bashrc ``` -------------------------------- ### Performance-Optimized Logging Macros Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/LOGGING_OPTIMIZATIONS.md Use these macros in performance-critical code paths. They have zero cost in release builds. ```rust use crate::{perf_debug, perf_trace}; // Use performance-optimized macros in hot paths perf_debug!("Processing chunk {}", chunk_id); // Zero cost in release // Use async logging for non-critical info async_info!("Status update: {}", status); // Non-blocking ``` -------------------------------- ### Enable Rust Logging on Windows Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Use this PowerShell command to enable debug logging for Rust applications on Windows. Ensure you are in the correct directory. ```powershell # Windows (PowerShell) $env:RUST_LOG="debug"; ./clean_run_windows.bat ``` -------------------------------- ### Standard and Batched Logging for Errors and Warnings Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/LOGGING_OPTIMIZATIONS.md Always use standard logging for errors. Use batched logging for frequent warnings to reduce overhead. ```rust // Always use standard logging for errors (don't optimize away) log::error!("Critical error: {}", error); // Use batched logging for frequent warnings if error_count % 100 == 1 { log::warn!("Frequent warning (showing every 100th): {}", warning); } ``` -------------------------------- ### Tauri Desktop App Architecture Overview Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Visual representation of the Meetily desktop application's components, including the Next.js UI, Rust backend, and Whisper Engine for local speech-to-text. ```text ┌─────────────────────────────────────────────────────────────────┐ │ Frontend (Tauri Desktop App) │ │ ┌──────────────────┐ ┌─────────────────┐ ┌────────────────┐ │ │ │ Next.js UI │ │ Rust Backend │ │ Whisper Engine │ │ │ │ (React/TS) │←→│ (Audio + IPC) │←→│ (Local STT) │ │ │ └──────────────────┘ └─────────────────┘ └────────────────┘ │ │ ↑ Tauri Events ↑ Audio Pipeline │ └─────────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Shared Recording State in Rust Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Demonstrates thread-safe sharing of recording state across asynchronous tasks using Arc and RwLock. ```rust pub struct RecordingState { is_recording: Arc, audio_sender: Arc>>>, // ... } ``` -------------------------------- ### Enable Verbose Audio Logging Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Enable verbose logging for the audio module by setting the `RUST_LOG` environment variable. This is useful for debugging audio pipeline behavior. ```bash # Enable verbose audio logging RUST_LOG=app_lib::audio=debug ./clean_run.sh ``` -------------------------------- ### Run macOS App with Debug Log Level Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Runs the Meetily app in development mode with the 'debug' log level specified on macOS. ```bash ./clean_run.sh debug ``` -------------------------------- ### Show Test Notification Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/src-tauri/NOTIFICATION_TESTING.md Invoke this command to display a predefined test notification. This is useful for verifying the notification display mechanism. ```javascript await invoke('show_test_notification'); ``` -------------------------------- ### Audio Module Structure Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Directory structure for the modularized audio system, detailing components for device discovery, capture, pipeline management, and saving. ```text audio/ ├── devices/ # Device discovery and configuration │ ├── discovery.rs # list_audio_devices, trigger_audio_permission │ ├── microphone.rs # default_input_device │ ├── speakers.rs # default_output_device │ ├── configuration.rs # AudioDevice types, parsing │ └── platform/ # Platform-specific implementations │ ├── windows.rs # WASAPI logic (~200 lines) │ ├── macos.rs # ScreenCaptureKit logic │ └── linux.rs # ALSA/PulseAudio logic ├── capture/ # Audio stream capture │ ├── microphone.rs # Microphone capture stream │ ├── system.rs # System audio capture stream │ └── core_audio.rs # macOS ScreenCaptureKit integration ├── pipeline.rs # Audio mixing and VAD processing ├── recording_manager.rs # High-level recording coordination ├── recording_commands.rs # Tauri command interface └── recording_saver.rs # Audio file writing ``` -------------------------------- ### Transcode Audio to 44.1kHz with ffmpeg Source: https://github.com/zackriya-solutions/meetily/blob/main/BLUETOOTH_PLAYBACK_NOTICE.md Use this command to transcode an audio file to 44.1kHz, which may offer better compatibility with Bluetooth devices than 48kHz. ```bash ffmpeg -i audio.mp4 -ar 44100 audio_44k.mp4 ``` -------------------------------- ### Enable Rust Logging on macOS Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Use this command to enable debug logging for Rust applications on macOS. Ensure you are in the correct directory. ```bash # macOS RUST_LOG=debug ./clean_run.sh ``` -------------------------------- ### Create Feature Branch Source: https://github.com/zackriya-solutions/meetily/blob/main/CONTRIBUTING.md Create a new feature branch from the 'devtest' branch. ```bash git checkout devtest git pull upstream devtest git checkout -b feature/your-feature-name ``` -------------------------------- ### Define a New Tauri Command in Rust Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Define a new asynchronous Tauri command in `src/lib.rs`. Ensure the command is registered in the `tauri::Builder` to be accessible from the frontend. ```rust #[tauri::command] async fn my_command(arg: String) -> Result { /* ... */ } ``` -------------------------------- ### Listen for Transcript Update Event (Frontend) Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Frontend TypeScript code demonstrating how to listen for 'transcript-update' events emitted from the Rust backend and update the UI state. ```typescript // Frontend: Listen for events await listen('transcript-update', (event) => { setTranscripts(prev => [...prev, event.payload]); }); ``` -------------------------------- ### Add Upstream Remote Source: https://github.com/zackriya-solutions/meetily/blob/main/CONTRIBUTING.md Add the original repository as an upstream remote to fetch changes. ```bash git remote add upstream https://github.com/Zackriya-Solutions/meeting-minutes.git ``` -------------------------------- ### Enable CUDA Feature in Cargo.toml Source: https://github.com/zackriya-solutions/meetily/blob/main/docs/GPU_ACCELERATION.md To manually enable CUDA GPU acceleration, modify the [features] section in frontend/src-tauri/Cargo.toml to include the 'cuda' feature. ```toml [features] default = ["cuda"] # ... other features cuda = ["whisper-rs/cuda"] ``` -------------------------------- ### Register Tauri Command in Builder Source: https://github.com/zackriya-solutions/meetily/blob/main/CLAUDE.md Register the newly defined Tauri command within the `tauri::Builder`'s `invoke_handler` to make it available for frontend invocation. ```rust .invoke_handler(tauri::generate_handler![ start_recording, my_command, // Add here ]) ``` -------------------------------- ### Make Scripts Executable on macOS Source: https://github.com/zackriya-solutions/meetily/blob/main/frontend/README.md Changes the permissions of shell scripts to make them executable on macOS. ```bash chmod +x clean_run.sh clean_build.sh ``` -------------------------------- ### Commit Message Format Source: https://github.com/zackriya-solutions/meetily/blob/main/CONTRIBUTING.md Standard format for commit messages, including type, scope, subject, body, and footer. ```text ():