0.0.32 • Published 3 months ago

gdb-p2p v0.0.32

Weekly downloads
-
License
(Zlib OR MIT OR A...
Repository
github
Last release
3 months ago

GDB (GraphDB) + RBAC (Role Based Access Control)

Graph database with Role-Based Access Control (RBAC), P2P synchronization, and local storage in OPFS.

GraphDB


NPM Version NPM License

Downloads on NPM npm.io

Project Status

NPM Unpacked Size (with version)

npm package minimized gzipped size

Main Features

GraphDB Core

  • Efficient storage in OPFS
  • Real-time synchronization between tabs and devices
  • CRUD operations for nodes and relationships
  • Compressed serialization with MessagePack
  • Automatic indexing for fast searches

Warning

This project is under active development. Do not use it in production environments until it reaches the beta or stable phase. Check the Project Status section for more details.

Project Status

  • Phase: Alpha
  • Completed Features:

    • Basic queries.
    • Distributed storage.
  • Pending Features:

    • Conflict resolution module.
    • Performance optimization.

Role Based Access Control (RBAC)

  • Customizable role hierarchy (superadmin, admin, etc)
  • Authentication with Metamask
  • Granular permissions (read/write/delete/publish)
  • Role assignment with automatic expiration
  • Cryptographic transaction verification

Security

  • Digital signature of critical operations
  • Real-time permission validation
  • Secure storage of roles in internal graph

Important Notice: This project is currently in the research and development phase and is not yet ready for production use. Please wait until it reaches the beta or stable phase before deploying it in a live environment. Refer to the Project Status section for more details.

Installation

1. Via NPM

npm install gdb-p2p
import { GraphDB } from "gdb-p2p"

2. Direct use in browser from a CDN

<script type="module">
  import { GraphDB } from "https://cdn.jsdelivr.net/npm/gdb-p2p@0/+esm"
</script>

Available CDNs

CDNURL
jsDelivrhttps://cdn.jsdelivr.net/npm/gdb-p2p@latest/+esm
UNPKGhttps://unpkg.com/gdb-p2p@latest
Skypackhttps://cdn.skypack.dev/gdb-p2p

Documentation

For detailed documentation, visit our GitHub Wiki.

Examples

We’ve created a collection of interactive examples to help you understand how GDB works in real-world scenarios. These examples cover everything from basic setup to advanced features like RBAC and P2P synchronization.

👉 Explore Examples on CodePen

Internal Dependencies

Below is a list of internal dependencies and their purposes within the project:

DependencyUsage
@msgpack/msgpackData serialization/deserialization in MessagePack format.
pakoData compression/decompression using gzip.
trysteroP2P synchronization for sharing changes in real-time between tabs/devices.
BroadcastChannelCommunication between browser tabs to notify local changes.

Additional Information

  • @msgpack/msgpack:
    This library is used to efficiently serialize and deserialize data, reducing payload sizes for storage and transmission.

  • pako:
    Provides gzip compression to optimize data storage and network communication.

  • trystero:
    Enables peer-to-peer synchronization, ensuring real-time updates across multiple instances of the application.

    Note: Among the available networks supported by Trystero, this project specifically uses the Nostr protocol for decentralized communication.

    What is Nostr?
    Nostr (Notes and Other Stuff Transmitted by Relays) is a decentralized protocol designed for censorship-resistant global communication. It operates without relying on centralized servers, instead using a network of relays to transmit signed messages between peers. Nostr is particularly well-suited for applications requiring secure, private, and scalable peer-to-peer interactions, such as social networks, messaging systems, or collaborative tools.

  • BroadcastChannel:
    Facilitates lightweight communication between browser tabs, allowing seamless updates without relying on external servers.

General Note: These dependencies are integral to the project's performance and functionality, ensuring efficient data handling and real-time synchronization while leveraging decentralized technologies like Nostr.

Contributing

We welcome contributions to improve this project! Please read our Contribution Guidelines for details on how to get started.

Community

We value community contributions and discussions! Here's how you can get involved:

  • Ask questions or share ideas: Join our GitHub Discussions.
  • Real-time chat: For quick conversations, join us on Gitter.

    Here’s how you can participate in the Gitter room:

    • [DEV]: Discussions about project development, new features, and technical improvements.
    • [ANNOUNCEMENT]: Official updates, new releases, and important news about GDB.
    • [HELP]: Technical support and troubleshooting for GDB-related questions.

Feel free to ask questions, share ideas, or just say hello! 👋

For more details on contributing, check out our Contributing Guidelines.

Licenses

This project includes third-party dependencies with their respective licenses. For detailed information, see the Licenses page in the Wiki.

The source code of this project is licensed under the MIT License. For more information, see the LICENSE file.

FOSSA Status

FOSSA Status

0.0.20

3 months ago

0.0.21

3 months ago

0.0.22

3 months ago

0.0.23

3 months ago

0.0.24

3 months ago

0.0.25

3 months ago

0.0.30

3 months ago

0.0.31

3 months ago

0.0.32

3 months ago

0.0.26

3 months ago

0.0.27

3 months ago

0.0.28

3 months ago

0.0.29

3 months ago

0.0.19

3 months ago

0.0.17

3 months ago

0.0.16

3 months ago

0.0.15

3 months ago

0.0.14

3 months ago

0.0.13

3 months ago

0.0.12

3 months ago

0.0.11

3 months ago

0.0.10

3 months ago

0.0.9

3 months ago

0.0.8

3 months ago

0.0.7

3 months ago

0.0.6

3 months ago

0.0.5

3 months ago

0.0.4

3 months ago

0.0.3

3 months ago

0.0.2

3 months ago

0.0.1

3 months ago