How estebanrfp/gdb works
Project type and purpose
• GenosDB is a client-side, decentralized P2P graph database packaged as a JavaScript library.
• It provides a local-first storage engine (OPFS), a powerful query API (CRUD + recursive traversals), real-time P2P synchronization (via GenosRTC and BroadcastChannel), and optional RBAC/ACL security modules.
File structure
• Top-level “dist/index.js”: the published, minified library.
• “lib/”: source of high-level API wrappers and internal abstractions.
• “docs/”: detailed design/architecture guides, API references, module guides (e.g., sm-architecture, genosrtc-architecture).
• “examples/”: dozens of standalone HTML demos showing how an application integrates GDB.
• Configuration and CI: package.json, vitest.config.js, .github/workflows/test.yml.
• Testing: “tests/” folder for unit and integration tests of core, operators, API.
• Third-party licenses and architectural whitepapers (WHITEPAPER.md, ROADMAP.md, PHILOSOPHY.md).
README for additional insights
• Core modules: Engine, Storage (OPFS), Serialization (MessagePack), Compression (Pako).
• Sync: GenosRTC (WebRTC + Nostr relays) for device-to-device; BroadcastChannel for inter-tab.
• Security: WebAuthn for authentication, RBAC + ACL modules, transaction signatures.
• Architectural papers: hybrid-delta protocol, logical clocks, fallback full-state sync.