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

WIP Update docs structure #215

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ website/static/aragon-ui
website/*.lock

# ignore files generated from repos
docs/js-*
docs/cli-*
docs/aragon-api/js-*
docs/aragon-cli/cli-*

# ignore files generated by solidity-docgen
docs/api_*
29 changes: 0 additions & 29 deletions docs/acl-intro.md

This file was deleted.

32 changes: 26 additions & 6 deletions docs/apm-ref.md → docs/advanced/apm-ref.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
---
id: apm-ref
title: aragonPM reference documentation
sidebar_label: Reference documentation
sidebar_label: aragonPM reference
hide_title: true
---

#####
![](/docs/assets/brand/aragonpm.png)

aragonPM is built from three aragonOS-powered applications:

<span>![*](/docs/assets/check.svg) [APMRegistry](#apmregistry)</span><br>
<span>![*](/docs/assets/check.svg) [ENSSubdomainRegistrar](#enssubdomainregistrar)</span><br>
<span>![*](/docs/assets/check.svg) [Repo](#repo)</span><br>
<span>![*](/docs/assets/check.svg) [APMRegistry](#apmregistry)</span>
<br>
<span>![*](/docs/assets/check.svg) [ENSSubdomainRegistrar](#enssubdomainregistrar)</span>
<br>
<span>![*](/docs/assets/check.svg) [Repo](#repo)</span>
<br>

## APMRegistry

Expand Down Expand Up @@ -38,7 +42,7 @@ See [APMRegistry](/docs/apm_APMRegistry.html) and [ENSSubdomainRegistrar](/docs/

## Repo

After [discovering the apps of a DAO by traversing its ACL](/docs/aragonos-ref.html#app-installation), we can fetch their `app.appId()`s and use ENS to resolve their Repo contracts:
After [discovering the apps of a DAO by traversing its ACL](/docs/advanced/os-ref.html#app-installation), we can fetch their `app.appId()`s and use ENS to resolve their Repo contracts:

```solidity
repo = Repo(Resolver(ens.resolver(appId)).addr(appId))
Expand Down Expand Up @@ -142,3 +146,19 @@ repoVersion = repo.getLatest();
### API documentation

See [Repo](/docs/apm_Repo.html).

---

## Interacting with aragonPM: apm.js and aragonCLI

In order to interact with aragonPM registries, we have built [apm.js](https://github.com/aragon/apm.js) as a standalone JS library to inspect aragonPM repos, get their different versions, and fetch the referenced content. The library also allows interaction with aragonPM contracts for creating new repos or versions.

The [aragonCLI](/docs/cli-intro.html) also uses apm.js to provide a great developer experience for creating and publishing new versions of Aragon apps as aragonPM repos. The CLI's aragonPM commands, accessible through `aragon apm`, are the easiest way to manage aragonPM repos.

### App distribution

1. [Publish your application onto an aragonPM registry with the CLI](/docs/advanced/guides-publish)
2. [Guide others to install your app from an aragonPM registry](/docs/advanced/guides-custom-deploy), and finally,
3. [Submit your app to the Aragon Client's App Center](/docs/advanced/app-center-submission)

---
22 changes: 11 additions & 11 deletions docs/api-intro.md → docs/advanced/aragon-api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: api-intro
id: aragon-api
title: aragonAPI Introduction
sidebar_label: Introduction
sidebar_label: aragonAPI
hide_title: true
---

Expand All @@ -20,19 +20,19 @@ A JavaScript implementation of the aragonAPI, used to interact with aragonOS by
Some of the things you can do with the JavaScript implementation are:

- Connect contracts to front-end
- Interact with [aragonOS](os-intro.md) and aragonOS-powered applications directly through an abstraction over web3.js
- Interact with aragonOS and aragonOS-powered applications directly through an abstraction over web3.js
- Get access to application state with built in client-side caching
- Create human-readable transaction descriptions for your smart contracts through [Radspec](human-readable-txs.md)
- Create human-readable transaction descriptions for your smart contracts through [Radspec](/docs/basics/basics-os-concepts.html#how-radspec-works)

#### Docs

- [Quick Start for apps](js-ref-quick-start.md)
- [App API](js-ref-api.md)
- [React API](js-ref-react.md)
- [Aragon client implementations (wrapper)](js-ref-wrapper.md)
- [Providers](js-ref-providers.md)
- [Architecture of Aragon apps and their communication channels](js-ref-architecture.md)
- [Quick Start for apps](docs/aragon-api/js-ref-quick-start.md)
- [App API](docs/aragon-api/js-ref-api.md)
- [React API](docs/aragon-api/js-ref-react.md)
- [Aragon client implementations (wrapper)](docs/aragon-api/js-ref-wrapper.md)
- [Providers](docs/aragon-api/js-ref-providers.md)
- [Architecture of Aragon apps and their communication channels](docs/aragon-api/js-ref-architecture.md)

#### Guides

- [Background Scripts](js-guide-bg-scripts.md)
- [Background Scripts](docs/aragon-api/js-guide-bg-scripts.md)
5 changes: 5 additions & 0 deletions docs/advanced/aragon-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
id: aragon-cli-intro
title: aragonCLI
sidebar_label: aragonCLI
---
20 changes: 6 additions & 14 deletions docs/ui-intro.md → docs/advanced/aragon-ui.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
id: aragonui-intro
title: aragonUI intro
sidebar_label: Introduction
id: aragon-ui
title: aragonUI
sidebar_label: aragonUI
hide_title: true
---

![](/docs/assets/brand/aragonui.png)

**aragonUI** is an Aragon-native toolkit of UI components for decentralized apps. It follows the [Aragon client](client.md) design language and will make your app appear as a seamless part of the Aragon ecosystem. Using the aragonUI for your app, however, is not mandatory.
**aragonUI** is an Aragon-native toolkit of UI components for decentralized apps. It follows the [Aragon client](/docs/basics/basics-stack.html#aragon-client.md) design language and will make your app appear as a seamless part of the Aragon ecosystem. Using the aragonUI for your app, however, is not mandatory.

Here is the [gallery of UI components](https://ui.aragon.org/).

Expand All @@ -29,11 +29,7 @@ Wrap your app in the `Main` component:
import { Main } from '@aragon/ui'

function App() {
return (
<Main>
{/* Your app goes here */}
</Main>
)
return <Main>{/* Your app goes here */}</Main>
}
```

Expand All @@ -47,11 +43,7 @@ import { Main } from '@aragon/ui'

function App() {
const { appearance } = useGuiStyle()
return (
<Main theme={appearance}>
{/* Your app goes here */}
</Main>
)
return <Main theme={appearance}>{/* Your app goes here */}</Main>
}
```

