HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
amark
gun
JavaScript2014–2024
amark / gun

gun

An open source cybersecurity protocol for syncing decentralized graph data.

45Distinct people
291Mentions
2Explicit recommenders
19.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An open source cybersecurity protocol for syncing decentralized graph data.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I was very excited about Datomic as well, but disappointed it wasn't Open Source. I decided to fix that + build something that combines my favorite features from Postgres,…

marknadal used a recommendation phrase. 7 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 3:38:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year291 dated mentions

Observed mentions: 2014-10-19 14:21:58 UTC to 2024-10-08 16:25:37 UTC.

02040602014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 39 mentions; 2 submissions, 37 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 52 mentions; 7 submissions, 45 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 67 mentions; 14 submissions, 53 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 59 mentions; 2 submissions, 57 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 40 mentions; 2 submissions, 38 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 18 mentions; 0 submissions, 18 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC826
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC39237
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC52745
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC671453
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC59257
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC40238
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC18018
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC431
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC110
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
GUN is an ecosystem of tools that let you build community run and encrypted applications - like an Open Source Firebase or a Decentralized Dropbox. The Internet Archive and 100s of other apps run GUN in-production. Multiplayer by default with realtime p2p state synchronization! Graph data lets you use key/value, tables, documents, videos, & more! Local-first, offline, and decentralized with end-to-end encryption. Decentralized alternatives to Zoom, Reddit, Instagram, Slack, YouTube, Stripe, Wikipedia, Facebook Horizon and more have already pushed terabytes of daily P2P traffic on GUN. We are a friendly community creating a free fun future for freedom: Quickstart GUN is super easy to get started with: Try the interactive tutorial in the browser (5min ~ average developer). Or npm install gun and run the examples with cd node_modules/gun && npm start (5min ~ average developer). Note: If you don't have node or npm, read this first. If the npm command line didn't work, you may need to mkdir node_modules first or use sudo. An online demo of the examples are available here: http://try.axe.eco/ Or write a quick app: (try now in a playground) <script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script> <script> // import GUN from 'gun'; // in ESM // GUN = require('gun'); // in NodeJS // GUN = require('gun/gun'); // in React gun = GUN(); gun.get('mark').put({ name: "Mark", email: "mark@gun.eco", }); gun.get('mark').on((data, key) => { console.log("realtime updates:", data); }); setInterval(() => { gun.get('mark').get('live').put(Math.random()) }, 9); </script> Or try something mind blowing, like saving circular references to a table of documents! (play) cat = {name: "Fluffy", species: "kitty"}; mark = {boss: cat}; cat.slave = mark; // partial updates merge with existing data! gun.get('mark').put(mark); // access the data as if it is a document. gun.get('mark').get('boss').get('name').once(function(data, key){ // `once` grabs the data once, no subscriptions. console.log("Mark's boss is", data); }); // traverse a graph of circular references! gun.get('mark').get('boss').get('slave').once(function(data, key){ console.log("Mark is the cat's slave!", data); }); // add both of them to a table! gun.get('list').set(gun.get('mark').get('boss')); gun.get('list').set(gun.get('mark')); // grab each item once from the table, continuously: gun.get('list').map().once(function(data, key){ console.log("Item:", data); }); // live update the table! gun.get('list').set({type: "cucumber", goal: "jumping cat"}); Want to keep building more? Jump to THE DOCUMENTATION! About First & foremost, GUN is a community of the nicest and most helpful people out there. So I want to invite you to come tell us about what you are working on & wanting to build (new or old school alike! Just be nice as well.) and ask us your questions directly. :) Watch the 100 second intro! The GUN ecosystem stack is a collection of independent and modular tools covering everything from CRDT conflict resolution, cryptographic security & encryption, radix storage serialization, mesh networking & routing algorithms, to distributed systems correctness & load testing, CPU scheduled JSON parser to prevent UI lag, and more! On that note, let's get some official shout outs covered first: Support Thanks to:                Robert Heessels, Lorenzo Mangani, NLnet Foundation, Sam Liu, Daniel Dombrowsky, Vincent Woo, AJ ONeal, Bill Ottman, Mike Lange, Sean Matheson, Alan Mimms, Dário Freire, John Williamson, Robin Bron, Elie Makhoul, Mike Staub, Bradley Matusiak, Jeff Cook, Nico, Aaron Artille, Tim Robinson, Fabian Stamm, Mike Staub, Hunter Owens, Jacob Millner, Gerrit Balindt, Gabriel Lemon, Murage Martin, Jason Stallings Join others in sponsoring code: https://www.patreon.com/gunDB ! Ask questions: http://stackoverflow.com/questions/tagged/gun ? Found a bug? Report at: https://github.com/amark/gun/issues ; Need help? Chat with us: http://chat.gun.eco . History GUN was created by Mark Nadal in 2014 after he had spent 4 years trying to get his collaborative web app to scale up with traditional databases. After he realized Master-Slave database architecture causes one big bottleneck, he (as a complete newbie outsider) naively decided to question the status quo and shake things up with controversial, heretical, and contrarian experiments: The NoDB - no master, no servers, no "single source of truth", not built with a real programming language or real hardware, no DevOps, no locking, not just SQL or NoSQL but both (all - graphs, documents, tables, key/value). The goal was to build a P2P database that could survive living inside any browser, and could correctly sync data between any device after assuming any offline-first activity. Technically, GUN is a graph synchronization protocol with a lightweight embedded engine, capable of doing 20M+ API ops/sec in just ~9KB gzipped size. Documentation API reference Tutorials Examples GraphQL Electron React & Native Vue Svelte Webcomponents CAP Theorem Tradeoffs How Data Sync Works How GUN is Built Crypto Auth Modules Roadmap This would not be possible without community contributors, big shout out to: ajmeyghani (Learn GUN Basics with Diagrams); anywhichway (Block Storage); beebase (Quasar); BrockAtkinson (brunch config); Brysgo (GraphQL); d3x0r (SQLite); forrestjt (file.js); hillct (Docker); JosePedroDias (graph visualizer); JuniperChicago (cycle.js bindings); jveres (todoMVC); kristianmandrup (edge); Lightnet (Awesome Vue User Examples & User Kitchen Sink Playground); lmangani (Cytoscape Visualizer, Cassandra, Fastify, LetsEncrypt); mhelander (SEA); omarzion (Sticky Note App); PsychoLlama (LevelDB); RangerMauve (schema); robertheessels (gun-p2p-auth); rogowski (AXE); sbeleidy; sbiaudet (C# Port); Sean Matheson (Observable/RxJS/Most.js bindings); Shadyzpop (React Na
Read the full README on GitHub

