docs/README
Saturday 28 February 2026

Mau Developer Documentation

Welcome to the Mau developer documentation! This guide will help you understand Mau as a concept and show you how to build peer-to-peer social applications using the Mau convention.

Documentation Structure

Getting Started

  • Introduction - What is Mau and why it exists
  • Core Concepts - Understanding Mau’s fundamental architecture
  • Quick Start Tutorials - Three progressive tutorials:

Building Applications

Advanced Topics

Reference

What is Mau?

Mau is a peer-to-peer convention for building decentralized social applications. Unlike traditional social networks that rely on central servers, Mau applications:

  • Store data as files on the user’s filesystem
  • Use PGP for identity, authentication, and encryption
  • Discover peers using Kademlia DHT and mDNS
  • Exchange data over HTTP/TLS with mutual authentication
  • Support structured content using JSON-LD and Schema.org vocabulary

Why Build with Mau?

For Developers

  • Simple implementation - Files, HTTP, and well-established standards
  • Freedom to innovate - No platform restrictions or approval processes
  • Interoperability - Applications share the same data format
  • Web-compatible - Existing websites can become Mau peers

For Users

  • True ownership - Data lives on their disk, not a company’s server
  • Privacy by default - End-to-end encryption with PGP
  • No censorship - No central authority to ban or moderate
  • Cross-application - One identity works across all Mau apps

Architecture at a Glance

┌─────────────────────────────────────────────────────────────┐
│                      Your Application                        │
│  (Chat, Blog, Social Network, Game, IoT Controller...)      │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                     Mau Convention                           │
│                                                              │
│  ┌─────────────┐  ┌──────────────┐  ┌──────────────┐      │
│  │   Storage   │  │ Peer Network │  │  HTTP API    │      │
│  │  (Files +   │  │  (Kademlia + │  │  (Sync +     │      │
│  │   PGP)      │  │   mDNS)      │  │   Serve)     │      │
│  └─────────────┘  └──────────────┘  └──────────────┘      │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│              User's Filesystem + Network                     │
└─────────────────────────────────────────────────────────────┘

Quick Example

Here’s a minimal Mau application that posts and syncs content:

 1package main
 2
 3import (
 4    "github.com/mau-network/mau"
 5    "log"
 6)
 7
 8func main() {
 9    // Initialize Mau instance
10    client, err := mau.NewClient("/path/to/mau/directory")
11    if err != nil {
12        log.Fatal(err)
13    }
14
15    // Create a social media post
16    post := map[string]interface{}{
17        "@context": "https://schema.org",
18        "@type":    "SocialMediaPosting",
19        "headline": "Hello, decentralized world!",
20        "author": map[string]interface{}{
21            "@type": "Person",
22            "name":  "Alice",
23        },
24        "datePublished": "2026-02-27T07:30:00Z",
25    }
26
27    // Save encrypted and signed
28    err = client.SavePost("hello-world.json", post)
29    if err != nil {
30        log.Fatal(err)
31    }
32
33    // Start syncing with peers
34    client.StartSync()
35}

That’s it! Your post is now:

  • ✅ Saved locally as an encrypted, signed file
  • ✅ Available to your network over HTTP
  • ✅ Syncing with peers automatically

Next Steps

  1. Read the Introduction to understand Mau’s philosophy
  2. Follow the Quick Start Guide to build your first app
  3. Explore Building Social Apps for practical patterns

Community & Support

  • GitHub: mau-network/mau
  • Issues: Report bugs and request features
  • Discussions: Ask questions and share ideas

This documentation is for developers building on Mau. For the full protocol specification, see the main README.md.