# amark/gun

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/amark-gun).**

19,057 stars · 1,239 forks · JavaScript · NOASSERTION

## Links

- GitHub: https://github.com/amark/gun
- Homepage: https://gun.eco/docs
- awesome-repositories: https://awesome-repositories.com/repository/amark-gun.md

## Topics

`artificial-intelligence` `big-data` `blockchain` `crdt` `crypto` `cryptography` `dapp` `database` `decentralized` `dweb` `encryption` `end-to-end` `graph` `machine-learning` `metaverse` `offline-first` `p2p` `protocol` `realtime` `web3`

## Description

Gun is a decentralized graph database and synchronization engine designed for real-time, peer-to-peer data management. It functions as a JavaScript library that enables applications to maintain consistent state across distributed nodes without relying on a central server. By utilizing conflict-free replicated data types and a gossip protocol, the system ensures that data updates propagate across the network and reconcile automatically.

The project distinguishes itself through a focus on decentralized identity and security, utilizing public-key infrastructure to authenticate users and sign data entries. It supports end-to-end encryption for private information and allows for granular access control policies. The architecture is built to be offline-first, prioritizing local persistence for immediate read and write operations while synchronizing changes with the network once connectivity is restored.

The platform provides a flexible graph-based data model that supports various data structures, including key-value pairs and documents. It includes modular storage adapters for connecting to external backends and offers direct bindings to frontend frameworks to trigger automatic reactivity in user interfaces. Additionally, the system includes tools for visualizing complex graph topologies and supports network extensions for diverse peer discovery and transport methods.

## Tags

### Networking & Communication

- [Peer-to-Peer Synchronization Engines](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/data-synchronization-consistency/peer-to-peer-synchronization-engines.md) — Functions as a decentralized graph database engine for real-time peer-to-peer synchronization. ([source](https://cdn.jsdelivr.net/gh/amark/gun@master/README.md))
- [Conflict-Free Replicated Data Types](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/synchronization-strategies/conflict-free-replicated-data-types.md) — Implements conflict-free replicated data types to ensure consistent state across distributed nodes without central coordination.
- [Peer-to-Peer Protocols](https://awesome-repositories.com/f/networking-communication/peer-to-peer-protocols.md) — Provides a peer-to-peer data protocol for direct exchange and discovery between clients.
- [Peer-to-Peer Networking Extensions](https://awesome-repositories.com/f/networking-communication/peer-to-peer-networking-extensions.md) — Utilizes a peer-to-peer gossip protocol to propagate data updates across the decentralized network. ([source](https://github.com/amark/gun/wiki/Awesome-GUN))
- [Relay Server Infrastructures](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-infrastructure-configuration/network-and-server-infrastructure/relay-server-infrastructures.md) — Facilitates network connectivity and data relaying through infrastructure nodes in cloud and container environments. ([source](https://cdn.jsdelivr.net/gh/amark/gun@master/README.md))

### Data & Databases

- [Graph Data Models](https://awesome-repositories.com/f/data-databases/graph-data-models.md) — Organizes data as a web of interconnected nodes using a flexible graph-based addressing model.
- [Offline-First Persistence](https://awesome-repositories.com/f/data-databases/offline-first-persistence.md) — Enables offline-first local persistence for immediate data access and automatic synchronization upon reconnection.
- [Reactive Graph Bindings](https://awesome-repositories.com/f/data-databases/graph-data-models/reactive-graph-bindings.md) — Triggers automatic reactivity and UI updates as graph data changes in real-time.
- [Storage Backend Adapters](https://awesome-repositories.com/f/data-databases/storage-backend-adapters.md) — Supports modular storage adapters to decouple the core engine from various physical storage backends.
- [Data Persistence and Storage](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage.md) — Integrates with external databases and file systems to ensure long-term data durability. ([source](https://github.com/amark/gun/wiki/Awesome-GUN))
- [Interactive Graph Visualizers](https://awesome-repositories.com/f/data-databases/interactive-graph-visualizers.md) — Includes tools for visualizing complex graph topologies to assist in debugging and monitoring. ([source](https://github.com/amark/gun/wiki/Awesome-GUN))

### Web Development

- [Offline-First Web Apps](https://awesome-repositories.com/f/web-development/offline-first-web-apps.md) — Supports offline-first application development with automatic reconciliation of local changes.

### Security & Cryptography

- [Signed Data Repositories](https://awesome-repositories.com/f/security-cryptography/code-signing/signed-data-repositories.md) — Ensures data integrity and verifies authorship by cryptographically signing individual data entries. ([source](https://github.com/amark/gun/wiki/Auth))
- [Identity & Device Management](https://awesome-repositories.com/f/security-cryptography/identity-device-management.md) — Enables portable, decentralized identity management across multiple devices without central authority.
- [Identity & Key Management](https://awesome-repositories.com/f/security-cryptography/identity-key-management.md) — Manages cryptographic identities using public-private key pairs for secure, decentralized user authentication. ([source](https://github.com/amark/gun/wiki/Auth))
- [Cryptographic Identity Verification](https://awesome-repositories.com/f/security-cryptography/identity-verification-modules/cryptographic-identity-verification.md) — Provides cryptographic identity verification to authenticate users and sign data entries securely.
- [End-to-End Encryption](https://awesome-repositories.com/f/security-cryptography/privacy-data-protection/data-encryption/end-to-end-encryption.md) — Protects private information with end-to-end encryption to ensure only authorized users can access their data. ([source](https://github.com/amark/gun/wiki/Auth))
- [Policy-Based Access Control](https://awesome-repositories.com/f/security-cryptography/policy-based-access-control.md) — Enforces granular read and write permissions on graph data using custom validation and authentication policies. ([source](https://github.com/amark/gun/wiki/Awesome-GUN))

### User Interface & Experience

- [State-Synchronized Bindings](https://awesome-repositories.com/f/user-interface-experience/data-binding-frameworks/state-synchronized-bindings.md) — Provides a JavaScript library that binds graph nodes to application state for automatic reactivity. ([source](https://github.com/amark/gun/wiki/Awesome-GUN))
