3 minutes
Hypergraph
Overview
Hypergraph is a TypeScript-first framework for building local-first applications that sync encrypted data to a shared knowledge graph. Instead of relying on traditional backend infrastructure, it shifts control to the client and puts data where it belongs: with the user.
At its core, Hypergraph is powered by two innovations:
- Client-side architecture that keeps users in control of their data while apps remain real-time, private, and interoperable by default.
- The GRC-20 standard which enables truly composable knowledge graphs.
With Hypergraph, developers can build collaborative apps that feel seamless, secure, and user-owned while focusing purely on client-side logic.
It offers end-to-end encryption, a GRC-20 Knowledge Graph SDK, JSON-LD storage, conflict-free sync with CRDTs, and Spaces for organizing people and data with fine-grained access.
For more specifics check out, key features.
Core Concepts
Knowledge Graphs
Unlike traditional databases that store data in rows and columns, knowledge graphs represent information as connected networks. This structure makes complex queries natural and efficient, while allowing the data model to evolve organically without schema migrations.
Example Use Case
In a social app, a traditional database might require complex joins to answer a query like: "Posts by photographers that my friends liked"
In a knowledge graph, relationships are the data:
1Teresa --> profession --> Photography2Teresa --> owns --> Fujifilm X1003Teresa --> posted --> Street Photo4Alex --> friend_of --> Teresa5Alex --> liked --> Street Photo
This model makes queries natural and efficient, while allowing the schema to evolve organically.
The Hypergraph Advantage
- Private by default: Personal data is encrypted on the device.
- Peer-to-peer: No central server required. Collaboration is direct.
- Real-time: Changes synchronize instantly across devices.
- Interoperable: Data is usable across applications that support the protocol.
Hypergraph serializes all data using the GRC-20 standard. Hypergraph handles serialization, encryption, and networking behind the scenes, while developers interact with simple SDK calls.
Spaces
A Space is the fundamental unit of collaboration. It groups people and data, similar to a folder, Slack channel, or shared document. Each Space maps one-to-one with an Automerge document, enabling conflict-free offline editing.
Membership and roles are tracked in an append-only Space Event Log, supporting common operations like creating a Space, updating roles, inviting members, or removing members.
Identities
Each user controls a cryptographic Identity used for authentication, encryption, and signing events. Identities are stored locally, enabling multi-device logins without a backend.
Inboxes
An Inbox is a lightweight queue for delivering updates or direct messages.
- Account Inboxes: Belong to a single user.
- Space Inboxes: Broadcast messages to all members.
Inboxes can be public or private, with authentication policies controlling who can send messages.
Events and CRDTs
Hypergraph uses CRDTs (Conflict-Free Replicated Data Types) to manage updates across peers.
- Updates are signed, encrypted, and broadcast to peers.
- Conflicts resolve automatically without manual intervention.
- Large logs are periodically compacted into snapshots for efficiency.
Security Model
Hypergraph is designed with security as a core principle:
- End-to-end encryption ensures data privacy.
- Digital signatures verify the authenticity of events.
- Outdated or invalid updates are automatically rejected.
- Keys are rotated when membership changes to prevent unauthorized access.
Exploring Spaces
Spaces can be browsed using Geo Browser’s Testnet by entering a Space ID. Access is restricted by each Space’s privacy rules.
Getting Started
For all Hypergraph documentation check out the Hypergraph Docs and the Hypergraph GitHub Repo.