Hono Ipc Setup

Set up Hono-based type-safe IPC for Electron. Use when implementing IPC or migrating from ipcRenderer to type-safe RPC.

naporin0624 Updated

File contents

Hono Electron IPC Setup

Resources

Topic File
Why shared/ directory SHARED-DIRECTORY.md
Factory pattern with DI FACTORY-PATTERN.md
Hono RPC API reference REFERENCE.md

Directory Structure

src/
├── shared/callable/        # Factory, app creation, types.d.ts
├── main/callable/          # Service injection
└── renderer/src/adapters/  # Type-safe hc client

Quick Start

pnpm add hono @hono/zod-validator zod
// Type export: src/shared/callable/types.d.ts
export type CallableType = ReturnType<typeof createApp>;

// Client: src/renderer/src/adapters/client.ts
export const client = hc<CallableType>('http://internal.localhost', { ... });

Related Skills

naporin0624/claude-plugin-hono-electron/tree/main/skills/hono-ipc-setup commit 091b407651

Frequently asked questions

npx skillmds@latest add naporin0624/hono-ipc-setup