Skip to main content

Build Real-Time Decentralized Apps with GenosDB

A lightweight P2P graph database designed for modern web applications. Real-time synchronization, offline-first storage, and enterprise-grade security built right in.

Real-time P2P Sync

WebRTC-based peer-to-peer synchronization with Nostr signaling

Enterprise Security

WebAuthn authentication with RBAC and ACLs

Offline-First

OPFS storage with automatic conflict resolution

Quick Start

Get up and running with GenosDB in minutes

1

Install GenosDB

Install the package via npm, yarn, or pnpm:
npm install genosdb
2

Initialize the database

Import and create a new database instance:
import { gdb } from "genosdb"

const db = await gdb("my-app", { rtc: true })
Enable rtc: true for real-time P2P synchronization across devices and tabs.
3

Store and query data

Use the graph database API to store nodes and query relationships:
// Create a node
const userId = await db.put({ name: "Alice", role: "developer" })

// Query nodes
const results = await db.map({ 
  query: { role: "developer" },
  $limit: 10 
})

console.log(results)
4

Add P2P sync

Changes automatically sync in real-time across all connected peers:
// Subscribe to real-time updates
db.map({ query: { role: "developer" } }, (data) => {
  console.log("Live update:", data)
})
Open your app in multiple browser tabs to see real-time synchronization in action!

Explore by Topic

Dive deeper into GenosDB’s capabilities

Core Concepts

Learn about graph databases, P2P synchronization, and conflict resolution

CRUD Operations

Master put, get, map, link, and remove operations

Graph Traversal

Execute complex multi-hop queries with the $edge operator

Security & RBAC

Implement role-based access control and WebAuthn authentication

Real-time Subscriptions

Build reactive UIs with live data updates

P2P Networking

Configure WebRTC, Nostr relays, and cellular mesh topology

Key Features

Everything you need to build decentralized applications

Blazing Fast

Optimized for tens of thousands of operations per second without blocking the UI

Decentralized

True peer-to-peer architecture with no central server dependency

Modular

Optional extensions: Geo queries, NLQ, Radix Tree indexing, ACLs

Conflict Resolution

Hybrid Logical Clock with LWW-CRDT for automatic conflict resolution

Browser Native

Works entirely in the browser with OPFS for local persistence

Scalable

Cellular mesh topology supports networks with 100+ peers

Optional Modules

Extend GenosDB with powerful add-ons

Security Manager

WebAuthn, RBAC, and cryptographic verification

GenosRTC

P2P networking with WebRTC and Nostr

ACLs

Fine-grained node-level permissions

Radix Tree

Fast prefix searches and autocomplete

Geo Queries

Spatial queries with nearandnear and bbox

Natural Language

Query your graph using natural language

Community & Support

Get help and connect with other developers

GitHub Discussions

Ask questions, share ideas, and get help from the community

Report Issues

Found a bug or have a feature request? Let us know

Ready to build decentralized apps?

Start building with GenosDB today. Free for personal and commercial use.

Get Started Now