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

Cleanup and improve docs #2733

Merged
merged 17 commits into from
Jan 15, 2024
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
16 changes: 0 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,3 @@ $ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
5 changes: 5 additions & 0 deletions docs/docs/_admonitions/_soonaverse-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:::info Soonaverse Project API

In the following examples, we will connect to the soonaverse project (its API keys are part of the SDK for ease of use). You can also create your own project to give you your API key.

:::
12 changes: 9 additions & 3 deletions docs/docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Architecture
description: A description of the current and future architecture of build.5
keywords:
tags:
- architecture
- smart contracts
---
Expand All @@ -11,7 +11,13 @@ import InProgress from './_admonitions/_in-progress.md';
<InProgress/>

## Current Architecture
![image](assets/architecture_before.png)
![image](/img/architecture_before.svg)

## Future Architecture
![image](assets/architecture_after.png)
![image](/img/architecture_after.svg)

:::info

All core BUILD.5 logic will move primary into L1 SC and some to L2 SC

:::
Binary file removed docs/docs/assets/architecture_after.png
Binary file not shown.
Binary file removed docs/docs/assets/architecture_before.png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/docs/faqs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: FAQs
description: Questions and answers collections for build.5
keywords:
tags:
- faq
- open source
---
Expand Down
20 changes: 13 additions & 7 deletions docs/docs/getting_started.mdx → docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Getting started
description: Learn about build.5 and its APIs
keywords:
tags:
- APIs
- OTR
- smart contracts
Expand All @@ -28,9 +28,11 @@ There are REST APIs to simplify read and write operations. See following:
- [WSS](search-get) - Any [GET](search-get) can be requested as wss:// to receive web socket with real-time updates
- [POST](search-post) - Use these APIs to post any requests to Build.5 (alternative to [OTR](search-otr))

As we plan to eventually migrate all features into L1 / L2 Smart Contracts (once the technology is available), you can use our On Tangle Request(OTR) instead. Using OTR enables you to be more future-proof and reduce the amount of refactoring / UI changes you might have to make. It provides a more secure channel as all communication happens directly with your node and over Tangle.
:::info

- [OTR](search-otr) - omnichannel to interact with Build.5. Same as [POST](search-post), except all communication is done over Tangle.
We are in the process of migrating to so-called On Tangle Requests(OTR). Read more about them [here](on-tangle-request).

:::

We provide two endpoints. One for testing and one for production. See below:

Expand Down Expand Up @@ -66,12 +68,16 @@ const member = await https(origin).createProject(<YourProjectApiKey>)

console.log(member);
```
> See [Create Project](products/project/how-to/create-project) guide to create project.
:::info Create Project

Checkout the [Create Project](products/project/how-to/create-project) guide to create project.

:::

### See some of our first how to's:
- [Create Project](products/project/how-to/create-project)
- [Create Space](products/dao_management/space/how-to/create-space)
- [Create Member](products/dao_management/member/how-to/create-member)
- [Update Member](products/dao_management/member/how-to/update-member)
- [Create Space](products/dao-management/space/how-to/create-space)
- [Create Member](products/dao-management/member/how-to/create-member)
- [Update Member](products/dao-management/member/how-to/update-member)
- [Create NFT Collection](products/nft/how-to/create-nft-collection)
- [Create Stamp](products/stamp/how-to/create-stamp)
2 changes: 1 addition & 1 deletion docs/docs/limitations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Limitation
description: The limits of the build.5 endpoints
keywords:
tags:
- APIs
- limits
---
Expand Down
15 changes: 15 additions & 0 deletions docs/docs/on-tangle-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: On Tangle Request(OTR)
description: Learn about On Tangle Request(OTR).
tags:
- OTR
- smart contracts
---

On tangle requests are a secure and transparent way to interact with build.5 products. They are a way to send a request to a build.5 backend over the Tangle. The backend will then execute the request. All interactions can be verified on the Tangle.

OTR uses metadata to describe the request. The metadata is a JSON object. You can find the API reference for the metadata [here](search-otr), but we recommend using our [SDK](https://developer.build5.com/docs/getting_started#sdk).

## Why OTR?

By utilizing On Tangle Requests (OTRs), we are [preparing](architecture) for the future integration of Smart Contracts into our system. OTRs provide a transparent and visible way to interact with build.5 products enhance security by enabling all interactions to be verified on the Tangle. By adopting OTRs, you can ensure a more future-proof approach and minimize the need for extensive refactoring or UI changes.
2 changes: 1 addition & 1 deletion docs/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please note this documentation is still in progress. The main focus is the API's
:::

Welcome to the BUILD.5 documentation.
We recommend you start with the [Getting Started](getting_started) page.
We recommend you start with the [Getting Started](getting-started) page.

[Our architecture](architecture) is designed to fully adopt new features built on IOTA/Shimmer L1 and L2. Our primary focus will always be L1, as we believe it gives us a significant advantage within the DLT ecosystem. Ultimately, our execution logic would be fully migrated into L1 and L2 Smart Contracts once the technology is available.

Expand Down
14 changes: 14 additions & 0 deletions docs/docs/products/dao-management/member/how-to/create-member.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Create Member
tags:
- how-to
- create
- member
---

To create a member, you need to call `createMember`.
`createMember` takes an object of type `Build5Request<`[`CreateMemberRequest`](../../../../search-post/interfaces/CreateMemberRequest.md)`>` as parameter.


```tsx file=../../../../../../packages/sdk/examples/member/create.ts#L7-L13
```
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
---
title: Update Member
tags:
- how-to
- update
- member
---

To update a member, we first get the member with their ID, which, in this case, is the member's address.

```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L8-L12
```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L9-L13
```

