Local-first network core

One local network core for every endpoint

Debuff gives Android, Linux, Windows, and macOS apps the same LAN foundation: peer discovery, trusted pairing, JSON messages, and byte streams. It stays local by default and keeps the UI boundary small.

47791default LAN port
Rustcore implementation
FFImulti-endpoint bridge
Devices connected over a private local network
Discoverymulticast + scan
TrustPIN + signatures
Transportmessage + stream

One contract across many endpoints

Debuff focuses on the pieces every local client keeps needing: find peers, identify them, decide who is trusted, and move data with bounded failures.

1

Peer discovery

UDP multicast announcements, HTTP probing, loopback smoke tests, and IPv4 CIDR scanning for practical LAN discovery.

2

Persistent identity

Each node keeps an Ed25519-backed identity and fingerprint, so apps can separate first-seen peers from trusted devices.

3

Pairing controls

Short-lived PIN pairing, manual accept or reject events, trusted-only mode, blocked peers, and nonce replay rejection.

4

Message envelopes

HTTP JSON messages carry topics and app payloads through a simple protocol that desktop and mobile UIs can inspect.

5

Binary streams

Raw byte streams and chunked transfer support payload hashes, receiver progress events, and sender-side cancellation.

6

Unified app boundary

A C ABI returns UTF-8 JSON strings, so Flutter, Dart, and future app shells can share the same Rust runtime contract.

From first packet to trusted session

The runtime is designed so product teams can wire clear UI states around the network lifecycle.

Step 01

Start a runtime

Choose an alias, port, state path, and trust policy. Debuff starts HTTP service and discovery listeners.

Step 02

Find peers

Broadcast on the local network, respond to announcements, or scan a known subnet when multicast is filtered.

Step 03

Trust deliberately

Pair with a code or let the UI confirm an inbound request before a peer becomes trusted.

Step 04

Move app data

Send JSON messages or binary streams with topic routing, signatures, timeouts, and size guardrails.

Rust core, compact bridge

The current implementation ships a CLI for smoke tests and a C ABI that higher-level apps can load dynamically on each supported platform.

# Run a local node
cargo run -- serve --alias alpha --port 47791

# Scan a LAN subnet
cargo run -- scan-subnet --subnet 192.168.1.0/24

# Package the FFI library
scripts/package_ffi.sh --sync-dart
Protocol markerdebuff.lan/0 with app-defined topics above it.
HTTP routesabout, meet, messages, streams, stream chunks, and pair endpoints.
Dart integrationThe `debuff_ffi` wrapper manages runtime handles, strings, and JSON decoding while preserving the same runtime shape on desktop and mobile.
Smoke friendlyCLI commands verify discovery, pairing, messaging, and stream transfer without a GUI.

Built for real apps, not demos only

Debuff is being exercised by five LAN game apps that need the same room, invitation, game-event, and snapshot-sync behavior across phone, desktop, and tablet.

Xiangqi over LAN

The first app on Debuff is a Flutter Chinese chess client. One host validates room events, guests join over the local network, and spectators can follow synchronized snapshots.

  • Room invitations use a local peer message topic.
  • Move proposals flow to the authoritative room host.
  • Snapshots repair client state after missed events.
  • Android, Linux, Windows, and macOS use the same Debuff runtime contract.

Junqi over LAN

The second app reuses the proven LAN pattern for two-player dark-chess Junqi, with red and blue armies, hidden opponent pieces, setup submission, battle disclosure, and synchronized endings.

  • Players see their own army at the bottom on every device.
  • The host validates setup, movement, combat, surrender, and victory.
  • Dark snapshots reveal only the information each viewer should see.
  • Android phone and tablet builds reuse the same LAN panel and pairing flow.

Gomoku over LAN

The third app uses the same host-authoritative room flow for casual 15 x 15 Gomoku, with local self-play, room play, spectators, and phone-friendly board sizing.

  • A full-width 15 x 15 board keeps mobile taps accurate.
  • The host validates every stone placement and win line.
  • Room snapshots keep black, white, and spectators in sync.
  • A dedicated board-and-stones icon separates it from Flutter defaults.

Reversi over LAN

The fourth app proves Debuff with an 8 x 8 Reversi rules engine, legal-move highlighting, flip animations, pass handling, and synchronized end scoring.

  • Legal moves are highlighted before each placement.
  • Flipped discs animate locally while the host remains authoritative.
  • Automatic passes and final piece counts stay synchronized.
  • The initial four-disc icon makes the app recognizable on Android.

Majiang over LAN

The fifth app extends the same LAN pattern into a two-player teaching Majiang client with local player-vs-computer play, room play, spectators, tile assets, and GB81 scoring.

  • The 136-tile set includes suits and honors, with no flower tiles.
  • Chi, peng, kongs, rob-kong, self-draw, discard wins, and draws are synchronized.
  • The reachable 80 GB81 fan types are recognized without an 8-fan win threshold.
  • Winning local players can save a result image with tiles and fan summary.

Local by default

No cloud signaling is required for the current scope. Debuff is optimized for private networks where different device types can see each other directly.

  • Works with manual IP fallback when multicast is blocked.
  • Keeps trust decisions visible to the application.
  • Exposes errors that users can actually act on.

Use Debuff when every local endpoint should speak the same language

The project is early, practical, and built around real multi-endpoint LAN product needs: identity, discovery, trust, messages, and streams.

Back to top