DEV Community

Cover image for GenosDB: Distributed Graph-Based Database
Esteban Fuster Pozzi
Esteban Fuster Pozzi

Posted on • Originally published at genosdb.com

GenosDB: Distributed Graph-Based Database


In modern web development, we’ve reached an inflection point. Users demand experiences that are fast, collaborative, and work offline, but traditional architectures built on centralized servers have become a bottleneck. Synchronizing state between multiple users in real-time is complex, expensive, and fragile.What if we could remove the central server from the equation?GenosDB isn’t just another database; it’s a fundamental answer to this challenge. It’s a P2P, local-first, distributed graph database designed from the ground up to empower developers to build the next generation of web applications: systems that are inherently collaborative, secure, and resilient.In this article, we’ll explore how GenosDB’s unique architecture solves some of the most difficult problems in real-time development.

From Manual Syncing to an Automatic Dataflow

One of the biggest headaches in collaborative applications is state management. How do you ensure that when one user drags a card on a Kanban board, every other user sees the change instantly?GenosDB solves this natively:- Real-time P2P Synchronization: Using GenosRTC (a layer on top of WebRTC), any data change on one device is intelligently and automatically propagated to all other connected peers. You don’t need to set up WebSockets, manage reconnections, or write complex sync logic. It just works.- Cross-Tab Consistency: Thanks to BroadcastChannel, if a user has your application open in multiple tabs, the state remains perfectly synchronized between them with no extra effort.

Your Application, Always Available: Local-First Persistence

What happens if a user loses their internet connection? With a traditional architecture, the application stops working. With GenosDB’s local-first approach, the experience is seamless:- Browser Storage with OPFS: GenosDB utilizes the Origin Private File System (OPFS), a fast and persistent storage space directly in the browser. The application always reads and writes locally, which makes it incredibly fast.- Native Offline Support: Users can continue to work, create, and modify data while offline. As soon as the connection is restored, GenosDB automatically handles syncing the changes with the network.All of this is managed efficiently, using MessagePack for serialization and Pako compression to keep storage usage to a minimum.

Modeling the Real World: The Power of the Graph

Real-world applications aren’t just simple tables and rows; they are networks of interconnected data. A user belongs to a team, a task is assigned to a user, a document is linked to another.GenosDB embraces this reality with its graph data model. Instead of forcing your data into rigid structures, you can naturally model entities (nodes) and the relationships (links) between them. This is crucial for social applications, content management systems, and of course, virtual worlds like OVGrid.

Security in a Serverless World: The SM + RBAC Module

Decentralization introduces a critical question: if there’s no central server, who controls permissions? How do we prevent a malicious actor from deleting everyone’s data?This is where GenosDB’s Security Manager (SM) with Role-Based Access Control (RBAC) becomes a revolutionary feature:- Cryptographic Identity: Every user owns their identity, secured with modern cryptography through WebAuthn (passkeys, biometrics). No more passwords.- Signed Operations: Every write operation (put, link, remove) is digitally signed. The network doesn’t trust; it verifies.- Flexible Role Hierarchy: You can define roles like superadmin, admin, manager, or guest and assign granular permissions (read, write, delete). A guest cannot write data, and a manager cannot delete an admin’s work. These rules are enforced in a distributed manner by every peer on the network.This zero-trust system allows you to build complex and secure P2P applications where permissions and governance are woven into the very fabric of the database.

Conclusion: Start Building the Future, Today

GenosDB is more than a collection of features; it’s a cohesive platform designed for a new paradigm of web applications. Whether you’re building a collaborative tool, a decentralized social network, an app that needs to work offline, or simply want a simpler way to manage real-time state, GenosDB provides the foundation you need.


This article is part of the official documentation of GenosDB (GDB).
GenosDB is a distributed, modular, peer-to-peer graph database built with a Zero-Trust Security Model, created by Esteban Fuster Pozzi (estebanrfp).

📄 Whitepaper | overview of GenosDB design and architecture

🛠 Roadmap | planned features and future updates

💡 Examples | code snippets and usage demos

📖 Documentation | full reference guide

🔍 API Reference | detailed API methods

📚 Wiki | additional notes and guides

💬 GitHub Discussions | community questions and feedback

🗂 Repository | Minified production-ready files

📦 Install via npm | quick setup instructions

🌐 Website | GitHub | LinkedIn

Top comments (0)