Madcore Web (madcore-web) is a high-level library for building Delta Chat-compatible messengers in web environments. It runs on the Delta Chat Relay protocol (JSON-RPC over WebSocket) and provides a multi-account, PGP-first messaging experience with zero backend required.
npm install madcore-web
# or
bun add madcore-webFrom source:
bun install
bun run build| Import | Purpose |
|---|---|
madcore-web |
DeltaChatSDK, DeltaChatAccount, crypto helpers |
madcore-web/store |
MemoryStore, IndexedDBStore, createStore() |
madcore-web/types |
TypeScript type definitions |
import { DeltaChatSDK } from 'madcore-web';
const SERVER = 'https://relay.example';
const dc = DeltaChatSDK({ logLevel: 'debug' });
const { account: alice } = await dc.register(SERVER, 'Alice');
const { account: bob } = await dc.register(SERVER, 'Bob');
await alice.connect();
await bob.connect();
const uri = alice.generateSecureJoinURI();
const { contact } = await bob.secureJoin(uri);
await bob.send(contact, { text: 'Hello Alice!' });
console.log(bob.status());For browser persistence, pass store: new IndexedDBStore('my-app') to DeltaChatSDK(). The default IndexedDB database name is madcore-web.
See docs/examples.md for the full guide.
Choose your entry point based on your needs:
New developers and evaluators.
- Introduction & Quick Start — Register, connect, and send your first message.
- The Factory Pattern — Managing multiple
DeltaChatAccountinstances. - Standalone Account — Single-account usage without the manager.
Application developers building messenger features.
- Account Lifecycle — Registration, connection, and persistence with
IndexedDBStore. - Unified Messaging (
.send()) — Text, images, video, reactions, edits, and deletes. - Real-time Events — Incoming messages and connection state changes.
- Contacts & Groups — Contact lists, groups, and broadcast channels.
Security-conscious developers and advanced users.
- PGP & Autocrypt — Key generation, fingerprints, and opportunistic encryption.
- SecureJoin Handshake — QR-code / URI verification protocol.
- Multi-Device Sync — State consistency across devices.
- Media Processing — Base64 handling, MIME parsing, and attachments.
- Core parity map — madcore-web API vs Delta Chat core RPC.
Core contributors and protocol researchers.
- WebSocket Protocol — JSON-RPC message structure and actions.
- UID System — Message tracking and synchronization.
- Module Layout —
lib/transport.ts,lib/mime-build.ts,lib/webxdc.ts, and more. - Developing Extensions — Webxdc, calls, location, custom storage.
bun run dev # watch mode (tsc)
bun run test # full integration test suite
bun run test:interactiveIntegration tests expect a relay URL in .env:
SERVER_URL=https://relay.exampleMadcore Web is licensed under the GNU Lesser General Public License v3.0 (LGPLv3).
You may download the full license text from the LICENSE file in this repository.