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.
Mau is a peer-to-peer convention for building decentralized social applications. Unlike traditional social networks that rely on central servers, Mau applications:
┌─────────────────────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────────────────────────────────────┘
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:
This documentation is for developers building on Mau. For the full protocol specification, see the main README.md.