2025-08-21 18:36:12 -04:00

177 lines
5.3 KiB
Markdown

---
title: WAKU-APP-QAKU
name: Waku App Qaku
category: Standards Track
tags: waku
editor:
contributors:
- Jimmy Debe <jimmy@status.im>
---
## Abstract
The document describes the different components of the Qaku web application.
Qaku is a Waku web applications that utilizes some Waku protocols to provide a private and
censorship-resistent question and answer service.
## Background
Waku is a family of robust,
censorship-resistant communication protocols designed to enable privacy-focused messaging for the decentralized web.
Current Q&A platforms are controlled by centralized organizations who have the ability to remove,
block and censor content published by any user.
This could cause a user to not express their ideas or ask reall questions with fear of prosecution by a thrid party.
Qaku aims to solve this by utilizing a few [10/WAKU]() protocols to create a Q&A forum.
The user can create a Q&A board with a wallet address,
send questions or answers directly to other peers without the need of storing and/or retrieving the content from a centralized server/domain.
Familiar features like upvoting, sharable links, and board moderation are also capable.
## Specification
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and
“OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).
### Control Message
New Q&A boards are created by a client who SHOULD be identitfied as the `owner`.
At the time of creation, the `owner` creates a `ControlMessage` to configure the board.
This message contains all the settings of the board and is published to the Waku network.
The `ControlMessage` is a JSON object:
- It MUST include a title name
- It MAY include a list of admin identities.
- It SHOULD include the identity of the `owner`, idenities explianed [below](#Identity).
- It SHOULD include the start and end date for clients to publish a new post.
-
```js
{
"ControlMessage" : [
title: string,
id: string,
enabled: boolean,
timestamp: number, // time the ControlMessage is created
owner: string, // the address of the owner
admins: string[], // a list of addresses
moderation: boolean, //
description: string,
updated: number,
startDate: number,
endDate?: number,
allowsParticipantsReplies: number,
delegationInfo?: DelegationInfo
]
}
```
`id`:
- SHOULD be generated from the `title` value, `timestamp` value, and the `owner` address value.
The `ControlMessage` is the first message published on the `content-topic` of the Q&A board.
Only clients subscribed to the `content-topic` can view the `ControlMessage`.
### Identity
The `identity` of a client is a public address identifier in the form of a hexadecimal string.
Clients SHOULD generate a private key on a local machine and
MAY encrypt the keys with a password.
Public addresses are then generated with the private keys.
The address SHOULD be used to sign and verify messages.
### Node
The Qaku application SHOULD by default connect to The Waku Network.
When a user accesses the Qaku app,
the user joins a new session that SHOULD create a new `content_topic`.
When the user exits the Qaku app,
the session ends but the `content_topic` remians available on the Waku network for other users to connect to.
Qaku uses the following [10/WAKU]() protocols:
- the [19/WAKU2-LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) to push a message type to the Waku network.
- the [12/WAKU2-FILTER]() to subscribe to Waku `content_topic` and listen to messages published to that topic.
- the [13/WAKU-STORE]() to query and load old messages from the Waku network for users.
- A new `content_topic` is created when a new Q&A board is created.
- All questions and answer are pushed to the content_topic
### Messages
The Waku network processes real-time message updates, which enables new questions and
answers to be acceisble quickly.
A conec ulti
Messages are sent to a `content_topic` that are identified as a `message_type`.
The [13/WAKU-STORE]() nodes provide historical storage of the Qaku messages.
The following `message_type`s used in Qaku include:
- Question Message
- Answered Message
- Upvote Message
- Moderation Message
- Poll Message
#### Question Message
The `QuestionMessage` type is generated by any user asking a new question on a Qaku board.
-
```js
{
"QuestionMessage" : [
"question": string,
"timestamp": number,
"author?": identity,
"delegationInfo?": delegationInfo
]
}
```
#### Answered Message
The `AnswerMessage` type is generated by any sending an answer to the Qaku board.
-
```js
{
"AnswerMessage" : [
hash: string,
text: string,
timestamp: number,
delegationInfo?: delegationInfo
]
}
```
#### Upvote Message
```js
{
"UpVoteMessage" : [
questionId: string,
hash: string,
type: UpvoteType,
timestamp: number,
delegationInfo?: DelegationInfo;
]
}
```
The owner MUST be able to enable and disable questions added to the board.
When a new question is created, the interface SHOULD lis
## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
## References