π¦ π¦ Web app for consumers to explore, download, and publish data assets. https://oceanprotocol.com
7.2K
π¦ Web app for consumers to explore, download, and publish data assets.
Pleuston [
ΛplustΙn]: organisms that live in the thin surface layer existing at the air-water interface of a body of water as their habitat
π²π¦ THERE BE DRAGONS AND SQUIDS. This is in alpha state and you can expect running into problems. If you run into them, please open up a new issueβ . π¦π²
For a more lightweight and mature implementation of Ocean Protocol components into a React app, have a look at commonsβ too.
This repository houses Pleuston, a reference web app for consumers to explore, download, and publish data assets within the Ocean Protocol network. It is shipped as the main interface to interact with Ocean components when running π³ bargeβ .
Pleuston is a single page React app, bootstrapped with create-react-appβ .
To start development with Pleuston you first have to get all the other Ocean Protocol components up and running. The simplest way is to use our main script from the π³ bargeβ repository to spin up a local Spree test network, and pass the option to skip the Pleuston image in there:
git clone [email protected]:oceanprotocol/barge.git
cd barge/
./start_ocean.sh --no-pleuston
This will start up all required components as documented in Bargeβ .
After the Docker containers from the above step are up, you can start your local development version of Pleuston in another terminal:
git clone [email protected]:oceanprotocol/pleuston.git
cd pleuston/
npm i
# Copy generated contract artifacts from Docker container.
# Required only for local Spree test network
./scripts/keeper.sh
npm start
This should output a message as follows:
Compiled successfully!
You can now view @oceanprotocol/pleuston in the browser.
Local: http://localhost:3000/
All required components to get Pleuston running are pre-configured and started with Barge as a local Spree network, and the web app is configured to connect to them locally by default.
If you want to change and run Pleuston against remote components you can either set the following environment variables, or directly edit the src/config/ocean.jsβ file.
REACT_APP_KEEPER_NODE_URIREACT_APP_AQUARIUS_URIREACT_APP_BRIZO_URIREACT_APP_BRIZO_ADDRESSREACT_APP_SECRETSTORE_URIBe sure to login into your MetaMask account and select the respective network. By default, Pleuston and Barge will run a Spree test network:
Localhost 8545)https://nile.dev-ocean.com)https://pacific.oceanprotocol.com)When registering assets, files can be retrieved from various cloud storage providers.
Configuration for all storage provider options can be found in:
App includes a connection to Amazon Web Services, so you can retrieve and register assets stored in an S3 bucket. Setting AWS connection requires the setup of Cognito authentication service with proper access policies for the specific bucket.
App includes an OAuth connection to your Azure account. Once authorized, assets can be chosen from a file list within Pleuston.
Currently, Azure Storage only allows listing containers with OAuth credentials. Listing blobs in containers and operations on blobs can't be done with OAuth credentials until that feature is out of previewβ . Until then, manually added credentials are required in
src/config/cloudStorage.jsβ _
To run your application over SSL, set the scheme values in src/config/ocean.jsβ to https, e.g.:
module.exports = {
keeperNodeUri: 'https://my-node-uri.com',
...
}
Automatic tests are setup via Travis, executing npm test.
The tests run:
Code linting is setup with ESLintβ and stylelintβ following eslint-config-oceanprotocolβ and stylelint-config-bigchaindbβ . Code formatting is achieved with Prettierβ .
There's a npm script setup which runs only linting tests:
npm run lint
Additionally you can this to auto-format all code:
npm run format
You can inspect a full production build by creating it first, and then run a local web server on top of the build output, e.g. serveβ :
# Copy generated contract artifacts from Docker container.
# Required only for local Spree test network
./scripts/keeper.sh
# create production build
npm run build
serve -s build/
# go to http://localhost:5000
From a clean master branch you can run any release task doing the following:
package.json & package-lock.jsonCHANGELOG.md file from commit messagesYou can execute the script to bump the version accordingly:
npm run releasenpm run release minornpm run release majorFor the GitHub releases steps a GitHub personal access token, exported as GITHUB_TOKEN is required. Setupβ
Pleuston is not deployed anywhere remotely, but is distributed via Bargeβ . All release tags and branches are automatically built on Docker Hubβ , and Barge refers to one of those Docker builds.
See the CHANGELOG.mdβ file. This file is auto-generated during the above mentioned release process.
Copyright 2019 Ocean Protocol Foundation Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Content type
Image
Digest
Size
258.5 MB
Last updated
about 7 years ago
docker pull oceanprotocol/pleuston