$ show NullVoxPopuli/emberclear
This is a monorepo for the Ember.js-based encrypted chat application 'emberclear', which provides end-to-end encrypted messaging with no server-side message storage. The architecture is modular, consisting of multiple Ember addons (crypto, networking, local-account, UI, test-helpers, tracked-local-storage) and a separate card game app (pinochle) that reuses the same networking and crypto infrastructure. The chat app uses public-key cryptography (tweetnacl, libsodium) via web workers, relays messages through Phoenix WebSocket relays, and persists data locally via IndexedDB and localStorage. It includes features like QR code identity sharing, channel voting with cryptographic chains, and a state-machine-driven setup wizard. The codebase is well-tested with QUnit, acceptance tests, and smoke tests, but shows signs of technical drift with outdated dependencies (Node 14, Ember 3.26.1), many TODO comments, and incomplete features (e.g., voting, QR login transfer). The pinochle game app appears experimental but demonstrates sophisticated state machine usage and animation systems.
The LLM identified 5 files worth highlighting for reuse:
Provides a `@inLocalStorage` decorator that makes Ember tracked properties automatically persist to localStorage. It is a self-contained addon that can be extracted and used in any Ember Octane project to add reactive, persistent state without boilerplate. Demonstrates advanced use of decorators and the `@tracked` system.
A utility that integrates xstate state machines with Ember's reactivity system, allowing state machine transitions to trigger re-renders and Ember services to act as machine actors. It is reusable for any Ember project needing complex state management, and demonstrates non-obvious skill in bridging two frameworks.
Implements a connection pool for managing multiple WebSocket relay connections with configurable min/max limits, idle timeout, and automatic reconnection. It is a standalone utility that can be reused in any JavaScript project needing pooled WebSocket connections, demonstrating solid resource management patterns.
The CryptoConnector abstracts communication with a web worker that performs cryptographic operations (key generation, encryption, decryption) using tweetnacl and libsodium. It provides a clean promise-based API and handles worker lifecycle. This pattern is reusable for any application needing to offload heavy computation to web workers without coupling to the worker implementation.
Implements a chain of signed votes (VoteChain) for decentralized channel governance, where each vote is cryptographically signed and linked to the previous vote. Includes verification logic to ensure chain integrity. This is a reusable pattern for building trustless voting systems and demonstrates advanced cryptographic data structures.