From 7f6885acc54b9c8b7b35cb85580034911f0fb245 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 17:46:43 +0200 Subject: [PATCH 01/38] Add more points to features list --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3164a7c65..1a8fcb1b3 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,10 @@ Configurable node server implementation for the [`p2panda`] network running as a - Verifies the consistency, format and signature of operations and rejects invalid ones. - Stores operations of the network in an SQL database of your choice (SQLite, PostgreSQL). - Materializes views on top of the known data. -- Answers filterable and paginated data queries via GraphQL. +- Answers filtered, sorted and paginated data queries via GraphQL. - Discovers other nodes in local network and internet. -- Replicates data with other nodes. +- Establishes connections (peer-to-peer via UDP holepunching) or via relays. +- Replicates data efficiently with other nodes. ## Example From 8d9aebbfb870fc509751b9b11bfdd75741a74e26 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 17:54:06 +0200 Subject: [PATCH 02/38] Same feature list on other file --- aquadoggo/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aquadoggo/README.md b/aquadoggo/README.md index 17f36c43c..4f21d96d0 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -59,9 +59,10 @@ be embedded inside your Rust program. - Verifies the consistency, format and signature of operations and rejects invalid ones. - Stores operations of the network in an SQL database of your choice (SQLite, PostgreSQL). - Materializes views on top of the known data. -- Answers filterable and paginated data queries via GraphQL. +- Answers filtered, sorted and paginated data queries via GraphQL. - Discovers other nodes in local network and internet. -- Replicates data with other nodes. +- Establishes connections (peer-to-peer via UDP holepunching) or via relays. +- Replicates data efficiently with other nodes. ## Example From fc9135b35cb0d1d57331e05527c23290e86b01ef Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 17:54:12 +0200 Subject: [PATCH 03/38] Write a little bit about configuration --- aquadoggo_cli/README.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 6b29ab298..8b4aab88c 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -1,13 +1,32 @@ # aquadoggo CLI -Node server with GraphQL API for the p2panda network. +Configurable node for the p2panda network. + +## Usage + +`aquadoggo` is a powerful node implementation which can run in very different setups during development and in production. It can be configured through a `config.toml` file, environment variables and command line arguments, depending on your needs. + +Check out the [`config.toml`](config.toml) file for all configurations and documentation. + +```bash +# Show all possible command line arguments +aquadoggo --help + +# Run aquadoggo in local development mode (default) +aquadoggo +``` ## Development ```bash -cargo run +# Run node during development with logging enabled +RUST_LOG=aquadoggo=debug cargo run + +# Run all tests cargo test -cargo build + +# Compile release binary +cargo build --release ``` ## License From 6c6a6f1f42efa05b1f2f582c794d94ae99f30ad2 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 18:02:54 +0200 Subject: [PATCH 04/38] Update usage --- README.md | 5 +- aquadoggo/README.md | 4 +- aquadoggo_cli/README.md | 155 +++++++++++++++++++++++++++++++++--- aquadoggo_cli/src/config.rs | 4 +- 4 files changed, 149 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1a8fcb1b3..3d75932c7 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,9 @@
-Configurable node server implementation for the [`p2panda`] network running as a -[`command line application`] or embedded via the [`library`] inside your Rust program. +Configurable node implementation for the [`p2panda`] network running as a +[`command line application`] or embedded via the [`library`] inside your Rust +program. > The core p2panda [`specification`] is fully functional but still under review so > please be prepared for breaking API changes until we reach v1.0. Currently no diff --git a/aquadoggo/README.md b/aquadoggo/README.md index 4f21d96d0..89de44f8e 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -43,8 +43,8 @@
-Configurable node server implementation for the [`p2panda`] network which can -be embedded inside your Rust program. +Configurable node implementation for the [`p2panda`] network which can be +embedded inside your Rust program. > The core p2panda [`specification`] is fully functional but still under review so > please be prepared for breaking API changes until we reach v1.0. Currently no diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 8b4aab88c..653e1b49a 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -1,19 +1,148 @@ -# aquadoggo CLI +

aquadoggo

-Configurable node for the p2panda network. +
+ Node for the p2panda network +
+ +
+ +
+

+ + Releases + + | + + Contribute + + | + + Website + +

