JM.
BACK TO PROJECTS
LOAM
March 2026PROJECT

LOAM

github.com/JosephMaynard/loam

Skills

  • TypeScript
  • Preact
  • Vite
  • Fastify
  • WebSockets
  • Zod
  • IndexedDB
  • Service Workers/PWA
  • QR Codes
  • DOMPurify

LOAM is an experimental off-grid, local-first communication system for browser-based messaging and local services over nearby networks.

The project is designed for situations where normal internet access is unavailable, unreliable, or unsafe. A small device, such as a Raspberry Pi or laptop, can act as a local WiFi hotspot and serve the LOAM web app directly to nearby phones. Users can connect through their browser, join channels, post messages, reply in threads, and coordinate without needing mobile signal, cloud infrastructure, app-store installs, or user accounts.

I built LOAM as a full-stack TypeScript project with a Preact/Vite frontend and a Fastify backend exposing REST and WebSocket APIs. The client uses IndexedDB for local persistence, service-worker caching for offline-friendly navigation, and reconnect/backoff handling for real-time message sync. Shared Zod schemas are used across the client and server for runtime validation and type safety.

The project also explores LOAM as a local interface for offline or LAN-hosted services. One prototype allows a phone connected to the LOAM network to chat with a local LLM running through Ollama on my laptop, with streamed Markdown responses rendered safely in the browser. This points towards a broader use case where LOAM nodes can provide not only messaging, but local tools, assistants, knowledge bases, and coordination services without relying on the public internet.

The project includes a number of custom packages and interaction details: deterministic anonymous identities, generated display names, SVG avatars, in-house QR code generation with SVG and terminal rendering, Canvas-based avatar cropping, Markdown rendering with DOMPurify sanitisation, and optional local Ollama integration for streaming assistant replies. LOAM is structured as a pnpm workspace, with reusable packages for schemas, QR codes, avatars, and display-name generation.

Longer term, LOAM is intended to be transport-agnostic. The current prototype focuses on local WiFi and browser-based messaging, but the architecture is designed with possible low-bandwidth relay support in mind, including LoRa-style communication between disconnected local nodes.

Gallery

Gallery Image 1
Gallery Image 2
Gallery Image 3
Gallery Image 4
Gallery Image 5
Gallery Image 6
Gallery Image 7