Skip to content

makp0/electron-trpc-experimental

 
 

Repository files navigation

electron-trpc

NPM MIT

Build IPC for Electron with tRPC

  • Expose APIs from Electron's main process to one or more render processes.
  • Build fully type-safe IPC.
  • Secure alternative to opening servers on localhost.
  • Full support for queries, mutations, and subscriptions.
  • NEW: Support for async generators and streaming data.

About This Fork

This is a fork of electron-trpc by @jsonnull with significant contributions from @mat-sz. This version includes:

  • Component Separation: Split into distinct main, preload, and renderer components for better organization
  • tRPC v11 Support: Updated to support the latest tRPC v11 features and improvements
  • Async Generators: Full support for async generators enabling real-time streaming data
  • Modern Architecture: Enhanced separation of concerns following Electron's security model

Installation

npm install electron-trpc-experimental

Quick Start

  1. Install the package and follow our Getting Started guide
  2. Explore the examples in the examples/ directory:

Documentation

📖 Complete Documentation

Features

  • Type-safe IPC - Full TypeScript support across main/preload/renderer processes
  • tRPC v11 Support - Latest tRPC features and improvements
  • Async Generators - Support for streaming data and real-time updates
  • Transformers - Use SuperJSON and other transformers for complex data types
  • Security-first - Built on Electron's context isolation for secure IPC

About

Build type-safe Electron inter-process communication using tRPC

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 80.3%
  • MDX 16.4%
  • JavaScript 1.7%
  • Nix 1.6%