+
+ +
+ +Configurable node implementation for the [`p2panda`] network. + +## Install + +### Pre-compiled binaries + +Check out our [Releases](releases) section. + +### Compile it yourself + +For the following steps you need a +[Rust](https://www.rust-lang.org/learn/get-started) development environment on +your machine. + +```bash +# Download source code +git clone https://github.com/p2panda/aquadoggo.git +cd aquadoggo + +# Compile binary +cargo build --release + +# Copy binary into your path (example) +cp ./target/release/aquadoggo ~/.local/bin +``` ## Usage `aquadoggo` is a powerful node implementation which can run in very different setups during development and in production. It can be configured through a `config.toml` file, environment variables and command line arguments, depending on your needs. -Check out the [`config.toml`](config.toml) file for all configurations and documentation. +Check out the [`config.toml`](config.toml) file for all configurations and documentation or run `--help` to see all possible command line arguments. All values can also be defined as environment variables, written in CAMEL_CASE (for example `HTTP_PORT=3000`). -```bash -# Show all possible command line arguments -aquadoggo --help +``` +Usage: aquadoggo [OPTIONS] + +Options: + -c, --config + Path to an optional "config.toml" file for further configuration. + + When not set the program will try to find a `config.toml` file in the same folder the program is executed in and otherwise in the regarding operation systems XDG config directory ("$HOME/.config/aquadoggo/config.toml" on Linux). + + -s, --allow-schema-ids [...] + List of schema ids which a node will replicate, persist and expose on the GraphQL API. Separate multiple values with a whitespace. Defaults to allow _any_ schemas ("*"). + + When allowing a schema you automatically opt into announcing, replicating and materializing documents connected to it, supporting applications and networks which are dependent on this data. + + It is recommended to set this list to all schema ids your own application should support, including all important system schemas. + + WARNING: When set to wildcard "*", your node will support _any_ schemas it will encounter on the network. This is useful for experimentation and local development but _not_ recommended for production settings. + + -d, --database-url + URL / connection string to PostgreSQL or SQLite database. Defaults to an in-memory SQLite database. + + WARNING: By default your node will not persist anything after shutdown. Set a database connection url for production settings to not loose data. + + -p, --http-port + HTTP port for client-node communication, serving the GraphQL API. Defaults to 2020 + + -q, --quic-port + QUIC port for node-node communication and data replication. Defaults to 2022 -# Run aquadoggo in local development mode (default) -aquadoggo + -k, --private-key + Path to persist your ed25519 private key file. Defaults to an ephemeral key only for this current session. + + The key is used to identify you towards other nodes during network discovery and replication. This key is _not_ used to create and sign data. + + If a path is set, a key will be generated newly and stored under this path when node starts for the first time. + + When no path is set, your node will generate an ephemeral private key on every start up and _not_ persist it. + + -m, --mdns [] + mDNS to discover other peers on the local network. Enabled by default + + [possible values: true, false] + + -n, --direct-node-addresses [...] + List of known node addresses we want to connect to directly. + + Make sure that nodes mentioned in this list are directly reachable (they need to be hosted with a static IP Address). If you need to connect to nodes with changing, dynamic IP addresses or even with nodes behind a firewall or NAT, do not use this field but use at least one relay. + + -a, --allow-peer-ids [...] + List of peers which are allowed to connect to your node. + + If set then only nodes (identified by their peer id) contained in this list will be able to connect to your node (via a relay or directly). When not set any other node can connect to yours. + + Peer IDs identify nodes by using their hashed public keys. They do _not_ represent authored data from clients and are only used to authenticate nodes towards each other during networking. + + Use this list for example for setups where the identifier of the nodes you want to form a network with is known but you still need to use relays as their IP addresses change dynamically. + + -b, --block-peer-ids [...] + List of peers which will be blocked from connecting to your node. + + If set then any peers (identified by their peer id) contained in this list will be blocked from connecting to your node (via a relay or directly). When an empty list is provided then there are no restrictions on which nodes can connect to yours. + + Block lists and allow lists are exclusive, which means that you should _either_ use a block list _or_ an allow list depending on your setup. + + Use this list for example if you want to allow _any_ node to connect to yours _except_ of a known number of excluded nodes. + + -r, --relay-addresses [...] + List of relay addresses. + + A relay helps discover other nodes on the internet (also known as "rendesvouz" or "bootstrap" server) and helps establishing direct p2p connections when node is behind a firewall or NAT (also known as "holepunching"). + + WARNING: This will potentially expose your IP address on the network. Do only connect to trusted relays or make sure your IP address is hidden via a VPN or proxy if you're concerned about leaking your IP. + + -e, --relay-mode [] + Enable if node should also function as a relay. Disabled by default. + + Other nodes can use relays to aid discovery and establishing connectivity. + + Relays _need_ to be hosted in a way where they can be reached directly, for example with a static IP address through an VPS. + + [possible values: true, false] + + -h, --help + Print help (see a summary with '-h') + + -V, --version + Print version ``` ## Development @@ -22,11 +151,8 @@ aquadoggo # Run node during development with logging enabled RUST_LOG=aquadoggo=debug cargo run -# Run all tests +# Run tests cargo test - -# Compile release binary -cargo build --release ``` ## License @@ -36,6 +162,9 @@ GNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE) ## Supported by
+
-*This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement No 871528* +*This project has received funding from the European Union’s Horizon 2020 +research and innovation programme within the framework of the NGI-POINTER +Project funded under grant agreement No 871528* diff --git a/aquadoggo_cli/src/config.rs b/aquadoggo_cli/src/config.rs index f6e3ab806..ebf4cae17 100644 --- a/aquadoggo_cli/src/config.rs +++ b/aquadoggo_cli/src/config.rs @@ -67,8 +67,8 @@ pub fn load_config() -> Result<(ConfigFilePath, Configuration)> { /// been set. #[derive(Parser, Serialize, Debug)] #[command( - name = "aquadoggo Node", - about = "Node server for the p2panda network", + name = "aquadoggo", + about = "Node for the p2panda network", long_about = None, version )] From a5f9ec8a1d6c1513eed4ab9d130e79f7f4ae9fcd Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 18:03:45 +0200 Subject: [PATCH 05/38] Fix link --- aquadoggo_cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 653e1b49a..55a9d8d4f 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -24,7 +24,7 @@
-Configurable node implementation for the [`p2panda`] network. +Configurable node implementation for the [`p2panda`](https://p2panda.org) network. ## Install From cfc03b96106f0f164564c01ac3a8ead8ddf03b76 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 18:11:00 +0200 Subject: [PATCH 06/38] Add examples --- aquadoggo_cli/README.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 55a9d8d4f..d254c78ed 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -24,7 +24,7 @@
-Configurable node implementation for the [`p2panda`](https://p2panda.org) network. +Configurable node implementation for the [`p2panda`] network. ## Install @@ -50,11 +50,32 @@ cargo build --release cp ./target/release/aquadoggo ~/.local/bin ``` +## Examples + +```bash +# For experimental setups it is enough to just start the node! +aquadoggo + +# By default the config.toml is loaded from the same folder or from the XDG +# data directory, but you can also specify a custom path +aquadoggo -c ../config.toml + +# Expose your node on all interfaces +aquadoggo -i 0.0.0.0 + +# Turn your aquadoggo into a relay +aquadoggo --relay-mode + +# Check out the config.toml file for more options or consult the help menu. You +# might need it for more sophisticated setups +aquadoggo --help +``` + ## Usage -`aquadoggo` is a powerful node implementation which can run in very different setups during development and in production. It can be configured through a `config.toml` file, environment variables and command line arguments, depending on your needs. +`aquadoggo` is a powerful node implementation which can run in very different setups during development and in production. It can be configured through a [`config.toml`] file, environment variables and command line arguments, depending on your needs. -Check out the [`config.toml`](config.toml) file for all configurations and documentation or run `--help` to see all possible command line arguments. All values can also be defined as environment variables, written in CAMEL_CASE (for example `HTTP_PORT=3000`). +Check out the [`config.toml`] file for all configurations and documentation or run `--help` to see all possible command line arguments. All values can also be defined as environment variables, written in CAMEL_CASE (for example `HTTP_PORT=3000`). ``` Usage: aquadoggo [OPTIONS] @@ -168,3 +189,6 @@ GNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE) *This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement No 871528* + +[`config.toml`]: config.toml +[`p2panda`]: https://p2panda.org From 513cca1ca6c1e7a83bd00877c6104f5e6c4b9a00 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 18:15:07 +0200 Subject: [PATCH 07/38] Update README.md --- aquadoggo_cli/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index d254c78ed..4b0a66a68 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -1,4 +1,4 @@ -

aquadoggo

+

aquadoggo CLI

Node for the p2panda network @@ -60,9 +60,6 @@ aquadoggo # data directory, but you can also specify a custom path aquadoggo -c ../config.toml -# Expose your node on all interfaces -aquadoggo -i 0.0.0.0 - # Turn your aquadoggo into a relay aquadoggo --relay-mode From 97cbbf57949e584aa0d94cd231d810410fc9ae07 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 18:18:14 +0200 Subject: [PATCH 08/38] Update README.md --- aquadoggo_cli/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 4b0a66a68..e69fe3fa8 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -24,7 +24,8 @@
-Configurable node implementation for the [`p2panda`] network. +Configurable node for the [`p2panda`] network, which runs as a command line +application on any computer, raspberry pi or server. ## Install From 6622a6006dba167ca88d25a60ca7a10d939443e3 Mon Sep 17 00:00:00 2001 From: adz Date: Fri, 25 Aug 2023 18:24:07 +0200 Subject: [PATCH 09/38] Update README.md --- README.md | 18 ++++++++++++------ aquadoggo_cli/README.md | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3d75932c7..6a6406232 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ program. ## Example -Embed the node server in your Rust application or web container like [`Tauri`]: +Embed the node server in your Rust application, mobile application (via [FFI bindings](https://github.com/p2panda/meli/)) or web container like [`Tauri`]: ```rust use aquadoggo::{Configuration, Node}; @@ -80,26 +80,32 @@ let key_pair = KeyPair::new(); let node = Node::start(key_pair, config).await; ``` -You can also run the node server simply as a [command line application][`command line application`]: +You can also run the node simply as a [command line application][`command line application`] and [configure](/aquadoggo_cli/README.md#Usage) it: ```bash -# Compile and run local node at http://localhost:2020/graphql -cargo run +# Run local node +aquadoggo # Enable logging -RUST_LOG=aquadoggo=info cargo run +RUST_LOG=aquadoggo=info aquadoggo ``` .. or run it inside a [Docker](https://hub.docker.com/r/p2panda/aquadoggo) container: ```bash -docker run -p 2020:2020 -e RUST_LOG=aquadoggo=info p2panda/aquadoggo +docker run -p 2020:2020 -p 2022:2022 -e RUST_LOG=aquadoggo=info p2panda/aquadoggo ``` [`Tauri`]: https://tauri.studio ## Installation +### Command line application + +Check out our [Releases](releases) section or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. + +### Rust Crate + ```sh cargo add aquadoggo ``` diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index e69fe3fa8..2ae08a33e 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -27,7 +27,7 @@ Configurable node for the [`p2panda`] network, which runs as a command line application on any computer, raspberry pi or server. -## Install +## Installation ### Pre-compiled binaries From ec67a71d428f050243fc47a743806c8f5b373e82 Mon Sep 17 00:00:00 2001 From: adz Date: Wed, 30 Aug 2023 19:29:20 +0200 Subject: [PATCH 10/38] Update README.md --- README.md | 174 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 141 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 6a6406232..839412ef8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

aquadoggo

- Embeddable p2p network node + p2panda network node

@@ -43,18 +43,11 @@
-Configurable node implementation for the [`p2panda`] network running as a -[`command line application`] or embedded via the [`library`] inside your Rust -program. +`aquadoggo` is a reference node implementation for [p2panda](https://p2panda.org). It is a intended as a tool for making the design and build of local-first, collaborative p2p applications as simple as possible, and hopefully even a little fun! -> The core p2panda [`specification`] is fully functional but still under review so -> please be prepared for breaking API changes until we reach v1.0. Currently no -> p2panda implementation has received a security audit. +`aquadoggo` can run both on your own device for local-first applications, or on a public server when acting as shared community infrastructure. Nodes like `aquadoggo` perform a number of tasks ranging from core p2panda data replication and validation, aiding the discovery and establishment of connections between edge peers, and exposing a developer friendly API used for building applications. -[`command line application`]: /aquadoggo_cli -[`library`]: /aquadoggo -[`p2panda`]: https://p2panda.org/ -[`specification`]: https://p2panda.org/specification +Read more about nodes in our [learn](https://p2panda.org/learn/networks) section. ## Features @@ -64,51 +57,166 @@ program. - Materializes views on top of the known data. - Answers filtered, sorted and paginated data queries via GraphQL. - Discovers other nodes in local network and internet. -- Establishes connections (peer-to-peer via UDP holepunching) or via relays. +- Establishes peer-to-peer connections via UDP holepunching or via relays. - Replicates data efficiently with other nodes. -## Example +## Who is this for? + +`aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. No programming experience is needed to deploy a node on your own machine, and you can even experiment with creating your own data schemas (using [`fishy`](https://github.com/p2panda/fishy)), publishing and replicating data (try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) or play with [`send-to-node`](https://github.com/p2panda/send-to-node)) and then querying it again using the graphql playground (by default served at `localhost:2020/graphql`). + +## What can I build with this? + +`aquadoggo` is a fully featured p2p "backend", which takes some of the complexity out of building p2p applications. If you want to build a client application which communicates with an `aquadoggo` it will be of great help if you already have some experience with web development or using the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. + +Some example applications which could be built on top of `aquadoggo` are: + +- **Community Centre resource management:** Members of the centre want to manage some shared resources (table tennis, tools, cooking equipment), they each run an app ([Tauri](https://tauri.app/) desktop app with a bundled `aquadoggo` inside) on their own devices, where they can add resources, view availability and making loan requests. Discovery and syncing of data occurs automatically when member's devices are on the same local network. +
+ See config +
+ + ```yaml + # Schemas needed for our application + allow_schema_ids = [ + "resource_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", + "resource_booking_request_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0", + "resource_booking_accepted_00209a75d6f1440c188fa52555c8cdd60b3988e468e1db2e469b7d4425a225eba8ec" + ] + + # We want mDNS discovery enabled + mdns = true + ``` +
+- **Local ecology monitoring:** Village residents want to collect data on bird species which are sighted in their area over the year. They want anyone with the app to be able to upload a sighting. All the residents run a native Android app on their smartphone, and they make use of a number of relay nodes which enables discovery and p2p or relayed connection establishment. +
+ See config +
+ + _app node config_ + ```yaml + # Schemas needed for our application + allow_schema_ids = [ + "bird_species_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", + "bird_sighting_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" + ] + + # Addresses of the relay nodes + relay_addresses = [ + "203.0.114.0:2022", + "203.0.114.1:2022", + ] + ``` + + _relay node config_ + ```yaml + # A relay doesn't need to support any schemas + allow_schema_ids = [] + + # Enable relay mode + relay_mode = true + ``` +
+- **Coop notice boards:** residents of a group of housing coops want to start a collaborative notice board. Each coop deploys a node on their local network and residents access a web-app to post and view ads or news. They're already using a shared VPN so nodes can connect directly, but only some coops are allowed to join the noticeboard network. +
+ See config +
+ + ```yaml + # Schemas needed for our application + allow_schema_ids = [ + "notice_board_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", + "notice_board_post_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" + ] + + # Address of known nodes we can connect directly to + direct_node_addresses = [ + "203.0.114.0:2022", + "203.0.114.1:2022", + "203.0.114.2:2022", + "203.0.114.3:2022", + ] + + # Peer ids of allowed peers, these will be the expected ids for the nodes we are connecting + # directly to + allowed_peer_ids = [ + "12D3KooWP1ahRHeNp6s1M9qDJD2oyqRsYFeKLYjcjmFxrq6KM8xd", + "12D3KooWPC9zdWXQ3aCEcxvuct9KUWU5tPsUT6KFo29Wf8jWRW24", + "12D3KooWDNNSdY8vxYKYZBGdfDTg1ZafxEVuEmh49jtF8rUeMkq2", + "12D3KooWMKiBvAxynLn7KmqbWdEzA8yq3of6yoLZF1cpmb4Z9fHf", + ] + ``` +
+ +We're excited to hear about your ideas! Join our [official chat](https://wald.liebechaos.org/) and reach out. -Embed the node server in your Rust application, mobile application (via [FFI bindings](https://github.com/p2panda/meli/)) or web container like [`Tauri`]: +## Installation -```rust -use aquadoggo::{Configuration, Node}; -use p2panda_rs::identity::KeyPair; +### Command line application -let config = Configuration::default(); -let key_pair = KeyPair::new(); -let node = Node::start(key_pair, config).await; +Check out our [Releases](releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. + +### Rust Crate + +For using `aquadoggo` in your Rust project, you can add it as a dependency with the following command: + +```bash +cargo add aquadoggo ``` -You can also run the node simply as a [command line application][`command line application`] and [configure](/aquadoggo_cli/README.md#Usage) it: +## Usage + +### Run node + +You can also run the node simply as a [command line application](#). `aquadoggo` can be configured in countless ways for your needs, read our [configuration](/aquadoggo_cli/README.md#Usage) section for more examples, usecases and an overview of configuration options. ```bash -# Run local node +# Start a local node on your machine aquadoggo +# Check out all configuration options +aquadoggo --help + # Enable logging -RUST_LOG=aquadoggo=info aquadoggo +aquadoggo --log-level info ``` -.. or run it inside a [Docker](https://hub.docker.com/r/p2panda/aquadoggo) container: +### Docker + +For server deployments you might prefer using [Docker](https://hub.docker.com/r/p2panda/aquadoggo) to run `aquadoggo`. ```bash -docker run -p 2020:2020 -p 2022:2022 -e RUST_LOG=aquadoggo=info p2panda/aquadoggo +docker run -p 2020:2020 -p 2022:2022 -e LOG_LEVEL=info p2panda/aquadoggo ``` -[`Tauri`]: https://tauri.studio +### Embed node -## Installation +Run the node directly within the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a Desktop app. -### Command line application +```rust +use aquadoggo::{Configuration, Node}; +use p2panda_rs::identity::KeyPair; -Check out our [Releases](releases) section or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. +let config = Configuration::default(); +let key_pair = KeyPair::new(); +let node = Node::start(key_pair, config).await; +``` -### Rust Crate +### FFI bindings -```sh -cargo add aquadoggo -``` +If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Flutter project as an example on how we dealt with FFI bindings for Dart / Flutter. + +## What shouldn't I do with `aquadoggo`? + +`aquadoggo` is built using the [p2panda](https://p2panda.org) protocol which is in development and some planned features are still missing, the main ones being: + +- **Capabilities:** Currently all data can be edited by any author who has access to the network. In many cases, permissions can be handled where needed on the client side (planned mid-2024). +- **Privacy:** While node communication is encrypted with TLS the data stored on nodes itself is not. Integration of [MLS](https://p2panda.org/specification/encryption/) is underway but not complete yet. +- **Deletion:** Network-wide purging of data is dependent on having a capabilities system already in place, so these two features will arrive together. +- **Anonymity:** Networking exposes sensitive data about your used devices, we're waiting for [Arti](https://tpo.pages.torproject.net/core/arti/) supporting Onion Services to make this a configurable option. + +As well as these yet-to-be implemented features, there are also general networking concerns (exposing your IP address, sharing data with untrusted peers) that you should take into account when participating in any network, and particularily in peer-to-peer networks. + +So although `aquadoggo` is already very useful in many cases, there are others where it won't be a good fit yet or we would actively warn against use. For now, any uses which would be handling especially sensitive data are not recommended, and any users who have special network security requirements need to take extra precautions. ## License From 43bc1fe70e53a31eb6c3185a2f65a189177a866e Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 19:59:31 +0200 Subject: [PATCH 11/38] Update README.md --- README.md | 64 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 839412ef8..1e727158d 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ `aquadoggo` can run both on your own device for local-first applications, or on a public server when acting as shared community infrastructure. Nodes like `aquadoggo` perform a number of tasks ranging from core p2panda data replication and validation, aiding the discovery and establishment of connections between edge peers, and exposing a developer friendly API used for building applications. -Read more about nodes in our [learn](https://p2panda.org/learn/networks) section. +> πŸ“– Read more about nodes in our [learn](https://p2panda.org/learn/networks) section ## Features @@ -62,28 +62,32 @@ Read more about nodes in our [learn](https://p2panda.org/learn/networks) section ## Who is this for? -`aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. No programming experience is needed to deploy a node on your own machine, and you can even experiment with creating your own data schemas (using [`fishy`](https://github.com/p2panda/fishy)), publishing and replicating data (try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) or play with [`send-to-node`](https://github.com/p2panda/send-to-node)) and then querying it again using the graphql playground (by default served at `localhost:2020/graphql`). +`aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. No programming experience is needed to deploy a node on your own machine, and you can even experiment with creating your own data schemas using, publishing and replicating data, and then querying it again using the GraphQL playground. + +> πŸ› οΈ Create your own schemas using [`fishy`](https://github.com/p2panda/fishy)
+> πŸ“– Try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) or play with [`send-to-node`](https://github.com/p2panda/send-to-node)
+> πŸ›Ό Open the GraphQL playground in your browser, served under `http://localhost:2020/graphql` ## What can I build with this? -`aquadoggo` is a fully featured p2p "backend", which takes some of the complexity out of building p2p applications. If you want to build a client application which communicates with an `aquadoggo` it will be of great help if you already have some experience with web development or using the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. +`aquadoggo` is a fully-featured p2p "backend", which takes some of the complexity out of building p2p applications. If you want to build a client application which communicates with an `aquadoggo` it will be of great help if you already have some experience with web development or the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. Some example applications which could be built on top of `aquadoggo` are: -- **Community Centre resource management:** Members of the centre want to manage some shared resources (table tennis, tools, cooking equipment), they each run an app ([Tauri](https://tauri.app/) desktop app with a bundled `aquadoggo` inside) on their own devices, where they can add resources, view availability and making loan requests. Discovery and syncing of data occurs automatically when member's devices are on the same local network. +- **Community centre resource management:** Members of the centre want to manage some shared resources (table tennis, tools, cooking equipment), they each run an app ([Tauri](https://tauri.app/) desktop app with a bundled `aquadoggo` inside) on their own devices, where they can add resources, view availability and making loan requests. Discovery and syncing of data occurs automatically when member's devices are on the same local network.
See config
- ```yaml - # Schemas needed for our application + ```toml + # Schemas needed for our resource management application allow_schema_ids = [ "resource_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", "resource_booking_request_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0", - "resource_booking_accepted_00209a75d6f1440c188fa52555c8cdd60b3988e468e1db2e469b7d4425a225eba8ec" + "resource_booking_accepted_00209a75d6f1440c188fa52555c8cdd60b3988e468e1db2e469b7d4425a225eba8ec", ] - # We want mDNS discovery enabled + # Enable mDNS discovery to automatically find other nodes on the local network and share data with them mdns = true ```
@@ -93,22 +97,22 @@ Some example applications which could be built on top of `aquadoggo` are:
_app node config_ - ```yaml - # Schemas needed for our application + ```toml + # Schemas needed for our ecology monitoring application allow_schema_ids = [ "bird_species_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", - "bird_sighting_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" + "bird_sighting_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0", ] - # Addresses of the relay nodes + # Addresses of the relay nodes helping us to connect the residents over the internet relay_addresses = [ - "203.0.114.0:2022", - "203.0.114.1:2022", + "203.0.113.1:2022", + "198.51.100.21:2022", ] ``` _relay node config_ - ```yaml + ```toml # A relay doesn't need to support any schemas allow_schema_ids = [] @@ -121,22 +125,22 @@ Some example applications which could be built on top of `aquadoggo` are: See config
- ```yaml - # Schemas needed for our application + ```toml + # Schemas needed for our coop notice board application allow_schema_ids = [ "notice_board_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", - "notice_board_post_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" + "notice_board_post_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0", ] - # Address of known nodes we can connect directly to + # Addresses of already known nodes we can connect directly to direct_node_addresses = [ - "203.0.114.0:2022", - "203.0.114.1:2022", - "203.0.114.2:2022", - "203.0.114.3:2022", + "192.0.2.78:2022", + "198.51.100.22:2022", + "192.0.2.211:2022", + "203.0.114.123:2022", ] - # Peer ids of allowed peers, these will be the expected ids for the nodes we are connecting + # Peer ids of allowed peers, these will be the expected identities for the nodes we are connecting # directly to allowed_peer_ids = [ "12D3KooWP1ahRHeNp6s1M9qDJD2oyqRsYFeKLYjcjmFxrq6KM8xd", @@ -153,7 +157,7 @@ We're excited to hear about your ideas! Join our [official chat](https://wald.li ### Command line application -Check out our [Releases](releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. +Check out our [Releases](/releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. ### Rust Crate @@ -170,7 +174,7 @@ cargo add aquadoggo You can also run the node simply as a [command line application](#). `aquadoggo` can be configured in countless ways for your needs, read our [configuration](/aquadoggo_cli/README.md#Usage) section for more examples, usecases and an overview of configuration options. ```bash -# Start a local node on your machine +# Start a local node on your machine, go to http://localhost:2020/graphql for using the GraphQL playground aquadoggo # Check out all configuration options @@ -190,7 +194,7 @@ docker run -p 2020:2020 -p 2022:2022 -e LOG_LEVEL=info p2panda/aquadoggo ### Embed node -Run the node directly within the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a Desktop app. +Run the node directly within the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. ```rust use aquadoggo::{Configuration, Node}; @@ -203,7 +207,7 @@ let node = Node::start(key_pair, config).await; ### FFI bindings -If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Flutter project as an example on how we dealt with FFI bindings for Dart / Flutter. +If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. ## What shouldn't I do with `aquadoggo`? @@ -216,7 +220,7 @@ If you are not working with Rust you can create FFI bindings from the `aquadoggo As well as these yet-to-be implemented features, there are also general networking concerns (exposing your IP address, sharing data with untrusted peers) that you should take into account when participating in any network, and particularily in peer-to-peer networks. -So although `aquadoggo` is already very useful in many cases, there are others where it won't be a good fit yet or we would actively warn against use. For now, any uses which would be handling especially sensitive data are not recommended, and any users who have special network security requirements need to take extra precautions. +So although `aquadoggo` is already very useful in many cases, there are others where it won't be a good fit yet or we would actively warn against use. For now, any uses which would be handling especially sensitive data are not recommended, and any users who have special network security requirements need to take extra precautions. Reach out on our [official chat](https://wald.liebechaos.org/) if you have any questions. ## License @@ -230,4 +234,4 @@ GNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE) *This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER -Project funded under grant agreement No 871528* +Project funded under grant agreement No 871528 and NGI-ASSURE No 957073* From da3e8b2b65165e45c3c324b4f2daa0aa8b0b59d2 Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 20:06:30 +0200 Subject: [PATCH 12/38] Update README.md --- aquadoggo_cli/README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 2ae08a33e..9f8717cf5 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -1,7 +1,7 @@

aquadoggo CLI

- Node for the p2panda network + p2panda network node

@@ -25,7 +25,7 @@
Configurable node for the [`p2panda`] network, which runs as a command line -application on any computer, raspberry pi or server. +application on any computer, Raspberry Pi or server. ## Installation @@ -57,6 +57,9 @@ cp ./target/release/aquadoggo ~/.local/bin # For experimental setups it is enough to just start the node! aquadoggo +# Enable logging +aquadoggo --log-level info + # By default the config.toml is loaded from the same folder or from the XDG # data directory, but you can also specify a custom path aquadoggo -c ../config.toml @@ -157,6 +160,13 @@ Options: [possible values: true, false] + -l, --log-level + Set log verbosity. Use this for learning more about how your node behaves or for debugging. + + Possible log levels are: ERROR, WARN, INFO, DEBUG, TRACE. They are scoped to "aquadoggo" by default. + + If you want to adjust the scope for deeper inspection use a filter value, for example "=TRACE" for logging _everything_ or "aquadoggo=INFO,libp2p=DEBUG" etc. + -h, --help Print help (see a summary with '-h') @@ -168,7 +178,7 @@ Options: ```bash # Run node during development with logging enabled -RUST_LOG=aquadoggo=debug cargo run +LOG_LEVEL=debug cargo run # Run tests cargo test @@ -186,7 +196,7 @@ GNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE) *This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER -Project funded under grant agreement No 871528* +Project funded under grant agreement No 871528 and NGI-ASSURE No 957073* [`config.toml`]: config.toml [`p2panda`]: https://p2panda.org From 09933530f9f94ded01726bd9b00b30082ce5e576 Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 20:59:33 +0200 Subject: [PATCH 13/38] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e727158d..ac119a859 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,9 @@ ## Who is this for? -`aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. No programming experience is needed to deploy a node on your own machine, and you can even experiment with creating your own data schemas using, publishing and replicating data, and then querying it again using the GraphQL playground. +`aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. + +No programming experience is needed to deploy a node on your own machine, and you can even experiment with creating your own data schemas using, publishing and replicating data, and then querying it again using the GraphQL playground. > πŸ› οΈ Create your own schemas using [`fishy`](https://github.com/p2panda/fishy)
> πŸ“– Try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) or play with [`send-to-node`](https://github.com/p2panda/send-to-node)
@@ -70,7 +72,9 @@ ## What can I build with this? -`aquadoggo` is a fully-featured p2p "backend", which takes some of the complexity out of building p2p applications. If you want to build a client application which communicates with an `aquadoggo` it will be of great help if you already have some experience with web development or the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. +`aquadoggo` is a fully-featured p2p "backend", which takes some of the complexity out of building p2p applications. If you want to build a client application which communicates with an `aquadoggo` it will be of great help if you already have some experience with web development or the Rust programming language. + +For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. Some example applications which could be built on top of `aquadoggo` are: From 913c3e19f19d31b9e322c62a01490507040566e3 Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:01:19 +0200 Subject: [PATCH 14/38] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ac119a859..aa542ea96 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ For writing an application using Rust you can import `aquadoggo` directly in you Some example applications which could be built on top of `aquadoggo` are: -- **Community centre resource management:** Members of the centre want to manage some shared resources (table tennis, tools, cooking equipment), they each run an app ([Tauri](https://tauri.app/) desktop app with a bundled `aquadoggo` inside) on their own devices, where they can add resources, view availability and making loan requests. Discovery and syncing of data occurs automatically when member's devices are on the same local network. +- πŸ₯„ **Community centre resource management:** Members of the centre want to manage some shared resources (table tennis, tools, cooking equipment), they each run an app ([Tauri](https://tauri.app/) desktop app with a bundled `aquadoggo` inside) on their own devices, where they can add resources, view availability and making loan requests. Discovery and syncing of data occurs automatically when member's devices are on the same local network.
See config
@@ -95,7 +95,7 @@ Some example applications which could be built on top of `aquadoggo` are: mdns = true ```
-- **Local ecology monitoring:** Village residents want to collect data on bird species which are sighted in their area over the year. They want anyone with the app to be able to upload a sighting. All the residents run a native Android app on their smartphone, and they make use of a number of relay nodes which enables discovery and p2p or relayed connection establishment. +- 🐦 **Local ecology monitoring:** Village residents want to collect data on bird species which are sighted in their area over the year. They want anyone with the app to be able to upload a sighting. All the residents run a native Android app on their smartphone, and they make use of a number of relay nodes which enables discovery and p2p or relayed connection establishment.
See config
@@ -124,7 +124,7 @@ Some example applications which could be built on top of `aquadoggo` are: relay_mode = true ```
-- **Coop notice boards:** residents of a group of housing coops want to start a collaborative notice board. Each coop deploys a node on their local network and residents access a web-app to post and view ads or news. They're already using a shared VPN so nodes can connect directly, but only some coops are allowed to join the noticeboard network. +- πŸ—žοΈ **Coop notice boards:** residents of a group of housing coops want to start a collaborative notice board. Each coop deploys a node on their local network and residents access a web-app to post and view ads or news. They're already using a shared VPN so nodes can connect directly, but only some coops are allowed to join the noticeboard network.
See config
From 21b69833da2cb0ce884c922c6c2059e7240beb8b Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:02:04 +0200 Subject: [PATCH 15/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa542ea96..03ecbccea 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ cargo add aquadoggo ### Run node -You can also run the node simply as a [command line application](#). `aquadoggo` can be configured in countless ways for your needs, read our [configuration](/aquadoggo_cli/README.md#Usage) section for more examples, usecases and an overview of configuration options. +You can also run the node simply as a [command line application](/aquadoggo_cli). `aquadoggo` can be configured in countless ways for your needs, read our [configuration](/aquadoggo_cli/README.md#Usage) section for more examples, usecases and an overview of configuration options. ```bash # Start a local node on your machine, go to http://localhost:2020/graphql for using the GraphQL playground From 4517694117d57c231de63dcf537a55f17de3896b Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:05:47 +0200 Subject: [PATCH 16/38] Update README.md --- aquadoggo_cli/README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 9f8717cf5..bb6a9b5f2 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -25,13 +25,13 @@
Configurable node for the [`p2panda`] network, which runs as a command line -application on any computer, Raspberry Pi or server. +application on any computer, single-board or server. ## Installation ### Pre-compiled binaries -Check out our [Releases](releases) section. +Check out our [Releases](/releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows. ### Compile it yourself @@ -178,7 +178,10 @@ Options: ```bash # Run node during development with logging enabled -LOG_LEVEL=debug cargo run +cargo run -- --log-level debug + +# Show logs of all modules +cargo run -- --log-level "=debug" # Run tests cargo test From 49f7d713c9679bc28dc23d3cf06688973adf6e52 Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:08:37 +0200 Subject: [PATCH 17/38] Update README.md --- aquadoggo/README.md | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/aquadoggo/README.md b/aquadoggo/README.md index 89de44f8e..bc3118dde 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -43,15 +43,11 @@
-Configurable node implementation for the [`p2panda`] network which can be -embedded inside your Rust program. +`aquadoggo` is a reference node implementation for [p2panda](https://p2panda.org). It is a intended as a tool for making the design and build of local-first, collaborative p2p applications as simple as possible, and hopefully even a little fun! -> The core p2panda [`specification`] is fully functional but still under review so -> please be prepared for breaking API changes until we reach v1.0. Currently no -> p2panda implementation has recieved a security audit. +`aquadoggo` can run both on your own device for local-first applications, or on a public server when acting as shared community infrastructure. Nodes like `aquadoggo` perform a number of tasks ranging from core p2panda data replication and validation, aiding the discovery and establishment of connections between edge peers, and exposing a developer friendly API used for building applications. -[`p2panda`]: https://p2panda.org -[`specification`]: https://p2panda.org/specification +> πŸ“– Read more about nodes in our [learn](https://p2panda.org/learn/networks) section ## Features @@ -61,12 +57,20 @@ embedded inside your Rust program. - Materializes views on top of the known data. - Answers filtered, sorted and paginated data queries via GraphQL. - Discovers other nodes in local network and internet. -- Establishes connections (peer-to-peer via UDP holepunching) or via relays. +- Establishes peer-to-peer connections via UDP holepunching or via relays. - Replicates data efficiently with other nodes. +## Installation + +For using `aquadoggo` in your Rust project, you can add it as a dependency with the following command: + +```bash +cargo add aquadoggo +``` + ## Example -Embed the node server in your Rust application or web container like [`Tauri`]: +Run the node directly within the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. ```rust use aquadoggo::{Configuration, Node}; @@ -77,17 +81,9 @@ let key_pair = KeyPair::new(); let node = Node::start(key_pair, config).await; ``` -[`Tauri`]: https://tauri.studio - -## Installation - -With [`cargo-edit`](https://github.com/killercup/cargo-edit) installed run: - -```bash -$ cargo add aquadoggo -``` +## FFI bindings -[`cargo-edit`]: https://github.com/killercup/cargo-edit +If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. ## Development @@ -108,8 +104,9 @@ GNU Affero General Public License v3.0 [`AGPL-3.0-or-later`](LICENSE) ## Supported by
+
*This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER -Project funded under grant agreement No 871528* +Project funded under grant agreement No 871528 and NGI-ASSURE No 957073* From e78f87e77f051077a4a9aeb74fe77cb211f5259f Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:10:15 +0200 Subject: [PATCH 18/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03ecbccea..91e29741d 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ docker run -p 2020:2020 -p 2022:2022 -e LOG_LEVEL=info p2panda/aquadoggo ### Embed node -Run the node directly within the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. +Run the node directly next to the frontend you're building for full peer-to-peer applications by using the [`aquadoggo`](/aquadoggo) Rust crate. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. ```rust use aquadoggo::{Configuration, Node}; From fbe3ae369916d093f7de85aca66c2fc257b403f8 Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:10:18 +0200 Subject: [PATCH 19/38] Update README.md --- aquadoggo/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aquadoggo/README.md b/aquadoggo/README.md index bc3118dde..e34f453c6 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -70,7 +70,7 @@ cargo add aquadoggo ## Example -Run the node directly within the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. +Run the node directly next to the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. ```rust use aquadoggo::{Configuration, Node}; @@ -81,7 +81,7 @@ let key_pair = KeyPair::new(); let node = Node::start(key_pair, config).await; ``` -## FFI bindings +### FFI bindings If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. From aeeb9804a1ccd6d2ac72dcf8637b43ca5b22df52 Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 21:53:12 +0200 Subject: [PATCH 20/38] Update README.md --- aquadoggo_cli/README.md | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index bb6a9b5f2..3182af642 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -76,6 +76,89 @@ aquadoggo --help `aquadoggo` is a powerful node implementation which can run in very different setups during development and in production. It can be configured through a [`config.toml`] file, environment variables and command line arguments, depending on your needs. +### Common setups + +#### Support only a certain schema + +> "I want to run a node which only replicates and serves data from a limit set of schema. In this case it's schema required by a mushroom sighting app." + +```toml +allow_schema_ids = [ + "mushroom_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d", + "mushroom_finding_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" +] +``` + +#### Support all schemas but restrict allowed peers + +> "Me and my friends are running our own `p2panda` network supported by a couple of relay nodes, we trust each other and want to support all published data, but not allow anyone else to join the network." + +```toml +# I can do this by configuring `allow_schema_ids` to be a wildcard, meaning any schema +# are automatically supported! +allow_schema_ids = "*" + +# Add relay addresses to allow establishing connections over the internet +relay_addresses = [ + "203.0.113.12:2022", + "203.0.113.34:2022", +] + +# Enable discovery using mDNS (true by default) +mdns = true + +# Populate an allow list which will contain the peer ids of our friends (including +# the ones acting as relays) +allow_peer_ids = [ + "12D3KooWLxGKMgUtekXam9JsSjMa3b7M3rYEYUYUywdehHTRrLgU", + "12D3KooWP1ahRHeNp6s1M9qDJD2oyqRsYFeKLYjcjmFxrq6KM8xd", +] +``` + +#### Act as a relay node + +> "I want to deploy a relay which assists in connecting edge peers but doesn't persist any data itself." + +```toml +# I can do this by configuring `allow_schema_ids` an empty list, meaning this node +# does not support any schemas +allow_schema_ids = [] + +# Then set the relay flag so this node behaves as a relay for other nodes +relay_mode = true +``` + +#### Directly connect to known peers + +> "I want my node to connect to a list of known and accessible peers." + +```toml +# Allow all schemas +allow_schema_ids = "*" + +# Address of nodes with static IP addresses we can connect directly to +direct_node_addresses = [ + "192.0.2.78:2022", + "198.51.100.22:2022", + "192.0.2.211:2022", + "203.0.114.123:2022", +] +``` + +#### Persist node identity and database + +> "I want my node to persist it's identity and database on the filesystem and retreive them whenever it runs again." + +```toml +# Persist node private key at given location (using Linux XDG paths as an example) +private_key = "$HOME/.local/share/aquadoggo/private-key.txt" + +# Persist SQLite database at given location +database_url = "sqlite:$HOME/.local/share/aquadoggo/db.sqlite3" +``` + +### Configuration + Check out the [`config.toml`] file for all configurations and documentation or run `--help` to see all possible command line arguments. All values can also be defined as environment variables, written in CAMEL_CASE (for example `HTTP_PORT=3000`). ``` From 094131ef5c605903e14ec617c40ae6659b1b2ecb Mon Sep 17 00:00:00 2001 From: Andreas Dzialocha Date: Wed, 30 Aug 2023 23:00:04 +0200 Subject: [PATCH 21/38] Update README.md --- aquadoggo_cli/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 3182af642..9468895e1 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -78,9 +78,9 @@ aquadoggo --help ### Common setups -#### Support only a certain schema +#### Support only certain schemas -> "I want to run a node which only replicates and serves data from a limit set of schema. In this case it's schema required by a mushroom sighting app." +> "I want to run a node which only replicates and serves data from a limited set of schemas. In this case it's schemas required by a mushroom sighting app." ```toml allow_schema_ids = [ From 1ce7d8a1a688efdeef36d8164fd5cc63aedd1cc9 Mon Sep 17 00:00:00 2001 From: adz Date: Wed, 30 Aug 2023 23:02:43 +0200 Subject: [PATCH 22/38] Wrap lines --- aquadoggo_cli/README.md | 138 ++++++++++++++++++++++++++++------------ 1 file changed, 99 insertions(+), 39 deletions(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index 9468895e1..e3453ba32 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -31,7 +31,8 @@ application on any computer, single-board or server. ### Pre-compiled binaries -Check out our [Releases](/releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows. +Check out our [Releases](/releases) section where we publish binaries for +Linux, RaspberryPi, MacOS and Windows. ### Compile it yourself @@ -74,13 +75,18 @@ aquadoggo --help ## Usage -`aquadoggo` is a powerful node implementation which can run in very different setups during development and in production. It can be configured through a [`config.toml`] file, environment variables and command line arguments, depending on your needs. +`aquadoggo` is a powerful node implementation which can run in very different +setups during development and in production. It can be configured through a +[`config.toml`] file, environment variables and command line arguments, +depending on your needs. ### Common setups #### Support only certain schemas -> "I want to run a node which only replicates and serves data from a limited set of schemas. In this case it's schemas required by a mushroom sighting app." +> "I want to run a node which only replicates and serves data from a limited +> set of schemas. In this case it's schemas required by a mushroom sighting +> app." ```toml allow_schema_ids = [ @@ -91,11 +97,13 @@ allow_schema_ids = [ #### Support all schemas but restrict allowed peers -> "Me and my friends are running our own `p2panda` network supported by a couple of relay nodes, we trust each other and want to support all published data, but not allow anyone else to join the network." +> "Me and my friends are running our own `p2panda` network supported by a +> couple of relay nodes, we trust each other and want to support all published +> data, but not allow anyone else to join the network." ```toml -# I can do this by configuring `allow_schema_ids` to be a wildcard, meaning any schema -# are automatically supported! +# I can do this by configuring `allow_schema_ids` to be a wildcard, meaning any +# schema are automatically supported! allow_schema_ids = "*" # Add relay addresses to allow establishing connections over the internet @@ -107,8 +115,8 @@ relay_addresses = [ # Enable discovery using mDNS (true by default) mdns = true -# Populate an allow list which will contain the peer ids of our friends (including -# the ones acting as relays) +# Populate an allow list which will contain the peer ids of our friends +# (including the ones acting as relays) allow_peer_ids = [ "12D3KooWLxGKMgUtekXam9JsSjMa3b7M3rYEYUYUywdehHTRrLgU", "12D3KooWP1ahRHeNp6s1M9qDJD2oyqRsYFeKLYjcjmFxrq6KM8xd", @@ -117,11 +125,12 @@ allow_peer_ids = [ #### Act as a relay node -> "I want to deploy a relay which assists in connecting edge peers but doesn't persist any data itself." +> "I want to deploy a relay which assists in connecting edge peers but doesn't +> persist any data itself." ```toml -# I can do this by configuring `allow_schema_ids` an empty list, meaning this node -# does not support any schemas +# I can do this by configuring `allow_schema_ids` an empty list, meaning this +# node does not support any schemas allow_schema_ids = [] # Then set the relay flag so this node behaves as a relay for other nodes @@ -147,7 +156,8 @@ direct_node_addresses = [ #### Persist node identity and database -> "I want my node to persist it's identity and database on the filesystem and retreive them whenever it runs again." +> "I want my node to persist it's identity and database on the filesystem and +> retreive them whenever it runs again." ```toml # Persist node private key at given location (using Linux XDG paths as an example) @@ -159,7 +169,10 @@ database_url = "sqlite:$HOME/.local/share/aquadoggo/db.sqlite3" ### Configuration -Check out the [`config.toml`] file for all configurations and documentation or run `--help` to see all possible command line arguments. All values can also be defined as environment variables, written in CAMEL_CASE (for example `HTTP_PORT=3000`). +Check out the [`config.toml`] file for all configurations and documentation or +run `--help` to see all possible command line arguments. All values can also be +defined as environment variables, written in CAMEL_CASE (for example +`HTTP_PORT=3000`). ``` Usage: aquadoggo [OPTIONS] @@ -168,36 +181,57 @@ Options: -c, --config Path to an optional "config.toml" file for further configuration. - When not set the program will try to find a `config.toml` file in the same folder the program is executed in and otherwise in the regarding operation systems XDG config directory ("$HOME/.config/aquadoggo/config.toml" on Linux). + When not set the program will try to find a `config.toml` file in the + same folder the program is executed in and otherwise in the regarding + operation systems XDG config directory + ("$HOME/.config/aquadoggo/config.toml" on Linux). -s, --allow-schema-ids [...] - List of schema ids which a node will replicate, persist and expose on the GraphQL API. Separate multiple values with a whitespace. Defaults to allow _any_ schemas ("*"). + List of schema ids which a node will replicate, persist and expose on + the GraphQL API. Separate multiple values with a whitespace. Defaults + to allow _any_ schemas ("*"). - When allowing a schema you automatically opt into announcing, replicating and materializing documents connected to it, supporting applications and networks which are dependent on this data. + When allowing a schema you automatically opt into announcing, + replicating and materializing documents connected to it, supporting + applications and networks which are dependent on this data. - It is recommended to set this list to all schema ids your own application should support, including all important system schemas. + It is recommended to set this list to all schema ids your own + application should support, including all important system schemas. - WARNING: When set to wildcard "*", your node will support _any_ schemas it will encounter on the network. This is useful for experimentation and local development but _not_ recommended for production settings. + WARNING: When set to wildcard "*", your node will support _any_ + schemas it will encounter on the network. This is useful for + experimentation and local development but _not_ recommended for + production settings. -d, --database-url - URL / connection string to PostgreSQL or SQLite database. Defaults to an in-memory SQLite database. + URL / connection string to PostgreSQL or SQLite database. Defaults to + an in-memory SQLite database. - WARNING: By default your node will not persist anything after shutdown. Set a database connection url for production settings to not loose data. + WARNING: By default your node will not persist anything after + shutdown. Set a database connection url for production settings to + not loose data. -p, --http-port - HTTP port for client-node communication, serving the GraphQL API. Defaults to 2020 + HTTP port for client-node communication, serving the GraphQL API. + Defaults to 2020 -q, --quic-port - QUIC port for node-node communication and data replication. Defaults to 2022 + QUIC port for node-node communication and data replication. Defaults + to 2022 -k, --private-key - Path to persist your ed25519 private key file. Defaults to an ephemeral key only for this current session. + Path to persist your ed25519 private key file. Defaults to an + ephemeral key only for this current session. - The key is used to identify you towards other nodes during network discovery and replication. This key is _not_ used to create and sign data. + The key is used to identify you towards other nodes during network + discovery and replication. This key is _not_ used to create and sign + data. - If a path is set, a key will be generated newly and stored under this path when node starts for the first time. + If a path is set, a key will be generated newly and stored under this + path when node starts for the first time. - When no path is set, your node will generate an ephemeral private key on every start up and _not_ persist it. + When no path is set, your node will generate an ephemeral private key + on every start up and _not_ persist it. -m, --mdns [] mDNS to discover other peers on the local network. Enabled by default @@ -207,48 +241,74 @@ Options: -n, --direct-node-addresses [...] List of known node addresses we want to connect to directly. - Make sure that nodes mentioned in this list are directly reachable (they need to be hosted with a static IP Address). If you need to connect to nodes with changing, dynamic IP addresses or even with nodes behind a firewall or NAT, do not use this field but use at least one relay. + Make sure that nodes mentioned in this list are directly reachable + (they need to be hosted with a static IP Address). If you need to + connect to nodes with changing, dynamic IP addresses or even with + nodes behind a firewall or NAT, do not use this field but use at + least one relay. -a, --allow-peer-ids [...] List of peers which are allowed to connect to your node. - If set then only nodes (identified by their peer id) contained in this list will be able to connect to your node (via a relay or directly). When not set any other node can connect to yours. + If set then only nodes (identified by their peer id) contained in + this list will be able to connect to your node (via a relay or + directly). When not set any other node can connect to yours. - Peer IDs identify nodes by using their hashed public keys. They do _not_ represent authored data from clients and are only used to authenticate nodes towards each other during networking. + Peer IDs identify nodes by using their hashed public keys. They do + _not_ represent authored data from clients and are only used to + authenticate nodes towards each other during networking. - Use this list for example for setups where the identifier of the nodes you want to form a network with is known but you still need to use relays as their IP addresses change dynamically. + Use this list for example for setups where the identifier of the + nodes you want to form a network with is known but you still need to + use relays as their IP addresses change dynamically. -b, --block-peer-ids [...] List of peers which will be blocked from connecting to your node. - If set then any peers (identified by their peer id) contained in this list will be blocked from connecting to your node (via a relay or directly). When an empty list is provided then there are no restrictions on which nodes can connect to yours. + If set then any peers (identified by their peer id) contained in this + list will be blocked from connecting to your node (via a relay or + directly). When an empty list is provided then there are no + restrictions on which nodes can connect to yours. - Block lists and allow lists are exclusive, which means that you should _either_ use a block list _or_ an allow list depending on your setup. + Block lists and allow lists are exclusive, which means that you + should _either_ use a block list _or_ an allow list depending on your + setup. - Use this list for example if you want to allow _any_ node to connect to yours _except_ of a known number of excluded nodes. + Use this list for example if you want to allow _any_ node to connect + to yours _except_ of a known number of excluded nodes. -r, --relay-addresses [...] List of relay addresses. - A relay helps discover other nodes on the internet (also known as "rendesvouz" or "bootstrap" server) and helps establishing direct p2p connections when node is behind a firewall or NAT (also known as "holepunching"). + A relay helps discover other nodes on the internet (also known as + "rendesvouz" or "bootstrap" server) and helps establishing direct p2p + connections when node is behind a firewall or NAT (also known as + "holepunching"). - WARNING: This will potentially expose your IP address on the network. Do only connect to trusted relays or make sure your IP address is hidden via a VPN or proxy if you're concerned about leaking your IP. + WARNING: This will potentially expose your IP address on the network. + Do only connect to trusted relays or make sure your IP address is + hidden via a VPN or proxy if you're concerned about leaking your IP. -e, --relay-mode [] Enable if node should also function as a relay. Disabled by default. Other nodes can use relays to aid discovery and establishing connectivity. - Relays _need_ to be hosted in a way where they can be reached directly, for example with a static IP address through an VPS. + Relays _need_ to be hosted in a way where they can be reached + directly, for example with a static IP address through an VPS. [possible values: true, false] -l, --log-level - Set log verbosity. Use this for learning more about how your node behaves or for debugging. + Set log verbosity. Use this for learning more about how your node + behaves or for debugging. - Possible log levels are: ERROR, WARN, INFO, DEBUG, TRACE. They are scoped to "aquadoggo" by default. + Possible log levels are: ERROR, WARN, INFO, DEBUG, TRACE. They are + scoped to "aquadoggo" by default. - If you want to adjust the scope for deeper inspection use a filter value, for example "=TRACE" for logging _everything_ or "aquadoggo=INFO,libp2p=DEBUG" etc. + If you want to adjust the scope for deeper inspection use a filter + value, for example "=TRACE" for logging _everything_ or + "aquadoggo=INFO,libp2p=DEBUG" etc. -h, --help Print help (see a summary with '-h') From 2b33f044b41039f11081e65a1ba64c03b31bf777 Mon Sep 17 00:00:00 2001 From: adz Date: Wed, 30 Aug 2023 23:04:01 +0200 Subject: [PATCH 23/38] Correct XDG directory --- aquadoggo_cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aquadoggo_cli/README.md b/aquadoggo_cli/README.md index e3453ba32..8317da499 100644 --- a/aquadoggo_cli/README.md +++ b/aquadoggo_cli/README.md @@ -62,7 +62,7 @@ aquadoggo aquadoggo --log-level info # By default the config.toml is loaded from the same folder or from the XDG -# data directory, but you can also specify a custom path +# config directory, but you can also specify a custom path aquadoggo -c ../config.toml # Turn your aquadoggo into a relay From a082844b00a950a43e77713e66aa2a6a118ad9a7 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 13:50:41 +0100 Subject: [PATCH 24/38] Add resources section --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 91e29741d..8cbf25808 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,7 @@ `aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. -No programming experience is needed to deploy a node on your own machine, and you can even experiment with creating your own data schemas using, publishing and replicating data, and then querying it again using the GraphQL playground. - -> πŸ› οΈ Create your own schemas using [`fishy`](https://github.com/p2panda/fishy)
-> πŸ“– Try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) or play with [`send-to-node`](https://github.com/p2panda/send-to-node)
-> πŸ›Ό Open the GraphQL playground in your browser, served under `http://localhost:2020/graphql` +If you are familiar with (or are keen to learn) how to use a command line interfaces then you're able to deploy a node on your own machine, you can then experiment with creating data schemas, publishing and replicating data, and then querying it again using the GraphQL playground. Check out the [resources](#Resources) section for ideas on next steps when you're ready. ## What can I build with this? @@ -213,6 +209,15 @@ let node = Node::start(key_pair, config).await; If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. +## Resources + +- 🐬 Deploy your own `aquadoggo` following the [tutorial](https://p2panda.org/tutorials/aquadoggo) +- πŸ› οΈ Create your own schemas using [`fishy`](https://github.com/p2panda/fishy) +- πŸ›Ό Open the GraphQL playground in your browser, served under `http://localhost:2020/graphql` +- πŸ“– Try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) +- πŸ”¬ Manually publish JSON encoded data to a node [`send-to-node`](https://github.com/p2panda/send-to-node) +- 🐼 [Learn more](https://p2panda.org/learn/) about how p2panda works + ## What shouldn't I do with `aquadoggo`? `aquadoggo` is built using the [p2panda](https://p2panda.org) protocol which is in development and some planned features are still missing, the main ones being: From 0d82fa4f93b3cceedc40b16174cdcd45a12ea693 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 13:59:36 +0100 Subject: [PATCH 25/38] Small edits --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8cbf25808..70aeebf04 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,13 @@ `aquadoggo` might be interesting for anyone who wants to participate in a p2p network. This could be as a node maintainer, an application developer or simply someone wanting to learn more about p2p networking in a hands-on fashion. -If you are familiar with (or are keen to learn) how to use a command line interfaces then you're able to deploy a node on your own machine, you can then experiment with creating data schemas, publishing and replicating data, and then querying it again using the GraphQL playground. Check out the [resources](#Resources) section for ideas on next steps when you're ready. +If you are familiar with (or are keen to learn) how to use command line interfaces then you're able to deploy a node on your own machine, you can then experiment with creating data schemas, publishing and replicating data, and then querying it again using the GraphQL playground. Check out the [resources](#Resources) section for ideas on next steps when you're ready. ## What can I build with this? -`aquadoggo` is a fully-featured p2p "backend", which takes some of the complexity out of building p2p applications. If you want to build a client application which communicates with an `aquadoggo` it will be of great help if you already have some experience with web development or the Rust programming language. +`aquadoggo` is a fully-featured p2p "backend" which takes some of the complexity out of building p2p applications, leaving you to focus on building applications using your preferred development tools. -For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. +If you want to build a client application which communicates with an `aquadoggo` you will need to have some experience with web development or the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. Some example applications which could be built on top of `aquadoggo` are: From cded0726fe4e5ea8039c827890754aa868b70537 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:03:24 +0100 Subject: [PATCH 26/38] Add GraphQL query examples --- README.md | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/README.md b/README.md index 70aeebf04..efb8d8477 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,111 @@ Some example applications which could be built on top of `aquadoggo` are: We're excited to hear about your ideas! Join our [official chat](https://wald.liebechaos.org/) and reach out. +### GraphQL query API + +As an application developer the interface to `aquadoggo` you will use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. For example: + +This query fetches own mushroom by it's id, returning values for only the selected fields. + +```graphql +{ + mushroom: mushroom_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d( + id: "0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" + ) { + fields { + description + edible + latin + title + } + } +} +``` + +
+Example query response +
+ +```json +{ + "mushroom": { + "description": "Its scientific name rhacodes comes from the Greek word rhakos, which means a piece of cloth. It does often have a soft, ragged fabric-like appearance.", + "edible": true, + "latin": "Chlorophyllum rhacodes", + "title": "Shaggy parasol" + } +} +``` +
+ + +This is a collection query for "events" which includes ordering and filtering as well as selecting some meta fields. Here only events between the specified dates and with a title containing the string `"funtastic"` will be returned, they will be arranged in ascending chronological order. + +```graphql +{ + events: all_events_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0( + first: 20 + orderBy: "happening_at" + orderDirection: ASC + filter: { + title: { contains: "funtastic" } + happening_at: { gte: 2023-08-31, lte: 2023-09-14 } + } + ) { + totalCount + documents { + meta { + owner + documentId + viewId + } + fields { + title + happening_at + } + } + } +} +``` + +
+Example query response +
+ +```json +{ + "events": { + "documents": [ + { + "meta": { + "owner": "2f8e50c2ede6d936ecc3144187ff1c273808185cfbc5ff3d3748d1ff7353fc96", + "documentId": "0020f3214a136fd6d0a649e14432409bb28a59a6caf723fa329129c404c92574cb41", + "viewId": "00206e365e3a6a9b66dfe96ea4b3b3b7c61b250330a46b0c99134121603db5feef11" + }, + "fields": { + "title": "Try funtasticize!!", + "happening_at": 1680264880 + } + }, + { + "meta": { + "owner": "2f8e50c2ede6d936ecc3144187ff1c273808185cfbc5ff3d3748d1ff7353fc96", + "documentId": "002048a55d9265a16ba44b5f3be3e457238e02d3219ecca777d7b4edf28ba2f6d011", + "viewId": "002048a55d9265a16ba44b5f3be3e457238e02d3219ecca777d7b4edf28ba2f6d011" + }, + "fields": { + "title": "Is funtastic even a real word?", + "happening_at": 1693484080 + } + } + ] + } +} +``` +
+ +From these examples you might already see how useful the query api will be when retrieving and displaying data in your application. + ## Installation ### Command line application From 7b6bdcb8ce49b91fc4dd580e05ce32723a0235f5 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:09:13 +0100 Subject: [PATCH 27/38] Move query comment into code snippet --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index efb8d8477..3f2e4b9f1 100644 --- a/README.md +++ b/README.md @@ -157,9 +157,8 @@ We're excited to hear about your ideas! Join our [official chat](https://wald.li As an application developer the interface to `aquadoggo` you will use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. For example: -This query fetches own mushroom by it's id, returning values for only the selected fields. - ```graphql + { mushroom: mushroom_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d( id: "0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" @@ -191,9 +190,8 @@ This query fetches own mushroom by it's id, returning values for only the select
-This is a collection query for "events" which includes ordering and filtering as well as selecting some meta fields. Here only events between the specified dates and with a title containing the string `"funtastic"` will be returned, they will be arranged in ascending chronological order. - ```graphql + { events: all_events_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0( first: 20 @@ -227,6 +225,7 @@ This is a collection query for "events" which includes ordering and filtering as ```json { "events": { + "totalCount": 2, "documents": [ { "meta": { From 6acd132cdaf2e3044cd4c4ccf688a9619233793e Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:12:42 +0100 Subject: [PATCH 28/38] Move comments back out of query snippet --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3f2e4b9f1..3a841b9a2 100644 --- a/README.md +++ b/README.md @@ -155,10 +155,10 @@ We're excited to hear about your ideas! Join our [official chat](https://wald.li ### GraphQL query API -As an application developer the interface to `aquadoggo` you will use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. For example: +As an application developer the interface to `aquadoggo` you will use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. +Fetch one "mushroom" by it's id, returning values for only the selected fields: ```graphql - { mushroom: mushroom_0020c3accb0b0c8822ecc0309190e23de5f7f6c82f660ce08023a1d74e055a3d7c4d( id: "0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0" @@ -189,9 +189,8 @@ As an application developer the interface to `aquadoggo` you will use the most i ``` - +A collection query for "events" which includes ordering and filtering as well as selecting some meta fields. Here only events between the specified dates and with a title containing the string 'funtastic' will be returned, they will be arranged in ascending chronological order: ```graphql - { events: all_events_0020aaabb3edecb2e8b491b0c0cb6d7d175e4db0e9da6003b93de354feb9c52891d0( first: 20 From 8d783f4c49de7401bc8c89ab258067b144ce44b5 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:30:59 +0100 Subject: [PATCH 29/38] Move query examples into own section --- README.md | 117 +++++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 3a841b9a2..a5da9a1c0 100644 --- a/README.md +++ b/README.md @@ -153,9 +153,66 @@ Some example applications which could be built on top of `aquadoggo` are: We're excited to hear about your ideas! Join our [official chat](https://wald.liebechaos.org/) and reach out. -### GraphQL query API +## Installation + +### Command line application + +Check out our [Releases](/releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. + +### Rust Crate + +For using `aquadoggo` in your Rust project, you can add it as a dependency with the following command: + +```bash +cargo add aquadoggo +``` + +## Usage + +### Run node + +You can also run the node simply as a [command line application](/aquadoggo_cli). `aquadoggo` can be configured in countless ways for your needs, read our [configuration](/aquadoggo_cli/README.md#Usage) section for more examples, usecases and an overview of configuration options. + +```bash +# Start a local node on your machine, go to http://localhost:2020/graphql for using the GraphQL playground +aquadoggo + +# Check out all configuration options +aquadoggo --help + +# Enable logging +aquadoggo --log-level info +``` + +### Docker + +For server deployments you might prefer using [Docker](https://hub.docker.com/r/p2panda/aquadoggo) to run `aquadoggo`. + +```bash +docker run -p 2020:2020 -p 2022:2022 -e LOG_LEVEL=info p2panda/aquadoggo +``` + +### Embed node + +Run the node directly next to the frontend you're building for full peer-to-peer applications by using the [`aquadoggo`](/aquadoggo) Rust crate. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. + +```rust +use aquadoggo::{Configuration, Node}; +use p2panda_rs::identity::KeyPair; + +let config = Configuration::default(); +let key_pair = KeyPair::new(); +let node = Node::start(key_pair, config).await; +``` + +### FFI bindings + +If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. + + +## Query API -As an application developer the interface to `aquadoggo` you will use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. +As an application developer the interface to `aquadoggo` you are likely to use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. Fetch one "mushroom" by it's id, returning values for only the selected fields: ```graphql @@ -256,62 +313,6 @@ A collection query for "events" which includes ordering and filtering as well as From these examples you might already see how useful the query api will be when retrieving and displaying data in your application. -## Installation - -### Command line application - -Check out our [Releases](/releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows or read [how you can compile](/aquadoggo_cli/README.md#Installation) `aquadoggo` yourself. - -### Rust Crate - -For using `aquadoggo` in your Rust project, you can add it as a dependency with the following command: - -```bash -cargo add aquadoggo -``` - -## Usage - -### Run node - -You can also run the node simply as a [command line application](/aquadoggo_cli). `aquadoggo` can be configured in countless ways for your needs, read our [configuration](/aquadoggo_cli/README.md#Usage) section for more examples, usecases and an overview of configuration options. - -```bash -# Start a local node on your machine, go to http://localhost:2020/graphql for using the GraphQL playground -aquadoggo - -# Check out all configuration options -aquadoggo --help - -# Enable logging -aquadoggo --log-level info -``` - -### Docker - -For server deployments you might prefer using [Docker](https://hub.docker.com/r/p2panda/aquadoggo) to run `aquadoggo`. - -```bash -docker run -p 2020:2020 -p 2022:2022 -e LOG_LEVEL=info p2panda/aquadoggo -``` - -### Embed node - -Run the node directly next to the frontend you're building for full peer-to-peer applications by using the [`aquadoggo`](/aquadoggo) Rust crate. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. - -```rust -use aquadoggo::{Configuration, Node}; -use p2panda_rs::identity::KeyPair; - -let config = Configuration::default(); -let key_pair = KeyPair::new(); -let node = Node::start(key_pair, config).await; -``` - -### FFI bindings - -If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. - ## Resources - 🐬 Deploy your own `aquadoggo` following the [tutorial](https://p2panda.org/tutorials/aquadoggo) From 33355b20f0af761df82da0b69fcc07a26b21405b Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:40:00 +0100 Subject: [PATCH 30/38] Update "what can i build" section --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5da9a1c0..0463bc166 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ If you are familiar with (or are keen to learn) how to use command line interfac ## What can I build with this? -`aquadoggo` is a fully-featured p2p "backend" which takes some of the complexity out of building p2p applications, leaving you to focus on building applications using your preferred development tools. +Many applications which rely on being able to store and retrieve data from a persistent store could likely be built using `aquadoggo` as their data layer. `aquadoggo` can be considered as p2p "backend" for your application, which takes some of the complexity out of p2p development, leaving you to focus on building applications using your preferred tools. -If you want to build a client application which communicates with an `aquadoggo` you will need to have some experience with web development or the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. +> If you want to build a client application which communicates with an `aquadoggo` you will need to have some experience with web development or the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. Some example applications which could be built on top of `aquadoggo` are: From b900dbc8d39723157f0beb6c3f8ed47667172800 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:41:35 +0100 Subject: [PATCH 31/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0463bc166..09713aed2 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ If you are familiar with (or are keen to learn) how to use command line interfac ## What can I build with this? -Many applications which rely on being able to store and retrieve data from a persistent store could likely be built using `aquadoggo` as their data layer. `aquadoggo` can be considered as p2p "backend" for your application, which takes some of the complexity out of p2p development, leaving you to focus on building applications using your preferred tools. +Many applications which rely on being able to store and retrieve data from a persistent store could likely be built using `aquadoggo` as their data layer. `aquadoggo` can be considered as a p2p "backend", which takes some of the complexity out of p2p development, leaving you to focus on building applications using your preferred tools. > If you want to build a client application which communicates with an `aquadoggo` you will need to have some experience with web development or the Rust programming language. For writing an application using Rust you can import `aquadoggo` directly in your code. If building a TypeScript web frontend which will interface with a local or remote node, you can import the small TypeScript client library [`shirokuma`](https://github.com/p2panda/shirokuma) to your project. We have plans for making it easier to interact with `aquadoggo` using other languages in the future. From da59e960893a3220c71f1176ae9204d64aa9299b Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:47:23 +0100 Subject: [PATCH 32/38] Review change requests --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09713aed2..6c1c5f464 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ From these examples you might already see how useful the query api will be when - πŸ› οΈ Create your own schemas using [`fishy`](https://github.com/p2panda/fishy) - πŸ›Ό Open the GraphQL playground in your browser, served under `http://localhost:2020/graphql` - πŸ“– Try the [mushroom app tutorial](https://p2panda.org/tutorials/mushroom-app) -- πŸ”¬ Manually publish JSON encoded data to a node [`send-to-node`](https://github.com/p2panda/send-to-node) +- πŸ”¬ Manually publish data to a node [`send-to-node`](https://github.com/p2panda/send-to-node) - 🐼 [Learn more](https://p2panda.org/learn/) about how p2panda works ## What shouldn't I do with `aquadoggo`? From bb83b2702ad1a32dfde39b98baf3a1d19258be86 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 15:51:27 +0100 Subject: [PATCH 33/38] Fix query to use unix timestamps --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c1c5f464..9438e2f41 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,7 @@ A collection query for "events" which includes ordering and filtering as well as orderDirection: ASC filter: { title: { contains: "funtastic" } - happening_at: { gte: 2023-08-31, lte: 2023-09-14 } + happening_at: { gte: 1677676480, lte: 1696162480 } } ) { totalCount From d6ebb2fd0555ad5fee7137ae8b49016bbe4cc156 Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 16:22:16 +0100 Subject: [PATCH 34/38] Minor additions to aquadoggo/README.md --- aquadoggo/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aquadoggo/README.md b/aquadoggo/README.md index e34f453c6..32c6484b3 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -48,6 +48,7 @@ `aquadoggo` can run both on your own device for local-first applications, or on a public server when acting as shared community infrastructure. Nodes like `aquadoggo` perform a number of tasks ranging from core p2panda data replication and validation, aiding the discovery and establishment of connections between edge peers, and exposing a developer friendly API used for building applications. > πŸ“– Read more about nodes in our [learn](https://p2panda.org/learn/networks) section +> 🐬 Visit the main project [repository](https://github.com/p2panda/aquadoggo) for examples on how `aquadoggo` can be integrated into different applications ## Features @@ -85,6 +86,10 @@ let node = Node::start(key_pair, config).await; If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. +### Command line application + +Check out our [Releases](/releases) section where we publish binaries for Linux, RaspberryPi, MacOS and Windows. + ## Development The Protocol Buffers compiler must be installed in order to compile aquadoggo. From 531a8992e5f243769f38093e465951a872ed5b0c Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 16:22:59 +0100 Subject: [PATCH 35/38] Include README.md in lib doc string --- aquadoggo/src/lib.rs | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/aquadoggo/src/lib.rs b/aquadoggo/src/lib.rs index 2c4eb447f..c7dc93919 100644 --- a/aquadoggo/src/lib.rs +++ b/aquadoggo/src/lib.rs @@ -1,38 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -//! # aquadoggo -//! -//! Configurable node server implementation for the [`p2panda`] network. -//! -//! [`p2panda`]: https://p2panda.org -//! -//! ## Features -//! -//! - Awaits signed operations from clients via GraphQL. -//! - Verifies the consistency, format and signature of operations and rejects invalid ones. -//! - Stores operations of the network in an SQL database of your choice (SQLite, PostgreSQL). -//! - Materializes views on top of the known data. -//! - Answers filterable and paginated data queries via GraphQL. -//! - Discovers other nodes in local network and internet. -//! - Replicates data with other nodes. -//! -//! ## Example -//! -//! Embed the node server in your Rust application or web container like [`Tauri`]: -//! -//! ```rust,no_run -//! # #[tokio::main] -//! # async fn main() { -//! use aquadoggo::{Configuration, Node}; -//! use p2panda_rs::identity::KeyPair; -//! -//! let config = Configuration::default(); -//! let key_pair = KeyPair::new(); -//! let node = Node::start(key_pair, config).await; -//! # } -//! ``` -//! -//! [`Tauri`]: https://tauri.studio +#![doc = include_str!("../README.md")] #![warn( missing_debug_implementations, missing_docs, From b5e22ab1a018d63ce4570cf19c102b51fd10017a Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 16:23:10 +0100 Subject: [PATCH 36/38] Remove empty line --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9438e2f41..d65e45fcb 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,6 @@ let node = Node::start(key_pair, config).await; If you are not working with Rust you can create FFI bindings from the `aquadoggo` crate into your preferred programming language. Dealing with FFI bindings can be a bit cumbersome and we do not have much prepared for you (yet), but check out our [Meli](https://github.com/p2panda/meli/) Android project as an example on how we dealt with FFI bindings for Dart / Flutter. - ## Query API As an application developer the interface to `aquadoggo` you are likely to use the most is the GraphQL query API. For whichever schema your node supports a custom query api is generated, you use this to fetch data into your app. Results from a collection query can be paginated, filtered. From d912108f751848d0b0f2b7f00a6f61478549b5ea Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 16:32:58 +0100 Subject: [PATCH 37/38] Minor change --- aquadoggo/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aquadoggo/README.md b/aquadoggo/README.md index 32c6484b3..d216ff7d6 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -47,8 +47,8 @@ `aquadoggo` can run both on your own device for local-first applications, or on a public server when acting as shared community infrastructure. Nodes like `aquadoggo` perform a number of tasks ranging from core p2panda data replication and validation, aiding the discovery and establishment of connections between edge peers, and exposing a developer friendly API used for building applications. -> πŸ“– Read more about nodes in our [learn](https://p2panda.org/learn/networks) section -> 🐬 Visit the main project [repository](https://github.com/p2panda/aquadoggo) for examples on how `aquadoggo` can be integrated into different applications +> πŸ“– Read more about nodes in our [learn](https://p2panda.org/learn/networks) section
+> 🐬 Visit the main repo [README](https://github.com/p2panda/aquadoggo) for more general info ## Features From 18ac930d61f9db17c55236390914de473a339efa Mon Sep 17 00:00:00 2001 From: Sam Andreae Date: Thu, 31 Aug 2023 16:48:39 +0100 Subject: [PATCH 38/38] Don't run code snippet in README during tests --- aquadoggo/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aquadoggo/README.md b/aquadoggo/README.md index d216ff7d6..591c71295 100644 --- a/aquadoggo/README.md +++ b/aquadoggo/README.md @@ -73,7 +73,7 @@ cargo add aquadoggo Run the node directly next to the frontend you're building for full peer-to-peer applications. Check out our [Tauri](https://github.com/p2panda/tauri-example) example for writing a desktop app. -```rust +```rust,ignore use aquadoggo::{Configuration, Node}; use p2panda_rs::identity::KeyPair;