Park Four Emblem Park Four
Part 1: Gateway Service
Signal to iMessage Gateway
Node.js service managing Signal-side groups, thread roster mappings, Tapback conversions, and signal-cli JSON-RPC communication.
github.com/parkfour/signal-imessage-gateway
Part 2: Relay Daemon
iMessage & SMS Relay Daemon
Native headless macOS daemon linking against Apple's private IMCore frameworks, providing a REST API and outbox retry queue for iMessage and SMS.
github.com/parkfour/crapple-relay

System Architecture

The system is split cleanly across two physical hosts or runtime environments to respect Apple's macOS ecosystem boundaries while enabling seamless operation from any primary Signal device:

                      +-------------------+
                      |   Your Primary    |
                      |   Signal Phone    |
                      +---------+---------+
                                |  (Signal Protocol)
                                v
+-------------------------------+-------------------------------+
| Gateway Host (Linux VPS, Server, or Local Node)               |
|                                                               |
|   +------------------+         +--------------------------+   |
|   |  signal-cli RPC  |<------->|        bridge.js         |   |
|   |      Daemon      |         |  (Express + SQLite WAL)  |   |
|   +------------------+         +-------------+------------+   |
+----------------------------------------------|----------------+
                                               |  Encrypted Private Network
                                               |  (Tailscale / WireGuard / LAN)
                                               v
+----------------------------------------------+----------------+
| macOS Host (macOS 12+ running Native Relay Daemon)            |
|                                                               |
|   +-----------------------+     +-------------------------+   |
|   |  HTTP Relay Daemon    |<--->|   macOS iMessage Stack  |   |
|   |   (crapple-relay)     |     |   (Apple Private IMCore)|   |
|   +-----------------------+     +-------------------------+   |
+---------------------------------------------------------------+

How the Two Parts Work Together

Component Role & Technology Responsibilities
Part 1: Gateway Service
signal-imessage-gateway
Node.js • Express • SQLite (WAL) • signal-cli
  • Maintains private Signal group chats mapped 1-to-1 with external iMessage contacts or group chats.
  • Translates Signal emoji reactions into native Apple Tapback events.
  • Synchronizes multi-party group chat rosters with automatic inbound sender attribution.
  • Supports interactive diagnostics: are you there?, /ping, /restart, /info.
Part 2: Relay Daemon
crapple-relay
Objective-C • Mach XPC • Private IMCore • launchd
  • Runs 24/7 as a background macOS LaunchAgent; Messages.app does not need to be open.
  • Directly interfaces with Apple's imagent to transmit and receive iMessages, Tapbacks, and SMS.
  • Observes local chat.db with persistent state tracking and an outbox queue with exponential backoff retry.
  • Secured with HTTP Bearer token authentication and system logging via Apple Unified Logging (os_log).

Key Features

  • Bidirectional Messaging: Send and receive text messages seamlessly between Signal and Apple iMessage.
  • Multi-Party Group Chats: Automatic thread creation, participant roster synchronization, and clear inbound sender attribution ([<sender>]: <message>). Outbound replies route directly back to the iMessage group without requiring sender prefixes.
  • Native Tapback Reactions: Signal emoji reactions are mapped directly to native Apple Tapbacks (Love, Like, Dislike, Laugh, Emphasize, Question) and sent to both 1-on-1 and group chats.
  • Rich Media Support: Transfer photos (JPEG, PNG, HEIC, WebP, GIF), audio messages, and video recordings (MP4, MOV).
  • Persistent Outbox Queue: If the gateway or network undergoes temporary downtime, incoming iMessages are persisted on macOS and retried in strict FIFO order until HTTP 200 delivery confirmation is received.
  • Zero Disruption to Signal: Every iMessage contact or group conversation maps to an isolated Signal group chat between you and the bot. You can rename the groups anytime in Signal without breaking routing.

Reaction (Tapback) Mapping

Signal Emoji Reaction Apple iMessage Tapback
❤️ Love
👍 Like
👎 Dislike
😂 Laugh
‼️ Emphasize
❓ Question
Other emojis Fallback to Like

Network Topologies

The two services communicate over an authenticated HTTP REST interface (port 5569) secured by Bearer tokens. Recommended deployment topologies include:

  • Encrypted Private Mesh (Recommended): Run the gateway on a Linux VPS and the relay on an always-on Mac mini connected via Tailscale or WireGuard. No public router port forwarding is required.
  • Local Area Network (LAN): Run both hosts on the same private home or office network using static local IP addresses.
  • Single-Node Deployment: Run both signal-cli, the Node.js gateway, and the native relay daemon directly on the same macOS machine communicating over loopback (127.0.0.1).