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, 10:02:05 AM 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

67 sources
We're also working on decentralized/P2P tech as well, currently storage+computation+ledgers+DAGs are covered pretty well in the article, but CRDTs are also a must for most projects: https://github.com/amark/gun . The article seemed to mix in some blockchain/cryptocurrency projects as well, but seemed out of place (for instance, if they were mentioning those projects, why not also Ethereum?).
In Decentralization Roundup for 2017
Quick response to some of the comments here: - WebRTC is great in theory, terrible in practice (doesn't work very well), and still needs a bootstrapping server. So it is better to have a reliable websocket based server as the default/fallback, and WebRTC progressively enhanced. - Signal and Whatsapp, as others have pointed out, are far from being comfortable as being private (they already know too much, phone number, etc.), and don't have the convenience of a browser based app. - Yes, this app should be using the Web Crypto API (it is what we switched over to, for our P2P cryptographic user accounts: https://github.com/amark/gun/wiki/auth ) to reduce dependency on the server. You can use the `integrity` attribute to help out with this, but ultimately unless somebody installs it as an Electron app or something, browser based crypto has its
Read the rest
limitations.
In Show HN: Darkwire.io – instant encrypted web chat (Socket.io and Web Crypto API)
Mobile support works when using things like React Native, phonegap, ionic, etc. but we don't have any Swift/Objective-C/Java drivers yet - however, I recently did a talk on how to port gun into a new language, so I'm hoping some contributors could help out: https://github.com/amark/gun/wiki/porting-gun Thanks for asking! Definitely a hard one, any other issues we need to address still, that I can put on my radar?
In AWS AppSync – Build data-driven apps with real-time and off-line capabilities
We have tackled a protocol to solve ad-hoc mesh network data transmission in P2P environments. It is MIT/ZLIB/Apache2 Open Source licensed: https://github.com/amark/gun I explain how the P2P logic works in this tech talk: https://www.youtube.com/watch?v=5fCPRY-9hkc&t=3s We also have end-to-end encryption now working: https://github.com/amark/gun/wiki/auth What we're missing, is we need adapters for Bluetooth, etc. Andre Staltz (of CyclesJS fame) has already added React Native bindings ( https://github.com/staltz/gun-asyncstorage ), which I'm hoping some of those tools (like Phonegap, Nativescript) have bridges for Bluetooth?
In Meshkit
marknadal·Nov 14, 2017Recommendation phrase
This is a fantastic article! I built something similar a few years ago, except I couldn't rely on a centralized server. So I had to come up with a P2P/decentralized variant of it. There is a test page up for it, so you can test it out in practice across multiple devices to see how precise (not accurate) it is: https://gunjs.herokuapp.com/game/nts.html Turns out the math/algorithm isn't too hard! Less than 50LOC for full implementation: https://github.com/amark/gun/blob/master/nts.js I recommend you have fun and challenge yourself to solve it first before looking at the code! It made me really understand General Relativity spacetime so much more, it clicked.
In Determinism in League of Legends: Unified Clock
Hey, David/others I'm very impressed with your work on Y-JS (the CRDT library powering this). I'm the author of gun, which is currently (as far as I know from stats) the most popular CRDT-based data sync (MIT/ZLIB/Apache2 licensed, 6.6K+ stars, https://github.com/amark/gun ). Usually I'm pretty skeptical of most systems, but I'm rather particularly impressed with yours. I also do not think you are getting the recognition you deserve, because the truly novel work here is Y-JS not IPFS (even though is IPFS is great), yet Y-JS is almost just a footnote on the page which is sad. The first couple documents (on architecture and stuff) didn't seem to explore the CRDT that is used. I'll have to follow-through on other sub-documents/pages to read more, but wanted to get your thoughts first (and BTW, thanks for all the documentation you have alread
Read the rest
y provided, it is impressive, and I know how hard it is to try and get everything shipped, so the last thing I want to be is an annoying HN person whining about why you didn't already have X or Y or Z finished, and wanted to give you a chance to reply directly). I was able to rather quickly ( https://www.dropbox.com/s/8uxzq6d47szu4w1/Screenshot%202017-... ) get the document to go out of sync, but I understand this could just be a trivial implementation detail (and often is) NOT a problem with the CRDT, but wanted to check. Given your bachelor thesis, I know you are all too aware of these things, P2P collaborative rich-text is one of the hardest problems out there in the space. Your Y-JS system seems fairly "generalizable", no? Which is unique amongst CRDTs (ours at gun is as well, so I get the nuance). If that is true, usually P2P rich-text then requires a specialized CRDT on top of the generalizable one, is this what you all did? For instance, Martin Kleppmann did an excellent explanation of explaining theirs here: https://youtu.be/yCcWpzY8dIA?t=16m26s . I was wondering if you did something similar? We had to implement our own, which I did one of my infamous "cartoon explainers" on here: http://gun.js.org/explainers/school/class.html . However Martin actually brings up an edge case I hadn't thought of after 4 years of analyzing the system! But thankfully he provides a patch on how to fix it. ;) Anyways, wanted to again repeat I'm very impressed with Y-JS (and say that it is not getting the attention it deserves for this being on top of HN, given that it is what is novel, not the other stuff). But I also wanted to inquire more about the generalizable-ness of Y-JS and then hear about any specific specialized-CRDT you may be using for P2P rich text, because it looks like it could be a breakthrough! Would love to hear more! Excellent work.
In PeerPad – A realtime P2P collaborative editing tool powered by IPFS
You mentioned "gun" in the context of databases/realtime, so naturally I found it - although I was bummed it wasn't about gun (I'm the author of the popular https://github.com/amark/gun MIT licensed graph database) just the expression. But since I now have you, you mention that "make reactive all the things" on the server caused newer developers pain? I've certainly had my fair share of developers initially being confused about reactive systems, but generally once they play with it, it "clicks" and they are mind-blown about the possibilities. Would you mind sharing your experiences? So that way I can indirectly learn from your interactions and try to make things better, since I work on related systems.
In Ask HN: Is Meteor.js still a thing?

Showing the 15 most recent of 67 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.