What Hacker News says

59 sources
We have been doing something similar for a long time, works out great. Glad to see more industry adoption around this! We also wrote a decentralized clock sync algorithm that can be used where NTP fails, check out https://github.com/amark/gun/blob/master/nts.js ! I find it a little odd they didn't use a separator symbol so that way it doesn't have to overflow after a certain year. Also, then you could have microseconds precision or beyond where it is supported. Overall good progress getting people onboard with this! Solves a lot of problems before they even start.
In ULID: Universally Unique Lexicographically Sortable Identifier
You may also be interested in (full disclosure: ours) https://github.com/amark/gun The Internet Archive ( https://news.ycombinator.com/item?id=17685682 ) runs it, and D.Tube and notabug.io run it in production and have pushed terabyte/daily of P2P traffic. They both use CRDTs, the CRDT that GUN uses is capable of mutable (and immutable) decentralized cryptographically secure (user accounts and all) data. This is important because indexing data can be done in realtime with P2P updates without having to rediscover the new hash of changed data (which adds extra latency/delay on immutable-only backed stores).
In OrbitDB – serverless, peer-to-peer database on top of IPFS
It also took me several years to get up the gumption to actually learn WebRTC after having previously used wrapper libraries... And it is annoying, but you can get the stab of it within a week or two. The most confusing thing is figuring out setRemoteDescription vs setLocalDescription - that took a bunch of playing around to finally get it to work. All said and done, we were able to write a WebRTC adapter in less than 100LOC[1], and it is capable of doing inter-network signaling once peers have established connections. And the "signaling servers" that bootstrap non-WebRTC peers, those servers themselves can be decentralized as well. If you don't want to deal with the fuss of it all, I highly recommend using EasyRTC, and/or studying their code to learn more: https://github.com/priologic/easyrtc [1] https://github.com/amark/gun/blob/master/
Read the rest
In Adventures in Video Conferencing Part 1: The Wild World of WebRTC
Sorry, what? OT requires centralized servers to do intention resolution. CRDTs are a set of operations that can work on any peer and resolve correctly, without extra coordination or central resolution. The two things are about opposite as they can get. Some CRDTs can be used to make Google Docs style OT, but are not specific to OT use cases. Source: Me, I'm the leading industry and open source expert on CRDTs which power the popular https://github.com/amark/gun decentralized database that the Internet Archive, D.tube (1M+ monthly visitors), notabug.io (1K/daily users) use. CRDTs have let us scale to 3K tx/sec on $99 hardware in P2P mesh networks.
In Real Differences Between OT and CRDT for Co-Editors
marknadal·Sep 17, 2018Recommendation phrase
I was very excited about Datomic as well, but disappointed it wasn't Open Source. I decided to fix that + build something that combines my favorite features from Postgres, Mongo, Neo4j, Couch/Pouch, Riak, Cassandra, Redis, Rethink, Firebase, and MySQL! Lol, it has only taken me 4 years and ~ still not v1.0 yet but the Internet Archive (Top 300 site in the world!) and others are running us in production. So give it a try - it is all MIT/Zlib/Apache2 licensed ( https://github.com/amark/gun ), no crippleware "opencore", and fast (20M ops/sec for cached data, which Datomic also does, but IDK their benchmarks off the top of my head).
In Rich Hickey on Datomic Ions [video]
marknadal·Sep 17, 2018Recommendation phrase
IPNS is a poor answer/solution to the original comment. Don't get me wrong, I love IPFS (it is a perfect match with our tech) but IPNS is a nice sounding solution to the problem, but suffers terrible performance problems from the IPFS requirement of hashing. Unfortunately, I know this for fact because multiple companies have already moved from IPNS to us to handle the indexing/updating of decentralized data in a mutable context BUT they still use IPFS for files/photos/etc. So IPFS is great, but you are better off using another system for naming, indexing, searching, etc. and then point to the IPFS hashes. I'm biased (D.Tube - couple million+ monthly visitors, P2P reddit http://notabug.io - thousand daily actives, Internet Archive, etc.) are using GUN (https://github.com/amark/gun) for this instead.
In Introducing Cloudflare’s IPFS Gateway
Yes, IPFS is purely hash based which is great for static images/movies. DAT is also hash based, but at least it has support for top-level asymmetric keys that you can put files into, and ADD files to without the root directory changing its hash. IPNS works around this, but isn't ideal. Neither systems can handle high frequency P2P data that changes - for instance Reddit-like sites etc. those ( http://notabug.io ) and other sites like the Internet Archive (which has IPFS, WebTorrent, and GUN versions decentralized) are built on our system (https://github.com/amark/gun), are already pushing terabytes of P2P traffic. And don't forget about WebTorrent and Secure Scuttlebutt!!!
In Introducing Cloudflare’s IPFS Gateway
Already got you covered! The Internet Archive ( https://news.ycombinator.com/item?id=17685682 ) & notabug.io (a P2P Reddit alternative, pushing terabytes traffic) have already moved to using our decentralized tools ( https://github.com/amark/gun ). Coming up, we're also working on IP masking (onion layering), and we already have an option to do end-to-end encryption (which prevents middlemen from being able to read your data). If you are passionate about this stuff, there are a lot of projects moving in this direction and all Open Source, and they/us/them could really use help/contribution! Political reasons only shorten the timeline on needing this.
In EU approves internet copyright law, including ‘link tax’ and ‘upload filter’
Grandparent: After getting frustrated with all the other WebRTC libraries over the last 4 years, I finally wrote our own ( https://github.com/amark/gun/blob/master/lib/webrtc.js ) which is capable of using a set of decentralized DHT relay-peers in GUN for signaling - and once peers are already on WebRTC, they can signal (daisy-chain "DAM" as we call it) to other WebRTC peers via WebRTC! Meaning, you don't/won't have to run any servers!!! Ping us on our chatroom if you want the list of DHT peers. Parent: Chuck! Sounds like you'd be a very useful person to know. Me, Feross, etc., plenty others have been requesting additional API/protocol access over the last 4 years (some of which FireFox is adding in libdweb extension!). Any chance we could connect and chat? Ping me at mark@gun.eco ?
In How Discord Handles Two and Half Million Concurrent Voice Users Using WebRTC
This is brilliant!!!! I hadn't heard of any Radix based storage engines and was wondering why there weren't a ton out there. So I built one (in pathetic Javascript https://github.com/amark/gun/blob/master/lib/radisk.js ) last year, and super happy to see this one in C, I might consider switching over to TKVDB! Thank you!!! Can people link me to any other Radix based high performant storage engine? Radix seems like an obvious choice, and I was able to squeeze 2K/ack-to-disk over 1M tweet-like write load tests out of mine, I can't wait to try a C based version. I'm highly interested in this area. Very excited to try out TKVDB!
In TKVDB: radix tree persistent key/value storage engine written in ANSI C

Showing the 15 most recent of 59 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.