With the member, we can create a signature and update, for example, the name by calling `update` on `dataset(Dataset.MEMBER)` and passing the new name in the body.
`update` takes an object of type `Build5Request<`[`MemberUpdateRequest`](../../../../search-post/interfaces/MemberUpdateRequest.md)`>` as parameter.

```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L16-L29
```tsx file=../../../../../../packages/sdk/examples/member/update.ts#L17-L30
```
19 changes: 19 additions & 0 deletions docs/docs/products/dao-management/space/how-to/create-space.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Create Space
tags:
- how-to
- create
- space
---

To create a space, you must call `create` on `dataset(Dataset.SPACE)`. In the body, you can specify the name of the space.
`create` takes an object of type `Build5Request<`[`SpaceCreateRequest`](../../../../search-post/interfaces/SpaceCreateRequest.md)`>` as parameter.

:::info

To create a space, don't forget to create a member first

:::

```tsx file=../../../../../../packages/sdk/examples/create_space.ts#L11-L26
```

This file was deleted.

This file was deleted.

14 changes: 11 additions & 3 deletions docs/docs/products/nft/how-to/create-nft-collection.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
---
title: Create NFT Collection
tags:
- how-to
- create
- nft
- collection
- nft-collection
---

To create a NFT collection, you must call `create` on `dataset(Dataset.NFT_COLLECTION)`. In the body, you can specify the collection's name, the symbol, the base URI, and more.
`create` takes an object of type `Build5Request<`[`CreateCollectionRequest`](../../../search-post/interfaces/CreateCollectionRequest.md)`>` as parameter.

```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L19-L44
```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L18-L43
```

After that, you should create a list of objects that describe the single NFTs, their name, description and image, price, and so on.

```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L49-L65
```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L49-L64
```

As a last step, you can mint the batch of NFTs by calling `createBatch` on `dataset(Dataset.NFT)` and passing the list of NFTs in the body.
`createBatch` takes an object of type `Build5Request<`[`NftCreateRequest`](../../../search-post/interfaces/NftCreateRequest.md)`[]>` as parameter.

```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L67-L78
```tsx file=../../../../../packages/sdk/examples/create_nft_collection.ts#L66-L77
```
12 changes: 7 additions & 5 deletions docs/docs/products/project/how-to/create-project.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
title: Create Project
description: How to create a project
keywords:
tags:
- how-to
- project
- client
- create
---

Before creating NFT collections, tokens, and more, the first thing to do should be to create a project with the `createProject` function.
import SoonaverseProject from '../../../_admonitions/_soonaverse-project.md';

:::info
Before creating NFT collections, tokens, and more, the first thing to do should be to create a project with the `createProject` function.
`createProject` takes an object of type `Build5Request<`[`ProjectCreateRequest`](../../../search-post/interfaces/ProjectCreateRequest.md)`>` as parameter.

In the following examples, we will connect to the soonaverse project (its API keys are part of the SDK for ease of use). You can also create your own project to give you your API key.
<SoonaverseProject/>

:::

```tsx file=../../../../../packages/sdk/examples/create_project.ts#L11-L24
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
title: Overview
---

import SoonaverseProject from '../../_admonitions/_soonaverse-project.md';

Projects are your starting point for the Build.5 platform. You need a project to create spaces, modify your billing information and more.

<SoonaverseProject/>

__Features__:
- Create Project
- Project Billing management
6 changes: 5 additions & 1 deletion docs/docs/products/stamp/how-to/create-stamp.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: Create a Stamp
tags:
- how-to
- create
- stamp
---

To create a stamp, you must call `create` on `dataset(Dataset.STAMP)`. In the body, you can specify the file you want to stamp.
To create a stamp, you must call `create` on `dataset(Dataset.STAMP)`. `create` takes an object of type `Build5Request<`[`CreateMemberRequest`](../../../search-post/interfaces/StampRequest.md)`>` as parameter in which you can specify the file you want to stamp.

```tsx file=../../../../../packages/sdk/examples/create_stamp.ts#L13-L27
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ __Features__:

## Related
- [Token](../token/overview)
- [Stake Reward](../stake_reward/overview)
- [Stake Reward](../stake-reward/overview)
File renamed without changes.
Loading