Skip to content

Commit

Permalink
feat: merge api (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cafe137 committed Jun 3, 2024
1 parent b3f521c commit 8cbd812
Show file tree
Hide file tree
Showing 43 changed files with 218 additions and 717 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:

env:
REACT_APP_BEE_HOST: https://api.test-node.staging.ethswarm.org/
REACT_APP_BEE_DEBUG_HOST: https://debug.test-node.staging.ethswarm.org/

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -77,7 +76,7 @@ jobs:
bee-url: https://unlimited.gateway.ethswarm.org
token: ${{ secrets.GHA_PAT_BASIC }}
error-document: index.html
headers: "${{ secrets.GATEWAY_AUTHORIZATION_HEADER }}"
headers: '${{ secrets.GATEWAY_AUTHORIZATION_HEADER }}'

- name: Upload to testnet
uses: ethersphere/swarm-actions/upload-dir@v0
Expand Down
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
**Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its API and
working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**

This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.12.0-88c1d236<!-- SUPPORTED_BEE_END -->**.
Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the
[official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the
[releases tab](https://github.com/ethersphere/bee-dashboard/releases).
This project is intended to be used with \*\*Bee version

<!-- SUPPORTED_BEE_START -->1.12.0-88c1d236<!-- SUPPORTED_BEE_END -->**. Using it with older or newer Bee versions is

not recommended and may not work. Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6) and
by keeping an eye on the [releases tab](https://github.com/ethersphere/bee-dashboard/releases).

![Status page](/ui_samples/info.png)

| Node Setup | Upload Files | Download Content | Accounting | Settings |
| ------------------------------------ | -------------------------------------- | ------------------------------------------ | ----------------------------------------- | ---------------------------------------- |
| Node Setup | Upload Files | Download Content | Accounting | Settings |
| ------------------------------------ | -------------------------------------- | ------------------------------------------ | ----------------------------------------- | ------------------------------------- |
| ![Setup](/ui_samples/node_setup.png) | ![Upload](/ui_samples/file_upload.png) | ![Download](/ui_samples/file_download.png) | ![Accounting](/ui_samples/accounting.png) | ![Settings](/ui_samples/settings.png) |

## Table of Contents
Expand All @@ -45,9 +47,9 @@ npm install -g @ethersphere/bee-dashboard

## Usage

:warning: To successfully connect to the Bee node, you will need to enable the Debug API and CORS. You can do so by
setting `cors-allowed-origins: ['*']` and `debug-api-enable: true` in the Bee config file and then restart the Bee node.
To see where the config file is, consult the
:warning: To successfully connect to the Bee node, you will need to enable CORS. You can do so by setting
`cors-allowed-origins: ['*']` in the Bee config file and then restart the Bee node. To see where the config file is,
consult the
[official Bee documentation](https://docs.ethswarm.org/docs/working-with-bee/configuration#configuring-bee-installed-using-a-package-manager)

### Terminal
Expand Down Expand Up @@ -96,25 +98,29 @@ The Bee Dashboard runs in development mode on [http://localhost:3031/](http://lo

#### Environmental variables

The CRA supports to specify "environmental variables" during build time which are then hardcoded into the served static files.
We support following variables:
The CRA supports to specify "environmental variables" during build time which are then hardcoded into the served static
files. We support following variables:

- `REACT_APP_BEE_DESKTOP_ENABLED` (`boolean`) that toggles if the Dashboard is in Desktop mode or not.
- `REACT_APP_BEE_DESKTOP_URL` (`string`) defines custom URL where the Desktop API is expected. By default, it is same origin under which the Dashboard is served.
- `REACT_APP_BEE_HOST` (`string`) defines custom Bee API URL to be used as default one. By default, the `http://localhost:1633` is used.
- `REACT_APP_BEE_DEBUG_HOST` (`string`) defines custom Bee Debug API URL to be used as default one. By default, the `http://localhost:1635` is used.
- `REACT_APP_DEFAULT_RPC_URL` (`string`) defines the default RPC provider URL. Be aware, that his only configures the default value. The user can override this in Settings, which is then persisted in local store and has priority over the value set in this env. variable. By default `https://xdai.fairdatasociety.org` is used.
- `REACT_APP_BEE_DESKTOP_ENABLED` (`boolean`) that toggles if the Dashboard is in Desktop mode or not.
- `REACT_APP_BEE_DESKTOP_URL` (`string`) defines custom URL where the Desktop API is expected. By default, it is same
origin under which the Dashboard is served.
- `REACT_APP_BEE_HOST` (`string`) defines custom Bee API URL to be used as default one. By default, the
`http://localhost:1633` is used.
- `REACT_APP_DEFAULT_RPC_URL` (`string`) defines the default RPC provider URL. Be aware, that his only configures the
default value. The user can override this in Settings, which is then persisted in local store and has priority over
the value set in this env. variable. By default `https://xdai.fairdatasociety.org` is used.

#### Swarm Desktop development

If you want to develop Bee Dashboard in the Swarm Desktop mode, then spin up `swarm-desktop` to the point where Desktop is initialized (eq. the splash screen disappear) and:
If you want to develop Bee Dashboard in the Swarm Desktop mode, then spin up `swarm-desktop` to the point where Desktop
is initialized (eq. the splash screen disappear) and:

```sh
echo "REACT_APP_BEE_DESKTOP_URL=http://localhost:3054
REACT_APP_BEE_DESKTOP_ENABLED=true" > .env.development.local

npm start
npm run desktop # This will inject the API key to the Dashboard
npm run desktop # This will inject the API key to the Dashboard
```

## Contribute
Expand All @@ -136,5 +142,4 @@ See what "Maintainer" means [here](https://github.com/ethersphere/repo-maintaine

[BSD-3-Clause](./LICENSE)


[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fethersphere%2Fbee-dashboard.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fethersphere%2Fbee-dashboard?ref=badge_large)
Loading

0 comments on commit 8cbd812

Please sign in to comment.