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
code
src/ ├── shared/callable/ # Factory, app creation, types.d.ts ├── main/callable/ # Service injection └── renderer/src/adapters/ # Type-safe hc client
Quick Start
bash
pnpm add hono @hono/zod-validator zod
typescript
// 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
- •cqrs-pattern - Query/Command separation
- •hono-ipc-routes - Route implementation