Skip to content

Conversation

@lucasheriques
Copy link
Contributor

@lucasheriques lucasheriques commented Oct 25, 2025

Notetaker: Meeting Recording & Transcription

Automatic recording and transcription for Google Meet, Zoom, Teams, and Slack.

Architecture

Key decision: Zustand is the single source of truth. Main process only coordinates.

Why Zustand for state management:

  • React focuses on UI - Components subscribe to Zustand and re-render automatically
  • Fast client-side interactions - Real-time transcript updates, notes editing, all local-first
  • Batch sync to backend - Upload every 10 segments/10s instead of per-segment (reduces API load)
  • IndexedDB persistence - Crash recovery without losing active meeting data
  • Simple architecture - Main process forwards events, doesn't manage meeting state
flowchart TB
    subgraph Main["Main Process (recallRecording.ts)"]
        Recall[Recall SDK]
        Flag[isRecording flag]
        Map[windowToRecordingMap]
    end

    subgraph Renderer["Renderer (recordingService.ts)"]
        Zustand[Zustand Store]
        Batch[Batch Upload<br/>10 segments or 10s]
    end

    Recall -->|meeting-detected| Flag
    Flag -->|if false| Recall
    Recall -->|IPC: events| Zustand
    Zustand -->|persist| IDB[(IndexedDB)]
    Zustand -->|subscribe| UI[React UI]
    Batch -->|segments| API[PostHog API]
    Zustand -.->|triggers| Batch

    style Zustand fill:#4CAF50
    style Flag fill:#FFC107
Loading

Data flows:

  1. Meeting starts → Recall detects → Main checks isRecording → Creates recording in API → Sends IPC → Zustand stores → UI updates
  2. Transcript arrives → Recall forwards → IPC → Zustand stores → UI updates live → Batch upload every 10 segments/10s
  3. Meeting ends → Recall notifies → Upload remaining segments → Video uploads → Status "ready" → Zustand clears → UI shows in past meetings

State:

  • Main: isRecording (deduplication), windowToRecordingMap (Recall SDK only provides windowId, we need to map it to our recordingId)
  • Zustand: segments, status, notes (persisted to IndexedDB)

Current Limitations

  • One meeting at a time - isRecording flag prevents concurrent recordings (by design for v1)
  • No retry UI - Segment upload failures are logged but not exposed to user (crash recovery handles most cases)
  • No metrics yet to track success/failure on meeting recordings - will work on those after I finish a v0

What to Review

Core files:

  • src/main/services/recallRecording.ts - Recall SDK integration, event forwarding
  • src/renderer/services/recordingService.ts - IPC handlers, batch uploads, crash recovery
  • src/renderer/stores/activeRecordingStore.ts - Recording state management

Watch for:

  • Main process forwards events, doesn't manage state
  • Types use Schemas.DesktopRecording from generated API (not custom interfaces)
  • Deduplication is a simple isRecording boolean check (no IPC)

Special thanks to @rafaeelaudibert on his tip to keep all Recall's state outside of React. ❤️

Copy link
Contributor Author

lucasheriques commented Oct 25, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lucasheriques lucasheriques force-pushed the feat/recall-sdk-integration branch 5 times, most recently from 68ae01b to 5ffb727 Compare October 27, 2025 14:43
@lucasheriques lucasheriques force-pushed the feat/recall-sdk-integration branch from 5ffb727 to b5f4955 Compare October 27, 2025 16:25
@lucasheriques lucasheriques force-pushed the feat/recall-sdk-integration branch 8 times, most recently from f7f85a9 to ef6bc29 Compare October 28, 2025 19:00
@lucasheriques lucasheriques marked this pull request as ready for review October 28, 2025 19:06
@lucasheriques lucasheriques requested review from jonathanlab, k11kirky and rafaeelaudibert and removed request for jonathanlab October 28, 2025 19:24
@lucasheriques lucasheriques force-pushed the feat/recall-sdk-integration branch from ef6bc29 to 21f1235 Compare October 28, 2025 20:28
Add Recall.ai Desktop SDK integration for automatic detection and
recording of Zoom, Teams, and Google Meet meetings with real-time
status updates and management UI.

Features:
- Automatic meeting detection (Zoom/Teams/Google Meet)
- Recording lifecycle with status updates (recording → uploading → processing)
- Notetaker UI for viewing and managing recordings
- PostHog backend integration for storage and backup
- IPC handlers for renderer/main process communication

Security:
- Proper URL hostname validation (prevents substring injection)
- UUID validation for recording IDs (prevents path traversal)
- Title-based detection only as fallback with warning logs

Architecture:
- Recall SDK runs in main process with event listeners
- PostHog API client for CRUD operations on recordings
- Zustand store for UI state management
- Status updates via IPC from main to renderer

Configuration:
- Vite: externalize Recall SDK (prevent bundling)
- Forge: unpack Recall SDK from asar archive
- Initialize SDK automatically on authentication

This PR implements Phase 1B of the desktop recordings feature,
providing the foundation for future transcript streaming and
note-taking capabilities.
Copy link
Contributor

@jonathanlab jonathanlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff, I like the IDB usage 🚢

Copy link
Contributor Author

lucasheriques commented Oct 29, 2025

Merge activity

  • Oct 29, 12:55 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 29, 12:55 PM UTC: @lucasheriques merged this pull request with Graphite.

@lucasheriques lucasheriques merged commit 4f23334 into main Oct 29, 2025
6 checks passed
@lucasheriques lucasheriques deleted the feat/recall-sdk-integration branch October 29, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants