Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs restructure #140

Merged
merged 5 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"yarn.lock",
"tsconfig.json",
"node_modules/**",
"docs/guides/reference/node-config-options.md"
"docs/guides/nwaku/config-options.md"
],
"patterns": [
{
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ The Waku Documentation Portal can be accessed at <https://docs.waku.org/> and wa

Clone this repository:

```bash
```shell
git clone https://github.com/waku-org/docs.waku.org
```

Install the dependencies:

```bash
```shell
yarn

# or
Expand All @@ -29,19 +29,19 @@ yarn install

## Running Locally

```bash
```shell
yarn start
```

Check for spelling errors before deploying:

```bash
```shell
yarn check:spell
```

Create a production build locally to check for errors:

```bash
```shell
yarn build

# test the build
Expand Down Expand Up @@ -82,6 +82,6 @@ You can find the instructions on adding more documentation sections, localisatio

Docusaurus depends heavily on caching to enhance site performance. If you make changes that do not appear in the portal, try clearing the cache by running:

```bash
```shell
yarn clear
```
18 changes: 0 additions & 18 deletions diagrams/_history.md

This file was deleted.

2 changes: 1 addition & 1 deletion diagrams/_protocol-interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sequenceDiagram

The Pub/Sub topic `pubtopic1` serves as a means of routing messages (the network employs a default Pub/Sub topic) and indicates that it is subscribed to messages on that topic for a relay. Node D serves as a `Store` and is responsible for persisting messages.

1. Node A creates a WakuMessage `msg1` with [Content Topic](/overview/concepts/content-topics) `contentTopic1`.
1. Node A creates a WakuMessage `msg1` with [Content Topic](/learn/concepts/content-topics) `contentTopic1`.
2. Node F requests to get messages filtered by Pub/Sub topic `pubtopic1` and Content Topic `contentTopic1`. Node D subscribes F to this filter and will forward messages that match that filter in the future.
3. Node A publishes `msg1` on `pubtopic1`. The message is sent from Node A to Node B and then forwarded to Node D.
4. Node D, upon receiving `msg1`, stores the message for future retrieval by other nodes and forwards it to Node C.
Expand Down
21 changes: 0 additions & 21 deletions docs/community.md

This file was deleted.

37 changes: 0 additions & 37 deletions docs/contribute.md

This file was deleted.

17 changes: 9 additions & 8 deletions docs/guides/nodes-and-sdks.md → docs/guides/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
---
title: Nodes and SDKs
title: Getting Started
hide_table_of_contents: true
slug: /
---

:::caution
Waku has risks and limitations as it is still developing and preparing for extensive adoption. However, it is already demonstrating its capabilities by [powering various applications](/powered-by-waku). [Join our community](/community) to stay updated on our progress.
Waku has risks and limitations as it is still developing and preparing for extensive adoption. However, it is already demonstrating its capabilities by powering various applications. [Join our community](https://waku.org/community/) to stay updated on our progress.
:::

Ready to integrate Waku into your application for private, secure, censorship-free communication? Explore the available SDKs and contribute by running a node.

## Run a Waku Node
## Run a Waku node

The Waku Network is a decentralised, permissionless system where anyone can run nodes, use the network, and contribute to its support.

| | Description | Documentation |
| - | - | - |
| [nwaku](https://github.com/waku-org/nwaku) | Nim-based Waku implementation to run a standalone node and access the network (recommended) | [Run a Nwaku Node](/guides/run-nwaku-node) |
| [nwaku](https://github.com/waku-org/nwaku) | Nim-based Waku implementation to run a standalone node and access the network (recommended) | [Run a Nwaku Node](/guides/nwaku/run-node) |
| [go-waku](https://github.com/waku-org/go-waku) | Golang-based Waku implementation to run a standalone node and access the network | COMING SOON |

## Integrate Using SDKs
## Integrate using SDKs

Waku is implemented in multiple SDKs, allowing it to integrate with different languages and address various use cases efficiently.

Expand All @@ -28,17 +30,16 @@ Waku is implemented in multiple SDKs, allowing it to integrate with different la
| [go-waku](https://github.com/waku-org/go-waku) | Golang SDK designed for integration with Golang applications, includes C bindings for usage in C/C++, C#/Unity, Swift, and Kotlin | COMING SOON |
| [waku-rust-bindings](https://github.com/waku-org/waku-rust-bindings) | Rust wrapper using `go-waku` bindings designed for integration in Rust applications | COMING SOON |

## Run on Mobile Devices
## Run on mobile devices

Waku provides integrations tailored for mobile applications, enabling Waku to run efficiently on mobile devices.

| | Description | Documentation |
| - | - | - |
| [React Native](https://github.com/waku-org/waku-react-native) | React Native wrapper using `go-waku` bindings designed for native mobile integration | COMING SOON |
| Swift (iOS) | `go-waku` bindings for Swift applications to seamlessly integrate Waku | COMING SOON |
| Kotlin (Android) | `go-waku` bindings for Kotlin applications to seamlessly integrate Waku | COMING SOON |

## More Integrations
## More integrations

| | Description | Documentation |
| - | - | - |
Expand Down
21 changes: 11 additions & 10 deletions docs/guides/js-waku/configure-discovery.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
---
title: Bootstrap Nodes and Discover Peers
hide_table_of_contents: true
---

This guide provides detailed steps to bootstrap your your node using [Static Peers](/overview/concepts/static-peers) and discover peers in the Waku Network using [DNS Discovery](/overview/concepts/dns-discovery).
This guide provides detailed steps to bootstrap your your node using [Static Peers](/learn/concepts/static-peers) and discover peers in the Waku Network using [DNS Discovery](/learn/concepts/dns-discovery).

:::tip
Until [node incentivisation](/overview/reference/research-in-progress#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/guides/nodes-and-sdks#run-a-waku-node) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
Until [node incentivisation](/learn/research#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/#run-a-waku-node) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
:::

## Default Bootstrap Method
## Default bootstrap method

The `@waku/sdk` package provides a built-in bootstrapping method that uses [DNS Discovery](/overview/concepts/dns-discovery) to locate peers from the `waku v2.prod` `ENR` tree.
The `@waku/sdk` package provides a built-in bootstrapping method that uses [DNS Discovery](/learn/concepts/dns-discovery) to locate peers from the `waku v2.prod` `ENR` tree.

```js
import { createLightNode } from "@waku/sdk";
Expand All @@ -19,9 +20,9 @@ import { createLightNode } from "@waku/sdk";
const node = await createLightNode({ defaultBootstrap: true });
```

## Configure Static Peers
## Configure static peers

To bootstrap a node using [static peers](/overview/concepts/static-peers), first install the `@libp2p/bootstrap` package:
To bootstrap a node using [static peers](/learn/concepts/static-peers), first install the `@libp2p/bootstrap` package:

```mdx-code-block
import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -84,9 +85,9 @@ const node = await createLightNode({
For local development using a `nwaku` node, use a `ws` address instead of `wss`. Remember that this setup is functional only when your web server is running locally.
:::

## Configure DNS Discovery
## Configure DNS discovery

To bootstrap a node using [DNS Discovery](/overview/concepts/dns-discovery), first install the `@waku/dns-discovery` package:
To bootstrap a node using [DNS Discovery](/learn/concepts/dns-discovery), first install the `@waku/dns-discovery` package:

<Tabs groupId="package-manager">
<TabItem value="npm" label="NPM">
Expand Down Expand Up @@ -152,9 +153,9 @@ const node = await createLightNode({
});
```

## Configure DNS Discovery and Static Peers
## Configure DNS discovery and static peers

You can also bootstrap your node using [DNS Discovery](/overview/concepts/dns-discovery) and [Static Peers](/overview/concepts/static-peers) simultaneously:
You can also bootstrap your node using [DNS Discovery](/learn/concepts/dns-discovery) and [Static Peers](/learn/concepts/static-peers) simultaneously:

```js
import { createLightNode } from "@waku/sdk";
Expand Down
19 changes: 10 additions & 9 deletions docs/guides/js-waku/debug-waku-dapp.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
---
title: Debug Your Waku DApp and WebSocket
hide_table_of_contents: true
---

This guide provides detailed steps to enable and use debug logs to troubleshoot your Waku DApp, whether in a NodeJS or browser environment and check your WebSocket connections in [nwaku](/guides/run-nwaku-node).
This guide provides detailed steps to enable and use debug logs to troubleshoot your Waku DApp, whether in a NodeJS or browser environment and check your WebSocket connections in [nwaku](/guides/nwaku/run-node).

## Enabling Debug Logs
## Enabling debug logs

When resolving issues in your Waku DApp, debug logs can be helpful. The `@waku/sdk` and `libp2p` packages use the debug tool to handle and show logs that help you debug effectively.

### NodeJS Environments
### NodeJS environments

To enable debug logs for `@waku/sdk` on NodeJS, you must set the `DEBUG` environment variable. To only enable debug logs for `@waku/sdk`:

Expand All @@ -28,7 +29,7 @@ To enable debug logs for all components:
export DEBUG=*
```

### Browser Environments
### Browser environments

To view debug logs in your browser's console, modify the local storage and add the `debug` key. Here are guides for various modern browsers:

Expand All @@ -42,9 +43,9 @@ To view debug logs in your browser's console, modify the local storage and add t
| `debug` | `waku*,libp2p*` | Enables `@waku/sdk` and `libp2p` debug logs |
| `debug` | `*` | Enables all debug logs |

## Checking WebSocket Setup
## Checking WebSocket setup

[Nwaku](/guides/run-nwaku-node) provides native support for WebSocket (`ws`) and WebSocket Secure (`wss`) protocols. These are the only [transports](/overview/concepts/transports) supported for connecting to the Waku Network via browsers.
[Nwaku](/guides/nwaku/run-node) provides native support for WebSocket (`ws`) and WebSocket Secure (`wss`) protocols. These are the only [transports](/learn/concepts/transports) supported for connecting to the Waku Network via browsers.

It's important to note that browsers impose certain limitations on WebSocket usage:

Expand All @@ -54,7 +55,7 @@ It's important to note that browsers impose certain limitations on WebSocket usa

If you encounter difficulties when connecting to a remote node using `wss`, follow these steps:

### Try Websocat for Connection
### Try Websocat for connection

Attempt to connect using [websocat](https://github.com/vi/websocat), a tool for WebSocket interactions. Test the WebSocket port using the command:

Expand All @@ -72,7 +73,7 @@ $ websocat -v wss://nwakunode.com:1234

The connection works if the `[INFO websocat::ws_client_peer] Connected to ws` log entry appears. If not, [check that the certificate is valid](#check-certificate-validity)

### Check Certificate Validity
### Check certificate validity

Verify the certificate's validity by passing the `-k` or `--insecure` flag to handle invalid certificates in `websocat`:

Expand All @@ -82,7 +83,7 @@ websocat -v -k wss://nwakunode.com:1234

If this works, the certificate's invalidity is the problem, and you should investigate the cause of the error if not, [check if the WebSocket port is accessible](#check-websocket-port-accessibility).

### Check WebSocket Port Accessibility
### Check WebSocket port accessibility

Use `telnet` or another networking tool to verify if the WebSocket port is open and accessible. For example, if the multiaddr is `/dns4/nwakunode.com/tcp/1234/wss/p2p/16...`, use the command:

Expand Down
Loading