Expand Down
44 changes: 17 additions & 27 deletions docs/guides-agent-app.md → docs/advanced/guides-agent-app.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: guides-use-agent
title: How to use Aragon Agent
sidebar_label: The Agent app
sidebar_label: Agent app
---

# Introduction
Expand Down Expand Up @@ -56,7 +56,7 @@ If you haven't done so already, install it from NPM by running the following com

Hopefully, it installed successfully 😊.

If not, we recommend you take a quick look at the [installing aragonCLI](/docs/guides-faq.html#installing-aragoncli) section of our [troubleshooting guide](/docs/guides-faq.html#installing-aragonCLI). It should help diagnose and fix the problem 🧐.
If not, we recommend you take a quick look at the installing aragonCLI section of our [FAQ](/docs/faq/cli-install.md). It should help diagnose and fix the problem 🧐.

If that still doesn't fix things 😟, please reach out to us at the [#dev-help channel on the Aragon Chat](https://aragon.chat/channel/dev-help). We're more than happy to help.

Expand All @@ -79,17 +79,15 @@ We'll use the the [`dao install`](https://hack.aragon.org/docs/cli-dao-commands#
`dao install` takes two arguments:

1. The address or [aragonID](https://github.com/aragon/aragon-id) name of an Aragon DAO.
2. The package name of an Aragon app published to [aragonPM](/docs/apm-intro) (for the Agent app this would be agent or agent.aragonpm.eth).
2. The package name of an Aragon app published to aragonPM (for the Agent app this would be agent or agent.aragonpm.eth).

So in our case, to install the Agent app, we need to run:

```
dao install <your organization name> agent --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao install <your organization name> agent --environment aragon:rinkeby
```

You should see that after `dao install <your organization's name> agent` we pass in two [global options](https://hack.aragon.org/docs/cli-intro.html#global-options): `--environment` and `--ipfs-rpc`.

> Note: As an alternative to passing the `--ipfs-rpc` option, you can also choose to run `aragon ipfs start` in another terminal.
You should see that after `dao install <your organization's name> agent` we pass in a [global option](https://hack.aragon.org/docs/cli-intro.html#global-options): `--environment`.

<details>
<summary>Tell me more about aragon ipfs and these global options.</summary>
Expand All @@ -98,14 +96,6 @@ The `--environment` option allows us to specify the network we want to use. In o

Note that if we had chosen the **Ethereum Mainnet** as the network for our organization we would have passed `aragon:mainnet` instead of `aragon:rinkeby` as the argument to `--environment`.

The `--ipfs-rpc` option allows us to point to an IPFS node that has the files we are looking for. In our case we're pointing it to the aragon network IPFS node.

We can also run our own IPFS node by running `aragon ipfs` in another terminal window.

Running a local IPFS node allows us to run the same command without the `--ipfs-rpc` option (since the `--ipfs-rpc` option defaults to `http://localhost:5001`).

However, since IPFS propogation is slow, it's better to point directly to the aragon IPFS node.

</details>

**Note that, in the true spirit of democracy, this step will trigger a vote in the DAO, you'll need to vote _yes_ to confirm the installation of the Agent app.** To confirm the vote:
Expand All @@ -128,7 +118,7 @@ However, since IPFS propogation is slow, it's better to point directly to the ar
<img width="800" src="/docs/assets/agent-guide/agent-2.png">
</p>

4. Sign the transaction with your favourite [web3 provider](/docs/getting-started.html#web3-provider) and voila! That's all there is to it. When you click on the Voting app again you should see the vote has passed with a 100% Yes vote.
4. Sign the transaction with your favourite [web3 provider](/docs/basics/basics-getting-started.html#web3-provider) and voila! That's all there is to it. When you click on the Voting app again you should see the vote has passed with a 100% Yes vote.

<p align="center">
<img width="800" src="/docs/assets/agent-guide/agent-3.png">
Expand All @@ -155,7 +145,7 @@ In this guide we're going to give the Voting app permission to use the Agent app

To assign these permissions we need to get a hold of the Ethereum address of the Agent app -- remember **Agent is a fully-fledged Ethereum account** -- as well as the address of the Voting app in our DAO.

The Agent app address can be found by running the [`dao apps`](/docs/cli-dao-commands#dao-apps) command.
The Agent app address can be found by running the [`dao apps`](/docs/aragon-cli/cli-dao-commands#dao-apps) command.

`dao apps` takes one argument: the address or name of an aragon DAO.

Expand All @@ -179,9 +169,9 @@ You should see a table that looks something like this:

Followed directly by another that looks like this:

| Permissionless app | Proxy address |
| ------------------------------------------------------------------ | ---------------------------------------------- |
| agent | **0x843bfA21a040E742ec32b8F6991e182D9655AF21** |
| Permissionless app | Proxy address |
| ------------------ | ---------------------------------------------- |
| agent | **0x843bfA21a040E742ec32b8F6991e182D9655AF21** |

The permissionless app is the Agent app we've just installed. Its address is listed under **Proxy address** in the bottom table. In this guide that's **0x843bfA21a040E742ec32b8F6991e182D9655AF21** . Yours will be slightly different.

Expand Down Expand Up @@ -236,7 +226,7 @@ You should see the following output:

Before we explain the `dao acl create` command we ran above we need to understand a little bit about how permissions in Aragon work.

Aragon uses an [Access Control List](/docs/acl-intro) (ACL) to control who can access your app's functionality.
Aragon uses an Access Control List (ACL) to control who can access your app's functionality.

This list contains a set of who has permission to execute an action in an Aragon app and who can re-grant or revoke that permission.

Expand Down Expand Up @@ -280,7 +270,7 @@ Note that, same as before, this command will trigger a vote in the DAO and **you
You can do this either by using the Aragon client again or, now that you know how to get the address of your apps, by running:

```
dao exec <your organization name> <your voting app address> vote <vote id> true true --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao exec <your organization name> <your voting app address> vote <vote id> true true --environment aragon:rinkeby
```

<details>
Expand Down Expand Up @@ -381,7 +371,7 @@ This means that to allow A to vote in B we need to mint a token for A's Agent ap
To do this run:

```
dao exec <name of dao B> <token manager app address of dao B> mint <agent app address of dao A> 1000000000000000000 --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao exec <name of dao B> <token manager app address of dao B> mint <agent app address of dao A> 1000000000000000000 --environment aragon:rinkeby
```

Remember, you can find the addresses of the apps in any of your DAOs by running `dao apps <organization name> --environment aragon:rinkeby`.
Expand All @@ -406,7 +396,7 @@ Finally, the usual warning: running the above command will trigger a vote in B t
You can do this either directly through the UI or by running:

```
dao exec <name of dao B> <voting app address of dao B> vote 0 true true --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao exec <name of dao B> <voting app address of dao B> vote 0 true true --environment aragon:rinkeby
```

On the UI, the vote will look something like this.
Expand All @@ -428,7 +418,7 @@ You should see that you've successfully added another token holder (your Agent a
As in step 2, we'll run `dao exec` again, except this time the first argument to `mint` will be the address of the third entity we want to add to B.

```
dao exec <name of dao B> <token manager app address of dao B> mint <third entity's address> 1000000000000000000 --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao exec <name of dao B> <token manager app address of dao B> mint <third entity's address> 1000000000000000000 --environment aragon:rinkeby
```

Running the above will create an open vote in B. Again we'll need to vote _yes_ to confirm the minting.
Expand Down Expand Up @@ -474,7 +464,7 @@ Remember that `dao act` takes at least three arguments:
So in our case, we run:

```
dao act <agent app address of dao A> <voting app address of dao B> "vote(uint256,bool,bool)" 1 true true --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao act <agent app address of dao A> <voting app address of dao B> "vote(uint256,bool,bool)" 1 true true --environment aragon:rinkeby
```

The result of this command will be to trigger a vote in A on whether to allow A's Agent app to execute the vote in B.
Expand All @@ -490,7 +480,7 @@ The final step is to confirm the vote in A.
Again, we can do this either through the UI or by running:

```
dao exec <name of dao A> <voting app address of dao A> vote 2 true true --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
dao exec <name of dao A> <voting app address of dao A> vote 2 true true --environment aragon:rinkeby
```

Note that we passed in a vote id of `2` as the first argument to `vote`. That's because this is the third vote created in A, and vote ids start at 0.
Expand Down
Loading