Skip to main content
Rowboat uses a monorepo structure with multiple applications and a nested pnpm workspace for the Electron app.

Top-Level Structure

Electron App Workspace (apps/x)

The Electron app is a nested pnpm workspace with its own package management and build system.

Directory Layout

Workspace Configuration

The pnpm workspace is configured in apps/x/pnpm-workspace.yaml:
The onlyBuiltDependencies field ensures that only these packages are built during installation, improving build performance.

Package Descriptions

Internal Packages

@x/shared

Contains shared types, utilities, and validators used across all workspace packages.
  • Dependencies: Zod for schema validation
  • Purpose: Type definitions, common utilities
  • Build: TypeScript compilation only

@x/core

Contains core business logic and integrations:
  • AI provider integrations (Vercel AI SDK, Anthropic, OpenAI, Google)
  • OAuth and authentication
  • Model Context Protocol (MCP) implementation
  • Document parsing (PDF, CSV, XLSX, DOCX)
  • Git operations
@x/core depends on @x/shared via the workspace:* protocol. Always build shared before core.

Application Packages

apps/main

The Electron main process:
  • Entry: apps/main/src/main.ts
  • Output: .package/dist/main.cjs (bundled with esbuild)
  • Depends on: @x/shared, @x/core

apps/renderer

The React UI:
  • Entry: apps/renderer/src/main.tsx
  • Output: apps/renderer/dist/ (bundled with Vite)
  • Depends on: @x/shared
  • Hot-reloads in development mode

apps/preload

Electron preload scripts for secure IPC:
  • Entry: apps/preload/src/preload.ts
  • Output: apps/preload/dist/preload.js
  • Depends on: @x/shared

Workspace Dependencies

Packages reference each other using pnpm’s workspace:* protocol:
The workspace:* protocol tells pnpm to symlink local packages instead of installing from npm. This is why pnpm is required.

Build Dependencies

The workspace has a specific build order based on dependencies:
The npm run deps command in the workspace root builds packages in order:

Key Files Reference